/**
 * ailimit.css — AI LIMIT 官网品牌样式
 *
 * 品牌色系：
 *   --al-dark:    #0a0a0a  (背景)
 *   --al-surface: #111111  (卡片/区块)
 *   --al-border:  #222222  (边框)
 *   --al-red:     #ff5555  (品牌红)
 *   --al-gold:    #ffd188  (品牌金)
 *   --al-gold-dark:#d9a93f (金色深)
 *   --al-text:    #cccccc  (正文)
 *   --al-text-dim:#666666  (辅助文字)
 *   --al-white:   #eeeeee  (标题)
 */

:root {
  --al-dark: #0a0a0a;
  --al-surface: #111111;
  --al-border: #222222;
  --al-red: #ff5555;
  --al-red-glow: #ff555540;
  --al-gold: #ffd188;
  --al-gold-dark: #d9a93f;
  --al-text: #cccccc;
  --al-text-dim: #666666;
  --al-white: #eeeeee;
}

/* ─── Base ─── */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--al-dark);
  color: var(--al-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
}

a {
  color: var(--al-text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--al-red);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 300;
  color: var(--al-white);
}

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

/* ─── Scroll anchor offset ─── */

[id] {
  scroll-margin-top: 80px;
}

/* ─── Navbar ─── */

.al-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
  transition: background 0.3s, box-shadow 0.3s;
}

.al-navbar.scrolled {
  background: rgba(5, 5, 5, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.al-navbar .navbar-brand img {
  height: 32px;
  width: auto;
}

.al-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
}

.al-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.al-navbar .nav-link {
  color: var(--al-white) !important;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1rem !important;
  transition: color 0.2s;
}

.al-navbar .nav-link:hover {
  color: var(--al-red) !important;
}

.al-navbar .nav-link.active {
  color: var(--al-red) !important;
}

.al-navbar .nav-link.disabled {
  color: #444 !important;
}

.al-nav-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.al-nav-social a {
  color: var(--al-text-dim);
  font-size: 1.1rem;
  transition: color 0.2s;
}

.al-nav-social a:hover {
  color: var(--al-red);
}

.al-nav-lang {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.al-nav-lang a {
  color: var(--al-text-dim);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
}

.al-nav-lang a:hover {
  color: var(--al-white);
}

.al-nav-lang a.active {
  color: var(--al-gold);
}

/* ─── Hero Section ─── */

.al-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.al-hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.al-hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100vh;
  min-width: 177.78vh; /* 16:9 */
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.al-hero-poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: opacity 0.8s;
}

.al-hero-poster.hidden {
  opacity: 0;
  pointer-events: none;
}

.al-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(10, 10, 10, 1) 100%
  );
  z-index: 2;
}

.al-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem;
}

.al-hero-logo {
  max-width: 400px;
  width: 70vw;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.8));
}

.al-hero-tagline {
  font-size: 1.1rem;
  color: var(--al-text);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.al-hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */

.al-btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  border: 1px solid var(--al-border);
  border-radius: 2px;
  background: rgba(10, 10, 10, 0.7);
  color: var(--al-white);
  transition: all 0.3s;
  backdrop-filter: blur(10px);
  min-width: 200px;
}

.al-btn:hover {
  color: var(--al-red);
  border-color: var(--al-red);
  box-shadow: 0 0 20px var(--al-red-glow);
}

.al-btn-gold {
  border-color: var(--al-gold-dark);
  color: var(--al-gold);
}

.al-btn-gold:hover {
  color: var(--al-gold);
  border-color: var(--al-gold);
  box-shadow: 0 0 20px rgba(255, 209, 136, 0.25);
}

.al-btn-sm {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  min-width: auto;
}

/* ─── Section Common ─── */

.al-section {
  padding: 5rem 0;
  position: relative;
}

.al-section-title {
  font-size: 2.2rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--al-white);
}

.al-section-subtitle {
  text-align: center;
  color: var(--al-text-dim);
  font-size: 0.95rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.al-divider {
  width: 60px;
  height: 1px;
  background: var(--al-red);
  margin: 1.5rem auto 3rem;
}

/* ─── World Section ─── */

.al-world {
  position: relative;
  overflow: hidden;
}

.al-world-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0.3;
}

.al-world-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.al-world-content h3 {
  font-size: 1.6rem;
  color: var(--al-gold);
  margin-bottom: 1.5rem;
}

.al-world-content p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--al-text);
}

/* ─── Character Cards ─── */

.al-character-card {
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.al-character-card:hover {
  border-color: var(--al-red);
  transform: translateY(-4px);
}

.al-character-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.al-character-card-body {
  padding: 1.25rem;
}

.al-character-card-body h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.al-character-card-body p {
  font-size: 0.85rem;
  color: var(--al-text-dim);
}

/* ─── Feature Cards ─── */

.al-feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: 4px;
  transition: border-color 0.3s;
}

.al-feature-card:hover {
  border-color: var(--al-gold-dark);
}

.al-feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.al-feature-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.al-feature-card p {
  font-size: 0.9rem;
  color: var(--al-text-dim);
  line-height: 1.6;
}

