/* ========================================
   墨白AI设计作品集 - 样式表
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --text-primary: #f5f5f5;
  --text-secondary: #9ca3af;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-blue: #3b82f6;
  --radius: 16px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

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

/* ========================================
   开场动画
   ======================================== */
.splash {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-text {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  animation: splashIn 1.2s ease forwards;
}

@keyframes splashIn {
  0% { opacity: 0; transform: scale(0.9); }
  20% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1); }
}

/* ========================================
   导航栏
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 40px;
  display: flex;
  justify-content: center;
  gap: 48px;
  background: linear-gradient(to bottom, rgba(10,10,10,0.9), transparent);
  transition: var(--transition);
}

.nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  transition: var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* 竖排署名 */
.signature {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  white-space: nowrap;
  z-index: 50;
}

/* ========================================
   Hero 首屏
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 120px 40px;
}

.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, var(--bg-dark) 85%);
  z-index: 1;
}

/* Hero 内容：先居中，再下移 */
.hero-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  max-width: 600px;
  width: auto;
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease;
}

/* 动画结束后移动到右侧 */
.hero-content.hero-right {
  left: auto;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.8);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 28px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

/* ========================================
   通用区块
   ======================================== */
.section {
  padding: 120px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
  background: linear-gradient(135deg, #fff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   项目跑马灯
   ======================================== */
.projects-section {
  padding: 80px 0;
  overflow: hidden;
}

.projects-section .section-title {
  margin-bottom: 50px;
}

.marquee-row {
  position: relative;
  margin-bottom: 24px;
}

.marquee-row:last-child {
  margin-bottom: 0;
}

.marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
}

.marquee-row.right .marquee-track {
  animation: scrollRight 200s linear infinite;
}

.marquee-row.left .marquee-track {
  animation: scrollLeft 240s linear infinite;
}

.marquee-row:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes scrollRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.project-card {
  flex-shrink: 0;
  width: 360px;
  height: 270px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
  display: block;
  color: inherit;
  text-decoration: none;
  z-index: 1;
}

.project-card:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.project-card img,
.project-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  transform: translateY(100%);
  transition: var(--transition);
}

.project-card:hover .project-card-info {
  transform: translateY(0);
}

.project-card-category {
  font-size: 11px;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.project-card-title {
  font-size: 18px;
  font-weight: 700;
}

/* 边缘渐隐 */
.marquee-row::before,
.marquee-row::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee-row::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-dark), transparent);
}

.marquee-row::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-dark), transparent);
}

/* ========================================
   关于我
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 900px;
  margin: 0 auto;
}

.about-info h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.about-info .name {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}

.about-intro {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 32px;
}

.about-exp h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.exp-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  gap: 16px;
}

.exp-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exp-company {
  color: var(--text-primary);
}

.exp-position {
  font-size: 12px;
  color: var(--text-secondary);
}

.exp-item .period {
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.about-cta {
  text-align: center;
  margin-top: 48px;
}

/* ========================================
   服务
   ======================================== */
.services-list {
  max-width: 1000px;
  margin: 0 auto;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: var(--transition);
  color: inherit;
  text-decoration: none;
}

.service-item:hover {
  padding-left: 20px;
  background: linear-gradient(90deg, rgba(59,130,246,0.05), rgba(236,72,153,0.05));
}

.service-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-secondary);
  min-width: 80px;
  transition: var(--transition);
}

.service-item:hover .service-num {
  color: var(--accent-purple);
}

.service-info h4 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.service-info p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ========================================
   联系
   ======================================== */
.contact-section {
  text-align: center;
  padding-bottom: 60px;
}

.contact-email {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 24px 0;
  display: inline-block;
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 40px 0;
}

.contact-social a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
}

.contact-social a:hover {
  color: var(--accent-purple);
}

