/* =============================================================================
   ID ETKİNLİK CLUB — DESIGN SYSTEM & ULTRA RESPONSIVE THEME (PWA, TWA, PC, TABLET)
   ============================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #090913;
  --bg-surface: #0f0f1e;
  --bg-card: rgba(22, 22, 42, 0.85);
  --bg-card-hover: rgba(32, 32, 60, 0.95);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 158, 11, 0.4);
  
  --gold: #f59e0b;
  --gold-light: #fde68a;
  --gold-glow: 0 0 25px rgba(245, 158, 11, 0.35);
  
  --team-red: #ef4444;
  --team-blue: #3b82f6;
  --team-gold: #eab308;
  --team-green: #10b981;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --bottom-nav-height: 72px;
}

/* -------------------------------------------------------------
   1. SIFIR TAŞMA & EVRENSEL BOYUTLANDIRMA (ZERO OVERFLOW)
   ------------------------------------------------------------- */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

*, *:before, *:after {
  box-sizing: inherit;
  max-width: 100%;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(217, 119, 6, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

p, span, div, h1, h2, h3, h4, h5, h6, a, button {
  overflow-wrap: break-word;
  word-break: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--gold-light);
}

/* -------------------------------------------------------------
   2. GLASSMORPHISM VE KAPSAYICI PANELLER
   ------------------------------------------------------------- */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  width: 100%;
  overflow: hidden;
}

.glass-panel-gold {
  background: linear-gradient(135deg, rgba(30, 25, 45, 0.92) 0%, rgba(20, 18, 32, 0.96) 100%);
  border: 1px solid var(--border-gold);
  box-shadow: var(--gold-glow);
  width: 100%;
  overflow: hidden;
}

/* -------------------------------------------------------------
   3. BUTONLAR & DOKUNMATİK ALANLAR (TOUCH FRIENDLY)
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: normal;
}
.btn:active {
  transform: scale(0.97);
}

.btn-sm {
  min-height: 38px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  color: #0f172a;
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.btn-team-red {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-team-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* -------------------------------------------------------------
   4. ROZETLER & İNDİKATÖRLER
   ------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}
.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-immunity {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

/* -------------------------------------------------------------
   5. MOBİL & DESKTOP NAVİGASYON (RESPONSIVE NAVBAR)
   ------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 12px clamp(14px, 3vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
}
.nav-brand img {
  width: clamp(34px, 5vw, 44px);
  height: clamp(34px, 5vw, 44px);
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.4));
}
.nav-desktop {
  display: flex;
  align-items: center;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}
.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
}
.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}
.btn-hamburger {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

/* Mobil Çekmece Menü (Drawer) */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}
.mobile-drawer.open {
  display: flex;
}
.mobile-drawer-content {
  width: min(84vw, 320px);
  height: 100%;
  background: rgba(14, 13, 26, 0.98);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid var(--border-gold);
  box-shadow: -10px 0 30px rgba(0,0,0,0.8);
  animation: slideDrawer 0.25s ease-out;
}
@keyframes slideDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-glass);
}
.btn-close-drawer {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}
.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}
.mobile-nav-links a:hover, .mobile-nav-links a:active {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
}

@media (max-width: 860px) {
  .nav-desktop {
    display: none;
  }
  .nav-mobile-actions {
    display: flex;
  }
}

/* -------------------------------------------------------------
   6. PWA & TWA MOBİL ALT MENÜ (BOTTOM NAVIGATION)
   ------------------------------------------------------------- */
.pwa-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 1000;
  background: rgba(13, 13, 26, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  padding: 6px 4px max(10px, var(--safe-bottom));
  box-sizing: border-box;
}
.pwa-nav-item {
  flex: 1;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.2s ease;
}
.pwa-nav-item i {
  font-size: 19px;
  transition: transform 0.2s ease;
}
.pwa-nav-item.active {
  color: var(--gold);
}
.pwa-nav-item.active i {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.7));
}
.pwa-nav-item:active {
  transform: scale(0.93);
}

/* -------------------------------------------------------------
   7. FORM ELEMANLARI (IOS ZOOM FIX & FULL TOUCH)
   ------------------------------------------------------------- */