/* ─── News Cards ─── */

.al-news-card {
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.al-news-card:hover {
  border-color: var(--al-red);
  transform: translateY(-3px);
}

.al-news-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.al-news-card-body {
  padding: 1.25rem;
}

.al-news-card-body h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.al-news-card-body h4 a {
  color: var(--al-white);
}

.al-news-card-body h4 a:hover {
  color: var(--al-red);
}

.al-news-card-body p {
  font-size: 0.85rem;
  color: var(--al-text-dim);
  margin-bottom: 0;
}

/* ─── Community Section ─── */

.al-community-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: 4px;
  transition: border-color 0.3s, transform 0.3s;
  color: var(--al-text);
  text-decoration: none;
}

.al-community-link:hover {
  border-color: var(--al-red);
  transform: translateY(-3px);
  color: var(--al-white);
}

.al-community-icon {
  font-size: 2rem;
}

.al-community-label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Reviews Section ─── */

.al-review-card {
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: 4px;
  padding: 2rem;
  position: relative;
}

.al-review-card::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--al-red);
  opacity: 0.3;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  line-height: 1;
}

.al-review-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--al-text);
  font-style: italic;
  margin-bottom: 1rem;
  padding-top: 1rem;
}

.al-review-author {
  font-size: 0.8rem;
  color: var(--al-text-dim);
}

.al-review-stars {
  color: var(--al-gold);
  margin-bottom: 0.75rem;
}

/* ─── Buy Section ─── */

.al-buy-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: 4px;
  transition: border-color 0.3s;
}

.al-buy-platform:hover {
  border-color: var(--al-gold-dark);
}

.al-buy-platform-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--al-white);
}

/* ─── Gallery Section ─── */

.al-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.5rem;
}

.al-gallery-item {
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
}

.al-gallery-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s;
}

.al-gallery-item:hover img {
  transform: scale(1.05);
}

/* ─── Carousel (Bootstrap 5 overrides) ─── */

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 0;
  transition: opacity 0.3s;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
  opacity: 0.7;
}

/* ─── Footer ─── */

.al-footer {
  background: #050505;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--al-border);
}

.al-footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.al-footer-links a {
  color: var(--al-text-dim);
  font-size: 0.8rem;
  transition: color 0.2s;
}

.al-footer-links a:hover {
  color: var(--al-text);
}

.al-footer-copyright {
  text-align: center;
  color: #444;
  font-size: 0.75rem;
}

.al-footer-social {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.al-footer-social a img {
  width: 32px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.al-footer-social a:hover img {
  opacity: 1;
}

/* ─── Scroll Animations ─── */

.al-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.al-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.al-fade-in-delay-1 { transition-delay: 0.1s; }
.al-fade-in-delay-2 { transition-delay: 0.2s; }
.al-fade-in-delay-3 { transition-delay: 0.3s; }
.al-fade-in-delay-4 { transition-delay: 0.4s; }

/* ─── Leaderboard ─── */

.al-leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.al-leaderboard-table th {
  background: var(--al-surface);
  color: var(--al-text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--al-border);
}

.al-leaderboard-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--al-border);
  font-size: 0.9rem;
}

.al-leaderboard-table tbody tr:hover {
  background: rgba(255, 85, 85, 0.05);
}

.al-rank-1 { color: var(--al-gold); font-weight: 700; }
.al-rank-2 { color: #c0c0c0; font-weight: 600; }
.al-rank-3 { color: #cd7f32; font-weight: 600; }

/* ─── News View ─── */

.al-news-view {
  max-width: 800px;
  margin: 120px auto 60px;
  padding: 0 1.5rem;
}

.al-news-view h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.al-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--al-text);
}

.al-content h3 {
  font-size: 1.5rem;
  color: var(--al-gold);
  margin: 2rem 0 1rem;
}

.al-content h4 {
  font-size: 1.2rem;
  color: #9dbacf;
  margin: 1.5rem 0 0.75rem;
}

.al-content img {
  display: block;
  max-width: 100%;
  margin: 1.5rem auto;
  border-radius: 4px;
}

/* ─── Auth Pages ─── */

.al-auth-container {
  max-width: 420px;
  margin: 120px auto 60px;
  padding: 0 1rem;
}

.al-auth-box {
  border: 1px solid var(--al-border);
  padding: 2rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
}

.al-auth-box h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ─── Media Queries ─── */

@media (max-width: 767px) {
  .al-hero {
    min-height: 500px;
  }

  .al-hero-logo {
    max-width: 250px;
  }

  .al-hero-tagline {
    font-size: 0.85rem;
  }

  .al-hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .al-btn {
    width: 100%;
    max-width: 300px;
  }

  .al-section {
    padding: 3rem 0;
  }

  .al-section-title {
    font-size: 1.6rem;
  }

  .al-navbar .nav-link {
    padding: 0.5rem 1rem !important;
  }

  .al-gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .al-hero-logo {
    max-width: 350px;
  }

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

@media (min-width: 1200px) {
  .al-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
