/* =========================================================
   ICEFAME PREMIUM THEME — LIGHT & DARK MODE SUPPORT
   ========================================================= */

/* ========== ROOT VARIABLES ========== */
:root {
  --bg: #ffffff;
  --card: #f9fafb;
  --text: #0f172a;
  --muted: #4b5563;
  --accent: #1da1f2;
  --accent-2: #ff6b00;
  --line: #e5e7eb;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --max-width: 1200px;
  --gold: #facc15;
  color-scheme: light;
  font-family: "Inter", "Poppins", system-ui, sans-serif;
  scroll-behavior: smooth;
}

/* Dark theme override */
[data-theme="dark"] {
  --bg: #0b0b0d;
  --card: #141519;
  --text: #f9fafb;
  --muted: #9ca3af;
  --accent: #1da1f2;
  --accent-2: #ff6b00;
  --line: #23242a;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ========== GLOBAL STYLES ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== HEADER ========== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] header {
  background: rgba(11, 11, 13, 0.9);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 44px;
  width: 44px;
}

.brand h1 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 2px;
}

.tagline {
  font-size: 13px;
  color: var(--muted);
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a.active,
nav a:hover {
  color: var(--accent);
}

.active {
  color: #1DA1F2 !important;
  /* Icefame Blue Highlight */
  position: relative;
  font-weight: 600;
  transition: all 0.3s ease;
}

.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, #1DA1F2, #ff6b00);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(29, 161, 242, 0.4);
}

.secttitle {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.btn {
  background: #ff6b00;
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btnB {
  background: #ff6b00;
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin-top: 20px;
  margin-bottom: 20px;
}

.primary-btn {
  background: #1da1f2;
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin-top: 20px;
  margin-bottom: 20px;
}

.btn:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease;
}
.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease;
  margin-top: 20px;
  margin-bottom: 20px;
}

.ghost:hover {
  background: var(--accent);
  color: #fff;
}

/* ========== HERO SECTION ========== */
.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 60px;
  padding: 80px 0;
  background: linear-gradient(135deg, var(--bg), var(--card));
}

.hero-content {
  animation: fadeIn 1s ease forwards;
}

.kicker {
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.hero-intro h1 {
  font-size: 2.5rem;
  margin-bottom: 18px;
  color: var(--text);
  line-height: 1.3;
}

.hero-intro .lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 26px;
  max-width: 550px;
}

.hero-highlights {
  list-style: none;
  margin-bottom: 32px;
}

.hero-highlights li {
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 30px;
}

.stat h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.stat p {
  color: var(--muted);
  font-size: 14px;
}

/* Spotlight / Right Side */
.hero-spotlight {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  animation: slideIn 1.2s ease forwards;
}

.battle-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
}

.battle-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.battle-header .avatar {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.battle-meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thread-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, background 0.2s ease;
}

.thread-item:hover {
  transform: translateY(-3px);
  background: var(--card);
}

.votes {
  font-weight: 600;
  color: var(--accent);
}

.hero-footer-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ========== HOW IT WORKS ========== */
.how-it-works {
  padding: 80px 0;
  text-align: center;
}

.how-it-works h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: var(--text);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.step {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 0.3s ease;
}

.step:hover {
  transform: translateY(-4px);
}

.step-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

/* ========== FEATURES ========== */
.feature {
  padding: 80px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.feature-text h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-text p {
  color: var(--muted);
  margin-bottom: 18px;
}

.feature-text ul li {
  margin-bottom: 8px;
}

.feature-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature.alt .feature-grid {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 850px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== FOR FANS & BRANDS ========== */
.for-fans,
.for-brands {
  text-align: center;
  padding: 80px 20px;
  border-radius: var(--radius);
  position: relative;
  background: linear-gradient(145deg, var(--card), var(--bg));
  box-shadow: var(--shadow);
  margin: 60px auto;
  max-width: 900px;
}

.for-fans h2,
.for-brands h2 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.for-fans p,
.for-brands p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 20px;
}

.for-fans:hover::before,
.for-brands:hover::before {
  opacity: 1;
  transform: scale(1.1);
}

/* ========== CTA SECTION ========== */
.cta-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 60px 40px;
  border-radius: var(--radius);
  margin: 80px 0;
  flex-wrap: wrap;
}

.cta-hero h3 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.cta-hero p {
  max-width: 500px;
}

.cta-hero .btn {
  background: #fff;
  color: var(--accent-2);
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--card);
  padding: 60px 20px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  position: relative;
  overflow: hidden;
}

/* Decorative glow behind footer */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, var(--accent)10%, transparent 70%);
  opacity: 0.05;
  pointer-events: none;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px;
  max-width: var(--max-width, 1200px);
  margin: 0 auto 40px;
}

.footer-col h3 {
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 18px;
}

.footer-col p {
  font-size: 15px;
  line-height: 1.7;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass);
  color: var(--accent);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.legal-links {
  display: flex;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-links a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 600px) {
  .footer-container {
    gap: 30px;
  }

  .footer-col h3 {
    font-size: 16px;
  }

  .social-icons a {
    width: 32px;
    height: 32px;
  }
}


/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .cta-hero {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
}

/* Smooth global color transitions for all themed elements */
body,
header,
.hero,
.feature,
.for-fans,
.for-brands,
.site-footer,
.step,
.battle-card,
.thread-item,
.cta-hero,
.feature-text,
.feature-image img {
  transition:
    background 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}

html::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

html[data-theme="dark"]::before {
  opacity: 0.1;
}