/* === VARIABLES === */
:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --border: #2a2a3a;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --accent: #c9a227;
  --accent-glow: rgba(201, 162, 39, 0.3);

  /* Faction colors */
  --plains-primary: #4a9f4a;
  --plains-secondary: #3d8b3d;
  --plains-glow: rgba(74, 159, 74, 0.3);

  --desert-primary: #d4923a;
  --desert-secondary: #b87a2f;
  --desert-glow: rgba(212, 146, 58, 0.3);
}

/* === RESET === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === BASE === */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === BACKGROUND === */
.background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(74, 159, 74, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(212, 146, 58, 0.05) 0%, transparent 50%),
    var(--bg-dark);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 0%, transparent 70%);
}

/* === CONTAINER === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 0;
}

.hero-logo {
  margin-bottom: 32px;
}

.hero-logo-img {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  box-shadow:
    0 0 60px var(--accent-glow),
    0 20px 60px rgba(0, 0, 0, 0.5);
  animation: logo-float 4s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.hero-logo-img:hover {
  transform: scale(1.05) rotate(2deg);
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 32px;
}

.badge-icon {
  font-size: 1rem;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  line-height: 0.9;
  margin-bottom: 16px;
}

.title-top {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--text-muted);
  letter-spacing: 0.3em;
}

.title-main {
  display: block;
  font-size: clamp(4rem, 12vw, 8rem);
  background: linear-gradient(180deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 60px var(--accent-glow);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  letter-spacing: 0.1em;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(74, 159, 74, 0.1);
  border: 1px solid rgba(74, 159, 74, 0.3);
  border-radius: 8px;
  margin-bottom: 40px;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--plains-primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--plains-glow); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px transparent; }
}

.status-label {
  font-size: 0.9rem;
  color: var(--plains-primary);
  font-weight: 500;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--accent) 0%, #b8911f 100%);
  color: #0a0a0f;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.hero-cta svg {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* === SECTIONS === */
section {
  padding: 80px 0;
}

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

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
}

/* === FACTIONS === */
.factions-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .factions-grid {
    grid-template-columns: 1fr;
  }
}

.faction-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.faction-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.faction-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.plains .card-accent {
  background: linear-gradient(90deg, var(--plains-primary), var(--plains-secondary));
}

.desert .card-accent {
  background: linear-gradient(90deg, var(--desert-primary), var(--desert-secondary));
}

.card-inner {
  padding: 32px;
}

.faction-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.plains .faction-icon svg {
  stroke: var(--plains-primary);
}

.desert .faction-icon svg {
  stroke: var(--desert-primary);
}

.faction-name {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.plains .faction-name {
  color: var(--plains-primary);
}

.desert .faction-name {
  color: var(--desert-primary);
}

.faction-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* Stats */
.faction-stats {
  margin-bottom: 24px;
}

.stat {
  margin-bottom: 12px;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.stat-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.plains .stat-fill {
  background: linear-gradient(90deg, var(--plains-primary), var(--plains-secondary));
}

.desert .stat-fill {
  background: linear-gradient(90deg, var(--desert-primary), var(--desert-secondary));
}

/* Perks */
.faction-perks {
  list-style: none;
}

.faction-perks li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.faction-perks li:last-child {
  border-bottom: none;
}

.faction-perks li::before {
  content: '+';
  position: absolute;
  left: 0;
  font-weight: 600;
}

.plains .faction-perks li::before {
  color: var(--plains-primary);
}

.desert .faction-perks li::before {
  color: var(--desert-primary);
}

/* VS Separator */
.vs-separator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

@media (max-width: 900px) {
  .vs-separator {
    flex-direction: row;
    padding: 0 20px;
  }
}

.vs-line {
  flex: 1;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
}

@media (max-width: 900px) {
  .vs-line {
    height: 2px;
    width: auto;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
  }
}

.vs-badge {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 50%;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* === DOWNLOAD === */
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.download-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.download-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.download-icon {
  font-size: 2.5rem;
}

.download-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.download-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.download-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 500px) {
  .download-buttons {
    grid-template-columns: 1fr;
  }
}

.btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #b8911f 100%);
  color: #0a0a0f;
}

.btn-primary:hover {
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--text-muted);
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon svg {
  width: 24px;
  height: 24px;
}

.btn-text strong {
  display: block;
  font-size: 1rem;
}

.btn-text span {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Requirements */
.requirements {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.req {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.req-icon {
  font-size: 1rem;
}

.req-divider {
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
}

@media (max-width: 500px) {
  .req-divider {
    display: none;
  }
  .requirements {
    flex-direction: column;
  }
}

/* === FEATURES === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 800px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === FOOTER === */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.brand-name {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.footer-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* === SELECTION === */
::selection {
  background: var(--accent);
  color: var(--bg-dark);
}