.form-group {
  margin-bottom: 16px;
  width: 100%;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: rgba(15, 15, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px !important; /* iOS Safari otomatik zoom'u engeller */
  min-height: 48px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
  background: rgba(22, 22, 45, 0.95);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* -------------------------------------------------------------
   8. DEV EKRAN CANLI YARIŞ VE PODYUM (FLUID & MOBILE FRIENDLY)
   ------------------------------------------------------------- */
.stage-container {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(14px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}
.race-bar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 6px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  width: 100%;
}
.race-bar-fill {
  min-height: clamp(48px, 6vw, 62px);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(10px, 2vw, 20px);
  font-weight: 800;
  font-size: clamp(14px, 2.5vw, 22px);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  max-width: 100%;
}
.race-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shine 2s infinite;
}

/* Responsive Podyum */
.podium-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 2vw, 20px);
  margin-top: 30px;
  width: 100%;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}
.podium-pillar {
  flex: 1;
  min-width: 0;
  text-align: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: clamp(10px, 2vw, 20px) clamp(6px, 1vw, 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.5s ease;
}
.podium-1 {
  height: clamp(170px, 28vh, 230px);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.35) 0%, rgba(20, 18, 35, 0.95) 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.4);
}
.podium-2 {
  height: clamp(130px, 22vh, 175px);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.25) 0%, rgba(20, 18, 35, 0.95) 100%);
  border: 2px solid #94a3b8;
}
.podium-3 {
  height: clamp(105px, 17vh, 140px);
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.25) 0%, rgba(20, 18, 35, 0.95) 100%);
  border: 2px solid #b45309;
}

/* -------------------------------------------------------------
   9. ÇARKI FELEK (ROULETTE WHEEL) RESPONSIVE
   ------------------------------------------------------------- */
.wheel-container {
  position: relative;
  width: min(84vw, 420px);
  height: min(84vw, 420px);
  max-width: 420px;
  max-height: 420px;
  margin: 0 auto;
}
.wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.3), inset 0 0 25px rgba(0,0,0,0.8);
  border: clamp(4px, 1.5vw, 8px) solid #f59e0b;
}
.wheel-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 30px solid #ef4444;
  z-index: 10;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}

/* -------------------------------------------------------------
   10. GRID VE FLEKS UTILITY SINIFLARI
   ------------------------------------------------------------- */
.grid-responsive-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  width: 100%;
}
.grid-responsive-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  width: 100%;
}
.grid-responsive-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 12px;
  width: 100%;
}
.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  width: 100%;
}

/* -------------------------------------------------------------
   11. MODERATÖR KOKPİTİ — TEK EKRAN & SIFIR DİKEY KAYDIRMA (ZERO SCROLL)
   ------------------------------------------------------------- */
.cockpit-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: 46px;
  padding: 0 clamp(12px, 2vw, 20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.cockpit-screen-wrap {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 8px 12px;
  box-sizing: border-box;
}
.cockpit-panel {
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.5);
}
.cockpit-panel::-webkit-scrollbar {
  width: 4px;
}
.cockpit-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.cockpit-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cockpit-panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (min-width: 1024px) {
  html:has(.cockpit-screen-wrap), body:has(.cockpit-screen-wrap) {
    overflow: hidden !important;
    height: 100vh !important;
    max-height: 100vh !important;
  }
  .cockpit-screen-wrap {
    height: calc(100vh - 46px);
    max-height: calc(100vh - 46px);
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px 14px 4px;
  }
  .cockpit-grid {
    grid-template-columns: 1.15fr 1.1fr 0.95fr;
    gap: 10px;
    flex: 1;
    align-items: stretch;
    min-height: 0;
  }
  .cockpit-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
  }
}

/* Küçük Ekran İnce Ayarları (iPhone SE / Galaxy Z Flip vb. < 380px) */
@media (max-width: 380px) {
  .btn {
    padding: 10px 14px;
    font-size: 14px;
  }
  .glass-panel {
    border-radius: var(--radius-md);
  }
}
