:root {
  --bg-deep: #07090e;
  --bg-dark: #0d121d;
  --bg-surface: #141b2a;
  --bg-surface-hover: #1c263b;
  --border-color: #26334d;
  --border-glow: rgba(245, 158, 11, 0.4);
  --accent-gold: #f59e0b;
  --accent-gold-light: #fef08a;
  --accent-cyan: #06b6d4;
  --accent-red: #ef4444;
  --yt-red: #ff0000;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ================= ÜST MENÜ ================= */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 18, 29, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-glow {
  font-family: 'Bungee', cursive;
  font-size: 1.3rem;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff 30%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  background: var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  gap: 1.2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.yt-link {
  color: #f87171 !important;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-lang {
  background: #1e293b;
  border: 1px solid #334155;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  border: 1px solid var(--border-color);
}

.user-role-badge.vip {
  background: var(--accent-gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
}

.btn {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: #1e293b;
  color: #fff;
  border: 1px solid var(--accent-cyan);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* ================= 1. STRICT VIP GATE (GİRİŞ KAPISI) ================= */
.vip-gate-screen {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at 50% 30%, #1e2942 0%, #07090e 90%);
}

.vip-gate-card {
  background: linear-gradient(145deg, #131b2c, #0a0f19);
  border: 2px solid var(--accent-gold);
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.gate-badge {
  display: inline-block;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.vip-gate-card h1 {
  font-family: 'Bungee', cursive;
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  color: #fff;
}

.gate-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 2.5rem auto;
}

.gate-steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.gate-step {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 1.8rem 1.4rem;
  position: relative;
  text-align: center;
}

.gate-step.gold-glow {
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, #1a233a 0%, #111827 100%);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.2);
}

.step-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #374151;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 12px;
}

.step-badge.gold {
  background: var(--accent-gold);
  color: #000;
}

.step-ico {
  font-size: 2.8rem;
  margin: 0.8rem 0;
}

.gate-step h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.gate-step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.4;
}

.btn-yt-gate {
  background: var(--yt-red);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 20px;
  display: inline-block;
}

.btn-gold-gate {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 20px;
  display: inline-block;
}

.btn-action-gate {
  background: #3b82f6;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
}

.gate-login-prompt {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-login-gate {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
}

/* ================= 2. UNLOCKED PORTAL (HERO & OYUNLAR) ================= */
#hero-banner {
  padding: 4rem 1.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, #1e2942 0%, #07090e 85%);
}

.hero-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: 'Bungee', cursive;
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 0.8rem;
  color: #fff;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 2rem auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-giant-gold {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 25px;
}

.btn-giant-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-color);
  color: #fff;
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: 25px;
}

/* Oyun Kartları */
.section-box {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent-gold);
  display: block;
}

.section-header h2 {
  font-family: 'Bungee', cursive;
  font-size: 2rem;
  margin-top: 4px;
}

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

.game-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-card.featured-game {
  border-color: var(--accent-gold);
}

.card-media {
  height: 200px;
  position: relative;
  background: #090e18;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-art-countrywars {
  text-align: center;
  background: radial-gradient(circle, #2a1538 0%, #0d121d 80%);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.art-shield {
  font-size: 3.5rem;
}

.art-flags {
  font-size: 1rem;
  letter-spacing: 2px;
  margin-top: 6px;
  color: var(--accent-cyan);
  font-weight: 800;
}

.card-art-map {
  background: radial-gradient(circle, #102a3a 0%, #0d121d 80%);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.game-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.game-badge.blue {
  background: #0284c7;
}

.vip-status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.game-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  flex: 1;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.8rem;
  margin-bottom: 1.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-play-game {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  border: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  display: block;
}

.btn-play-game.disabled {
  background: #1e293b;
  color: #64748b;
  cursor: not-allowed;
}

/* Footer */
#main-footer {
  border-top: 1px solid var(--border-color);
  background: #090d16;
  padding: 2rem 1.5rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

/* Modallar */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.90);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hidden {
  display: none !important;
}

.modal-box {
  background: #131926;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  margin: auto;
  box-sizing: border-box;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.15);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.modal-header {
  margin-bottom: 1.3rem;
  text-align: center;
}

.modal-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 0.3rem;
}

.input-group {
  margin-bottom: 1.2rem;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.input-group input, .input-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: #090e18;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
}

.btn-modal-submit, .btn-modal-gold {
  width: 100%;
  padding: 12px;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-modal-submit {
  background: linear-gradient(135deg, #0284c7, #2563eb);
}

.btn-modal-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
}

.modal-footer-note {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* ================= MOBİL UYUMLULUK (MEDIA QUERIES) ================= */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .vip-gate-card {
    padding: 1.5rem 1rem;
    border-radius: 18px;
  }
  .vip-gate-card h1 {
    font-size: 1.5rem;
  }
  .gate-steps-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .gate-login-prompt {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
  }

  /* MODAL ASLA YUKARI TAŞMAZ & TAM KONTROL SAĞLAR */
  .modal-backdrop {
    align-items: flex-start;
    padding: 10px 8px;
  }
  .modal-box {
    padding: 1.4rem 1.1rem;
    border-radius: 16px;
    margin-top: 8px;
    margin-bottom: 20px;
    max-height: calc(100dvh - 16px);
  }
  .modal-header h2 {
    font-size: 1.25rem;
  }
  .modal-header p {
    font-size: 0.8rem;
  }
  .input-group {
    margin-bottom: 0.85rem;
  }
  .input-group input, .input-group textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  .btn-modal-submit, .btn-modal-gold {
    padding: 12px;
    font-size: 1.05rem;
  }
  .modal-close {
    top: 10px;
    right: 10px;
  }
}

@media (max-height: 550px) and (orientation: landscape) {
  .modal-backdrop {
    align-items: flex-start;
    padding: 8px 10px;
  }
  .modal-box {
    margin-top: 5px;
    padding: 1rem 1.2rem;
    max-height: 94dvh;
  }
  .modal-header {
    margin-bottom: 0.7rem;
  }
  .input-group {
    margin-bottom: 0.6rem;
  }
}