.copyright {
  color: var(--text-secondary);
  font-size: 12px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ========================================
   详情页
   ======================================== */
.detail-page,
.category-page {
  min-height: 100vh;
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.back-btn {
  position: fixed;
  top: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.back-btn:hover {
  background: var(--accent-purple);
  transform: scale(1.1);
}

.detail-header {
  text-align: center;
  margin-bottom: 60px;
}

.detail-category {
  font-size: 13px;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.detail-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
}

.detail-images {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-images img {
  width: 100%;
  border-radius: var(--radius);
  transition: var(--transition);
}

.detail-images img:hover {
  transform: scale(1.01);
}

/* ========================================
   分类页网格
   ======================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.category-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
  .nav {
    padding: 16px 20px;
    gap: 24px;
  }
  .nav a {
    font-size: 11px;
  }
  .signature {
    display: none;
  }
  .hero {
    padding: 100px 20px 60px;
  }
  .hero-content.hero-right {
    right: 5%; top: 50%;
  }
  .section {
    padding: 80px 20px;
  }
  .project-card {
    width: 280px;
    height: 210px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .service-item {
    gap: 20px;
    padding: 24px 0;
  }
  .service-num {
    font-size: 32px;
    min-width: 50px;
  }
  .service-info h4 {
    font-size: 18px;
  }
  .marquee-row::before,
  .marquee-row::after {
    width: 60px;
  }
  .detail-page,
  .category-page {
    padding: 80px 20px;
  }
  .category-grid {
    grid-template-columns: 1fr;
  }
  .back-btn {
    width: 60px;
    height: 60px;
    font-size: 13px;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
  }
}

/* ========================================
   分类页 & 详情页（三级页面）
   ======================================== */
.category-page,
.detail-page {
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
}

/* 返回按钮 */
.back-btn {
  position: fixed;
  top: 40px;
  left: 40px;
  z-index: 100;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.2;
}
.back-btn .back-arrow {
  font-size: 18px;
  line-height: 1;
}
.back-btn:hover {
  background: var(--accent-purple);
  transform: scale(1.05);
}

/* 分类页头部 */
.page-header {
  text-align: center;
  padding: 100px 24px 50px;
}
.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #fff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 15px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* 分类页作品网格 */
.project-grid {
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.project-grid .project-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: block;
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
  background: var(--bg-card);
}
.project-grid .project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.project-grid .project-card img,
.project-grid .project-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.project-grid .project-card:hover img,
.project-grid .project-card:hover video {
  transform: scale(1.05);
}
.project-grid .card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  font-size: 18px;
  font-weight: 600;
}

/* 详情页顶部宽屏 */
.detail-hero {
  width: 100%;
  position: relative;
  max-height: 75vh;
  overflow: hidden;
}
.detail-hero > div {
  width: 100%;
}
.detail-hero img,
.detail-hero video {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: cover;
  display: block;
}
.detail-hero .hero-text {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}
.detail-hero .hero-text h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin: 0 0 8px;
}
.detail-hero .hero-text p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* 详情页媒体网格 */
.detail-gallery {
  max-width: 1100px;
  margin: 50px auto 80px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.gallery-item {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  background: var(--bg-card);
  cursor: zoom-in;
}
.gallery-item:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
}

/* 占位图 */
.placeholder-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
  .back-btn {
    width: 90px;
    height: 90px;
    font-size: 18px;
    top: 20px;
    left: 20px;
  }
  .back-btn .back-arrow {
    font-size: 28px;
  }
  .page-header {
    padding: 80px 20px 40px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
  .detail-gallery {
    padding: 0 16px;
    gap: 16px;
  }
  .detail-hero .hero-text {
    bottom: 24px;
  }
}

/* 文件夹卡片样式 */
.folder-grid {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.folder-card .card-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.folder-card .folder-icon {
  font-size: 22px;
}
.folder-card .folder-count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: auto;
  background: rgba(255,255,255,0.1);
  padding: 2px 10px;
  border-radius: 20px;
}
.folder-card::after {
  content: "点击进入";
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent-purple);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}
.folder-card:hover::after {
  opacity: 1;
}

/* ========================================
   详情页子文件夹 & 面包屑
   ======================================== */
.breadcrumb {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 0 24px;
  font-size: 14px;
  color: var(--text-secondary);
}
.breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--accent-purple);
}
.breadcrumb .current {
  color: #fff;
}
.breadcrumb span {
  margin: 0 6px;
  opacity: 0.5;
}

.subfolders-section {
  max-width: 1100px;
  margin: 40px auto 20px;
  padding: 0 24px;
}
.subfolders-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px;
  color: #fff;
}
.subfolder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.subfolder-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: block;
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
  background: var(--bg-card);
  border: 2px solid rgba(139, 92, 246, 0.3);
}
.subfolder-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.3);
}
.subfolder-card img,
.subfolder-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.subfolder-card:hover img,
.subfolder-card:hover video {
  transform: scale(1.05);
}
.subfolder-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}
.subfolder-info .folder-icon {
  font-size: 20px;
}

@media (max-width: 768px) {
  .subfolder-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .breadcrumb {
    font-size: 13px;
    padding: 0 16px;
  }
}

/* ========================================
   详情页视频播放器
   ======================================== */
.gallery-item .video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.gallery-item .video-wrapper video {
  width: 100%;
  display: block;
}
.gallery-item .video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(139, 92, 246, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.gallery-item .video-wrapper:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--accent-purple);
}
@media (max-width: 768px) {
  .gallery-item .video-play-btn {
    width: 60px;
    height: 60px;
  }
}
