/*
  ======================================================
  MOBAI STUDIO · 柔和创意紫版
  新手修改指南：
  1. 想换主色：修改下面的 --purple
  2. 想换背景：修改 --background
  3. 想调整卡片高度：搜索 .cover-button 的 aspect-ratio
  4. 手机每行两张：搜索文件底部的 repeat(2, 1fr)
  ======================================================
*/

/* ========== 1. 网站颜色 ========== */
:root {
  --purple: #3C00FF;            /* 主要按钮、强调文字 */
  --purple-hover: #2D00C9;      /* 按钮鼠标悬停 */
  --background: #F5F0FF;        /* 页面浅紫色背景 */
  --white: #FFFFFF;             /* 卡片和弹窗 */
  --dark: #231643;              /* 深紫黑正文 */
  --muted: #867B9B;             /* 灰紫色辅助文字 */
  --border: #DFD5FF;            /* 浅紫色边框 */
  --light-purple: #ECE4FF;      /* 没有封面时的底色 */
  --light-purple-2: #E6DBFF;    /* 信息区淡紫底色 */
}

/* ========== 2. 通用样式 ========== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--dark);
  font-family: Arial, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #A38BFF;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.container {
  width: calc(100% - 72px);
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== 简约线条箭头（纯 CSS，手机上不会变 Emoji） ========== */
.line-arrow {
  display: inline-block;
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: inherit; /* 跟随按钮文字颜色，悬停时自动变色 */
}

/* 斜线：从左下往右上 */
.line-arrow::before {
  content: "";
  position: absolute;
  width: 13px;
  height: 2px;
  left: 0;
  top: 6px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}

/* 箭头尖：上边线 + 右边线 */
.line-arrow::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-top-right-radius: 1px;
}

/* ========== 3. 顶部导航栏 ========== */
.site-header {
  height: 77px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
}

.header-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-icon {
  font-family: Georgia, serif;
  font-weight: 900;
  font-size: 44px;
  letter-spacing: -5px;
  line-height: 1;
}

.brand-icon span {
  color: var(--purple);
}

.brand-name {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 2px;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}

