/* ==========================================
   1. THEME VARIABLES (GLOBAL)
   ========================================== */
:root {
  /* Default: Dark Mode */
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --bg-sidebar: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --border-color: #334155;
  --input-bg: #0f172a;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent-yellow: #f59e0b;
  --accent-green: #10b981;
  --discord-purple: #5865f2;
  --border-radius: 16px;
}

[data-theme="light"] {
  /* Overrides: Light Mode */
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --input-bg: #ffffff;
}

/* ==========================================
   2. CORE BASE STYLES
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Quicksand', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .brand-name {
  font-family: 'Fredoka', sans-serif;
  color: var(--text-main);
}

p, span, li, label {
  color: var(--text-muted);
}

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

/* ==========================================
   3. HEADER & NAVIGATION
   ========================================== */
.navbar {
  background-color: var(--bg-sidebar);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 700;
}

.brand-logo {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a:not(.btn-discord) {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  transition: color 0.15s;
}

.nav-links a:not(.btn-discord):hover, 
.nav-links a.active {
  color: var(--primary);
}

.btn-discord {
  background-color: var(--discord-purple);
  color: #ffffff !important;
  padding: 8px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
}

/* ==========================================
   4. HERO SECTIONS
   ========================================== */
.hero {
  background-color: #3b82f6;
  color: #ffffff;
  padding: 72px 24px;
  text-align: center;
}

.badge {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 3rem;
  margin: 16px 0 12px 0;
  color: #ffffff;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 32px auto;
  color: #ffffff;
  opacity: 0.95;
}

.server-ip-box {
  background: var(--bg-card);
  color: var(--text-main);
  border: 2px solid var(--border-color);
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 20px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ip-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.ip-info .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.ip-info .ip {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  color: var(--text-main);
}

.btn-copy {
  background-color: var(--accent-green);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
}

/* Support Hero Specifics */
.support-hero {
  background: #0f172a;
  color: #ffffff;
  text-align: center;
  padding: 56px 24px;
}

.support-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
  color: #ffffff;
}

.support-hero p {
  color: #94a3b8;
  font-size: 1.1rem;
}

/* ==========================================
   5. GAMES & CARDS GRID
   ========================================== */
.section {
  padding: 64px 0;
}

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

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 24px;
  border: 2px solid var(--border-color);
}

.game-badge {
  display: inline-block;
  background-color: var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* ==========================================
   6. SUPPORT PAGE & RULES WRAPPER
   ========================================== */
.support-container {
  padding-top: 40px;
  padding-bottom: 60px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.support-card {
  background-color: var(--bg-card);
  padding: 28px;
  border-radius: var(--border-radius);
  text-decoration: none;
  border: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.3s ease;
}

.support-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

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

.support-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.support-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-link {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Dynamic Rules Styling Fixes */
.rules-wrapper, 
.rules-container, 
.rules-card {
  background-color: var(--bg-card);
  padding: 36px;
  border-radius: var(--border-radius);
  border: 2px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.rules-wrapper h2, 
.rules-wrapper h1, 
.rules-container h2, 
.rules-card h2 {
  font-size: 1.8rem;
  color: var(--text-main);
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.rule-box {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  align-items: flex-start;
}

.rule-num {
  background: var(--primary);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  flex-shrink: 0;
}

.rule-details h4 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.rule-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ==========================================
   7. FORM INPUTS & FOOTER
   ========================================== */
input, textarea, select {
  background-color: var(--input-bg);
  color: var(--text-main);
  border: 2px solid var(--border-color);
  font-family: inherit;
}

footer {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Careers Page Specific Contrast Fixes */
.req-box {
  background-color: var(--bg-body) !important;
  border-left: 4px solid var(--primary) !important;
}

.req-box strong {
  color: var(--text-main) !important;
}

.req-box ul li {
  color: var(--text-muted) !important;
}

/* Ensure Form Inputs Match Card Theme */
.form-group input, 
.form-group textarea {
  background-color: var(--input-bg) !important;
  color: var(--text-main) !important;
  border: 2px solid var(--border-color) !important;
}

/* Fix Unselected Role Buttons */
.role-btn {
  background-color: var(--bg-body) !important;
  color: var(--text-main) !important;
  border: 2px solid var(--border-color) !important;
}

.role-btn.active {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
}



/* ==========================================
   MOBILE & RESPONSIVE LAYOUT FIXES
   ========================================== */

/* Prevent page-wide horizontal scroll overflow */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* 3-Card Grid Centering Trick */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Span 3rd game card across full width and center text */
.game-card-centered {
  grid-column: 1 / -1;
  max-width: 550px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

/* Mobile Screen Breakpoints (Phones & Small Displays) */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
    font-size: 0.9rem;
  }

  .hero {
    padding: 40px 16px;
    width: 100%;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .server-ip-box {
    width: 100%;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .ip-info {
    text-align: center;
  }

  .games-grid {
    grid-template-columns: 1fr; /* Stack game cards vertically on mobile screens */
  }

  .game-card-centered {
    grid-column: auto;
    max-width: 100%;
  }
}

