/* ===== 电竞IP衍生品商城 - 全局样式 ===== */
/* Mobile-First Design */

:root {
  --color-primary: #FF4655;
  --color-secondary: #0AC8B9;
  --color-dark: #333333;
  --color-light: #FFFFFF;
  --color-gray: #F5F5F5;
  --color-border: #E0E0E0;
  --color-text: #333333;
  --color-text-light: #666666;
  --font-main: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header & Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-light);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

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

.site-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

.site-logo span {
  color: var(--color-dark);
}

.nav-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  margin: 5px 0;
  transition: var(--transition);
}

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-light);
  border-bottom: 1px solid var(--color-border);
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.main-nav.active {
  display: block;
}

.main-nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-nav a {
  display: block;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
  background: rgba(255, 70, 85, 0.05);
}

/* ===== Hero Section ===== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 60px 0;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--color-light);
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btn {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.hero-btn:hover {
  background: #e63e4d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 70, 85, 0.4);
}

/* ===== Section Common ===== */
.section {
  padding: 48px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

/* ===== IP Category Grid ===== */
.ip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.ip-card {
  background: var(--color-gray);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}

.ip-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.ip-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.ip-card-title {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ===== Team Section ===== */
.team-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.team-card {
  flex: 0 0 200px;
  background: var(--color-gray);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  box-shadow: var(--shadow-md);
}

.team-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: var(--color-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

.team-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.team-game {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.product-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.product-info {
  padding: 12px;
}

.product-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.product-price-original {
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-decoration: line-through;
  margin-left: 6px;
}

.product-tag {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
}

/* ===== Blind Box Section ===== */
.blindbox-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 48px 0;
  color: white;
  text-align: center;
}

.blindbox-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.blindbox-desc {
  opacity: 0.9;
  margin-bottom: 24px;
}

.blindbox-btn {
  display: inline-block;
  background: white;
  color: #764ba2;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
}

.blindbox-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ===== Fan Gallery ===== */
.fan-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fan-item {
  aspect-ratio: 1;
  background: var(--color-gray);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-text-light);
}

/* ===== Video Section ===== */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== Auth Badge ===== */
.auth-banner {
  background: var(--color-gray);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin: 32px 0;
}

.auth-banner-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-dark);
}

.auth-banner-desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.auth-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.auth-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.auth-badge-icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.8);
  padding: 40px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-size: 0.85rem;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  opacity: 1;
  color: var(--color-primary);
}

.footer-contact p {
  font-size: 0.85rem;
  margin-bottom: 8px;
  opacity: 0.8;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ===== Page Header (Inner Pages) ===== */
.page-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
  padding: 48px 0;
  color: white;
  text-align: center;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  opacity: 0.8;
  font-size: 0.95rem;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.breadcrumb a {
  color: var(--color-primary);
}

.breadcrumb span {
  margin: 0 8px;
}

/* ===== Category Filter ===== */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0;
  -webkit-overflow-scrolling: touch;
}

.filter-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ===== Account Page ===== */
.account-section {
  padding: 32px 0;
}

.account-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.account-tab {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.account-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.order-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.order-status {
  color: var(--color-secondary);
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .nav-toggle {
    display: none;
  }

  .main-nav {
    display: block;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .main-nav ul {
    flex-direction: row;
    gap: 4px;
  }

  .main-nav a {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .hero-section {
    padding: 80px 0;
    min-height: 500px;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .section {
    padding: 64px 0;
  }

  .ip-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .fan-gallery {
    grid-template-columns: repeat(6, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.2rem;
  }

  .ip-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ===== Lazy Load Placeholder ===== */
.lazy-img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-img.loaded {
  opacity: 1;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