.language-switch button {
  padding: 5px 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.language-switch button.selected {
  color: var(--purple);
  font-weight: 800;
}

.language-switch span {
  color: #B9ABDA;
}

/* ========== 4. 首页大标题 ========== */
.hero {
  padding-top: 74px;
  padding-bottom: 66px;
}

.eyebrow-line {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #716488;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--purple);
  border-radius: 50%;
  box-shadow: 0 0 0 5px #E6DCFF;
  flex-shrink: 0;
}

.short-line {
  width: 33px;
  height: 1px;
  background: #A798CB;
}

.hero-layout {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.hero h1 {
  margin: 28px 0 22px;
  font-size: clamp(68px, 8vw, 112px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.98;
}

.hero h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.07em;
}

.title-dot {
  color: var(--purple);
}

.hero-description {
  margin: 0;
  max-width: 550px;
  color: #736984;
  font-size: 15px;
  line-height: 1.5;
}

.hero-stamp {
  width: 103px;
  height: 103px;
  margin-right: 18px;
  margin-bottom: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  box-shadow: 11px 11px 0 var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-13deg);
}

.hero-stamp span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.hero-stamp strong {
  font-size: 40px;
  line-height: 1.18;
  font-weight: 400;
}

/* ========== 5. 提示词搜索框：位于分类按钮上方 ========== */
.search-row {
  padding-top: 24px;
  padding-bottom: 17px;
  border-top: 1px solid #9E8DC9;
}

.search-field {
  width: min(100%, 465px);
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-field:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(60, 0, 255, 0.08);
}

/* 用 CSS 绘制放大镜，手机上不会变成 Emoji */
.search-icon {
  position: relative;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 1.8px solid #83759F;
  border-radius: 50%;
  margin-right: 3px;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 1.8px;
  right: -5px;
  bottom: -2px;
  border-radius: 2px;
  background: #83759F;
  transform: rotate(45deg);
}

.search-field input {
  flex: 1;
  width: 0;
  height: 44px;
  border: 0;
  padding: 0;
  outline: none;
  background: transparent;
  color: var(--dark);
  font: inherit;
  font-size: 13px;
  appearance: none;
}

.search-field input::placeholder { color: #9286A6; opacity: 1; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field input::-webkit-search-decoration { display: none; }

.search-clear {
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: #F0E9FF;
  color: var(--purple);
  font-size: 20px;
  line-height: 1;
}

.search-clear:hover { background: #E5D7FF; }

/* 模糊搜索的小提示，不占用额外操作空间 */
.search-helper {
  margin: 7px 2px 0;
  color: #9083A7;
  font-size: 11px;
  line-height: 1.5;
}

/* ========== 6. 分类按钮 ========== */
.gallery-toolbar {
  padding-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-button {
  min-height: 39px;
  padding: 11px 22px;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.66);
  color: #6F6286;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.filter-button:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.filter-button.active {
  border-color: var(--purple);
  background: var(--purple);
  color: var(--white);
}

.project-count {
  color: #9184A9;
  white-space: nowrap;
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
}

.gallery-tip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 26px 0 19px;
  color: #807392;
  font-size: 12px;
}

.gallery-tip > span:first-child {
  color: var(--purple);
  font-size: 22px;
  font-weight: 900;
}

/* ========== 6. 作品卡片 ========== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 27px;
}

.project-card {
  min-width: 0;
  background: var(--white);
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: #B09AFF;
  box-shadow: 0 10px 28px rgba(59, 24, 140, 0.08);
}

.cover-button {
  width: 100%;
  aspect-ratio: 4 / 3;  /* 数字越大，封面区域越矮。例如改成 16 / 10 */
  display: block;
  padding: 0;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
  background: var(--light-purple);
}

.cover-button:hover {
  background: #DFD2FF;
}

.cover-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.card-info {
  min-height: 61px;
  padding: 10px 4px 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.card-text {
  min-width: 0;
}

.card-category {
  color: #9387A7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.card-title {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.4px;
  overflow-wrap: anywhere;
}

.card-arrow {
  min-width: 51px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #F7F3FF;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.card-arrow:hover {
  background: var(--purple);
  color: var(--white);
}

.empty-message {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
}

/* ========== 7. 底部区域 ========== */
main.container {
  padding-bottom: 95px;
}

.site-footer {
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 36px 0 43px;
}

.footer-content strong {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -1px;
}

.footer-content strong span,
.back-to-top .line-arrow {
  color: var(--purple);
}

.footer-content p {
  margin: 10px 0 0;
  color: #9184A9;
  font-size: 11px;
  line-height: 1.5;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.back-to-top .line-arrow {
  margin-left: 3px;
}

/* ========== 8. 项目详情弹窗 ========== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal.show {
  display: block;
}

.no-scroll {
  overflow: hidden;
}

.modal-background {
  position: absolute;
  inset: 0;
  background: rgba(30, 13, 57, 0.65);
  backdrop-filter: blur(8px);
}

.modal-box {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1140px, calc(100% - 44px));
  max-height: 92%;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid #DCCEFF;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(28, 9, 65, 0.3);
  scrollbar-width: thin;
}

.modal-header {
  min-height: 73px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
}

.modal-header-title,
.modal-header-right {
  display: flex;
  align-items: center;
  gap: 13px;
}

.modal-header-title {
  font-size: 12px;
  font-weight: 700;
}

.purple-text {
  color: var(--purple);
}

.modal-header-right {
  gap: 21px;
}

.modal-close {
  width: 35px;
  height: 35px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--dark);
  font-size: 26px;
  line-height: 1;
}

.modal-close:hover {
  background: var(--purple);
  color: var(--white);
}

.modal-content {
  display: grid;
  grid-template-columns: 1fr 1.04fr;
}

/* ========== 9. 弹窗左侧视频预览 ========== */
.modal-left {
  padding: 35px 36px 42px;
  background: #F1EBFF;
  border-right: 1px solid var(--border);
}

.preview-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 25px;
  color: #776792;
  font-size: 11px;
  font-weight: 800;
}

.preview-label .dot {
  width: 7px;
  height: 7px;
  box-shadow: none;
}

.video-preview {
  position: relative;
  height: min(70vh, 600px);
  width: min(100%, 348px);
  margin: 0 auto;
  background: #E5DBF8;
  border: 1px solid #D7CAEF;
  border-radius: 5px;
  overflow: hidden;
}

.video-preview img,
.video-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-preview img {
  object-fit: cover;
}

.video-preview video {
  background: #100D1B;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 63px;
  height: 63px;
  border: none;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* 用 CSS 绘制播放三角形，不使用 Emoji */
.play-icon {
  display: block;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid white;
  margin-left: 4px;
}


.preview-caption {
  width: min(100%, 348px);
  margin: 14px auto 0;
  color: #9182A9;
  font-size: 11px;
  line-height: 1.6;
}

/* ========== 10. 弹窗右侧内容 ========== */
.modal-right {
  padding: 38px 45px 48px;
  min-width: 0;
}

.detail-type {
  margin: 0;
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.modal-right h2 {
  margin: 14px 0 14px;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.06;
}

.detail-description {
  margin: 0 0 25px;
  color: #796D8E;
  font-size: 13px;
  line-height: 1.8;
}

.skill-box {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 19px 20px;
  background: var(--light-purple-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.skill-box:hover {
  border-color: #A996FF;
  background: #DFD2FF;
}

.skill-box small {
  color: #8063BF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.skill-box strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--dark);
}

.skill-text { min-width: 0; }

.copy-pill {
  flex-shrink: 0;
  padding: 9px 12px;
  background: var(--purple);
  color: white;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  border-radius: 6px;
}

/* 按需展开，查看完整提示词。默认不展开，避免页面太长。 */
.prompt-expand {
  margin-bottom: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #FCFAFF;
}

.prompt-expand summary {
  padding: 11px 15px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.prompt-expand pre {
  max-height: 330px;
  margin: 0;
  padding: 17px;
  overflow: auto;
  border-top: 1px solid var(--border);
  color: #4D4362;
  font-family: Arial, "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

.block-heading {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 800;
}

.main-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 12px 18px;
  background: var(--purple);
  border-radius: 6px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.main-action:hover {
  background: var(--purple-hover);
}


.detail-block {
  padding-top: 25px;
  margin-top: 26px;
  border-top: 1px solid var(--border);
}

.detail-block h3 {
  margin: 0 0 16px;
  font-size: 17px;
}

.detail-section-label {
  margin: 0 0 22px;
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dash-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash-list li {
  margin-bottom: 11px;
  color: #786C8C;
  font-size: 12px;
  line-height: 1.75;
}

.dash-list li::before {
  content: "—";
  color: var(--purple);
  margin-right: 11px;
}

.steps-title {
  margin-top: 24px !important;
}

.step-description {
  margin: 0;
  color: #786C8C;
  font-size: 12px;
  line-height: 1.85;
}

/* ========== 11. 小提示弹窗 ========== */
.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 23px;
  transform: translate(-50%, 15px);
  width: max-content;
  max-width: calc(100% - 30px);
  padding: 12px 18px;
  border-radius: 6px;
  background: var(--dark);
  color: var(--white);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ========== 12. 平板尺寸（每行 3 张卡片） ========== */
@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal-right {
    padding: 32px;
  }
}

/* ========== 13. 手机尺寸（每行 2 张卡片） ========== */
@media (max-width: 760px) {
  .container {
    width: calc(100% - 36px);
  }

  .site-header {
    height: 65px;
  }

  .brand-icon {
    font-size: 34px;
  }

  .brand-name {
    font-size: 10px;
  }

  .hero {
    padding-top: 44px;
    padding-bottom: 45px;
  }

  .eyebrow-line {
    font-size: 9px;
    gap: 9px;
    letter-spacing: 1.5px;
  }

  .short-line {
    width: 24px;
  }

  .hero h1 {
    margin: 25px 0 20px;
    font-size: clamp(48px, 10.9vw, 80px);
  }

  .hero-description {
    max-width: 275px;
    font-size: 14px;
  }

  .hero-stamp {
    width: 70px;
    height: 70px;
    margin: 0 3px 17px 0;
    box-shadow: 8px 8px 0 var(--border);
  }

  .hero-stamp span {
    font-size: 6px;
  }

  .hero-stamp strong {
    font-size: 28px;
  }

  /* 手机分类按钮每行 2 个，作品卡片每行 2 张。 */
  .search-row {
    padding-top: 18px;
    padding-bottom: 16px;
  }

  .search-field {
    width: 100%;
    min-height: 44px;
  }

  .search-field input { font-size: 12px; }

  .gallery-toolbar {
    display: block;
    padding-top: 0;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .filter-button {
    min-height: 38px;
    padding: 9px 7px;
    font-size: 11px;
  }

  .project-count {
    display: block;
    text-align: right;
    margin-top: 12px;
  }

  .gallery-tip {
    margin-top: 18px;
    margin-bottom: 18px;
    font-size: 11px;
  }

  /* 这里就是手机每行两张作品卡片的设置。 */
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 11px;
  }

  .project-card {
    padding: 5px;
    border-radius: 7px;
  }

  .cover-button {
    aspect-ratio: 5 / 4;  /* 手机上封面高度较短 */
  }

  .card-info {
    padding: 8px 2px 3px;
    min-height: 56px;
  }

  .card-category {
    font-size: 8px;
    letter-spacing: 0.7px;
  }

  .card-title {
    font-size: 12px;
    margin-top: 4px;
  }

  .card-arrow {
    min-width: 44px;
    height: 25px;
    padding: 0 5px;
    font-size: 9px;
  }

  main.container {
    padding-bottom: 69px;
  }

  .footer-content {
    padding: 29px 0 37px;
  }

  .footer-content strong {
    font-size: 16px;
  }

  .footer-content p {
    font-size: 10px;
    max-width: 205px;
  }

  .back-to-top {
    font-size: 11px;
  }

  /* 手机详情弹窗改为全屏，内容可上下滚动。 */
  .modal-box {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: 0;
  }

  .modal-header {
    min-height: 64px;
    padding: 0 18px;
  }

  .modal-header-right {
    gap: 13px;
  }

  .modal-content {
    grid-template-columns: 1fr;
  }

  .modal-left {
    padding: 25px 22px 29px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .video-preview {
    height: min(52vh, 430px);
    width: min(100%, 285px);
  }

  .preview-caption {
    width: min(100%, 285px);
  }

  .modal-right {
    padding: 29px 24px 50px;
  }

  .modal-right h2 {
    font-size: 39px;
  }
}

/* ========== 14. 非常窄的手机 ========== */
@media (max-width: 370px) {
  .container {
    width: calc(100% - 28px);
  }

  .hero h1 {
    font-size: 45px;
  }

  .hero-stamp {
    width: 61px;
    height: 61px;
  }

  .filter-button {
    font-size: 10px;
  }

  .card-title {
    font-size: 12px;
  }
}

/* 尊重用户减少动画的系统偏好 */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
