/**
 * ====================================================================
 * TEKNOKAŞİFLER AKADEMİSİ - MODERN TEKNOLOJİ KAMPÜSÜ TASARIM SİSTEMİ
 * ====================================================================
 * Google Fonts (Outfit & Plus Jakarta Sans), Glassmorphism, Neon Tech Glow,
 * 60 FPS GPU Animasyonları, Bilgisayar & Yapay Zeka Kampüsü Arayüzü
 * ====================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Renk Paleti (Modern High-Tech Digital Academy) */
  --bg-deep: #080D1A;     /* Deep Tech Slate */
  --bg-card: rgba(18, 27, 49, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.1);
  
  --primary: #00F0FF;     /* Cyber Cyan */
  --primary-glow: rgba(0, 240, 255, 0.35);
  --secondary: #3B82F6;   /* Tech Blue */
  --accent: #00FF88;      /* Emerald Green (AI & Tech Pulse) */
  --accent-glow: rgba(0, 255, 136, 0.35);
  --gold: #FFD700;        /* Golden Trophy */
  --gold-glow: rgba(255, 215, 0, 0.35);
  --success: #00FF88;
  --warning: #FF5E00;

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(0, 240, 255, 0.3);
  --panel-border: rgba(255, 255, 255, 0.16);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --transition-spring: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: all 0.3s ease;
}

/* --- TEMEL AYARLAR --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(0, 240, 255, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Particles.js Arkaplanı (Dijital Sinir Ağları ve Algoritma Düğümleri) */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- ÜST NAVİGASYON (FLOATING TECH NAVBAR) --- */
.app-header {
  position: sticky;
  top: 15px;
  z-index: 100;
  width: calc(100% - 40px);
  max-width: 1350px;
  margin: 15px auto 30px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 12px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.15);
  transition: var(--transition-smooth);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.logo-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px var(--primary));
  animation: floatSlow 3s ease-in-out infinite;
}

.logo-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 15px;
}

.status-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.xp-pill {
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.3);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.level-pill {
  color: var(--primary);
  border-color: rgba(0, 240, 255, 0.3);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.profile-card {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 255, 136, 0.15));
  border: 1px solid var(--primary);
  padding: 6px 18px 6px 8px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-spring);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.profile-card:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
  border-color: #fff;
}

/* --- ANA LOBİ VE HERO BANNER --- */
.lobby-container {
  position: relative;
  z-index: 10;
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(18, 27, 49, 0.85) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  padding: 50px 40px;
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

.hero-content {
  flex: 1;
  min-width: 320px;
  text-align: left;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 650px;
  margin-bottom: 35px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- BUTONLAR (PREMIUM TECH BUTTONS) --- */
.btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 32px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: var(--transition-spring);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn:hover::after {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0088FF 100%);
  color: #000;
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 35px rgba(0, 240, 255, 0.6);
  color: #000;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #00B360 100%);
  color: #000;
  box-shadow: 0 10px 25px rgba(0, 255, 136, 0.4);
}

.btn-accent:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 35px rgba(0, 255, 136, 0.6);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.2);
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 12px;
}

/* --- HAFTALIK MİSYON KARTLARI --- */
.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.weeks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.week-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 26px;
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: var(--transition-spring);
  backdrop-filter: blur(15px);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.week-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  opacity: 0;
  transition: var(--transition-smooth);
}

.week-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 240, 255, 0.25);
  background: rgba(24, 35, 60, 0.88);
}

.week-card:hover::before {
  opacity: 1;
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.week-number {
  background: rgba(0, 240, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 6px 14px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.week-badge-status {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-earned {
  background: rgba(0, 255, 136, 0.15);
  color: var(--success);
  border: 1px solid var(--success);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.badge-waiting {
  background: rgba(255, 215, 0, 0.1);
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.week-icon-box {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin-bottom: 20px;
  box-shadow: inset 0 0 20px rgba(0,240,255,0.1);
  transition: var(--transition-spring);
}

.week-card:hover .week-icon-box {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(0,240,255,0.3);
}

.week-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.week-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 25px;
  flex: 1;
  line-height: 1.6;
}

/* --- MODAL PANELLERİ --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(8, 13, 26, 0.88);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0F172A;
  border: 1px solid var(--primary);
  border-radius: 32px;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8), 0 0 40px rgba(0, 240, 255, 0.25);
  transform: scale(0.9) translateY(20px);
  transition: var(--transition-spring);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 25px 30px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.3);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: #fff;
}

.close-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.close-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--border-glass);
  background: rgba(0,0,0,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.game-progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.28);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.game-hint-box {
  margin: 14px 0 22px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.22);
  color: #e2f7ff;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- AÇIK DÜNYA: TEKNOMAHALLE --- */
.open-world-modal-content {
  max-width: 1240px;
  max-height: 96vh;
}

.open-world-body {
  padding: 22px;
}

.open-world-topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.open-world-topbar strong {
  display: block;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

#world-status-text {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.open-world-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.open-world-stage {
  position: relative;
  height: min(70vh, 720px);
  min-height: 520px;
  border: 2px solid rgba(0, 240, 255, 0.34);
  border-radius: 22px;
  overflow: hidden;
  outline: none;
  background: #12233d;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.35), 0 18px 45px rgba(0,0,0,0.45);
}

#open-world-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.world-game-panel {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(92%, 720px);
  display: none;
  background: rgba(8, 13, 26, 0.92);
  border: 1px solid var(--primary);
  border-radius: 18px;
  padding: 16px;
  z-index: 20;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

.world-game-panel.active {
  display: block;
}

.world-mobile-controls {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.world-mobile-controls .btn {
  padding: 12px;
}

/* --- ANİMASYONLAR --- */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* --- MOBİL UYUM --- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
  .app-header { flex-direction: column; gap: 15px; padding: 15px; }
  .user-status-bar { width: 100%; justify-content: space-between; }
  .weeks-grid { grid-template-columns: 1fr; }
  .open-world-stage { min-height: 460px; }
  .world-mobile-controls { display: grid; }
}

/* --- CANLI SINIF VE RADAR STİLLERİ --- */
#classroom-freeze-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(2, 6, 23, 0.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  z-index: 999999; display: none; align-items: center; justify-content: center;
  flex-direction: column; text-align: center; padding: 30px;
}

#classroom-freeze-overlay.active { display: flex !important; }

#classroom-live-feed {
  position: fixed; top: 85px; left: 50%; transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92); border: 2px solid var(--primary);
  border-radius: 999px; padding: 10px 24px; z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.35); display: none;
  align-items: center; gap: 12px; font-weight: 800; font-size: 0.95rem; color: #fff;
}

#raise-hand-btn {
  position: fixed; bottom: 25px; left: 25px; z-index: 99998;
  background: linear-gradient(135deg, #3B82F6, #00F0FF);
  color: #000; font-weight: 900; font-size: 1.05rem;
  padding: 14px 24px; border-radius: 999px; border: 2px solid #fff;
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.45); cursor: pointer;
  transition: all 0.3s; display: flex; align-items: center; gap: 10px;
}

#raise-hand-btn:hover { transform: scale(1.08) translateY(-3px); }

.radar-card {
  transition: all 0.3s; cursor: pointer;
}
.radar-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,240,255,0.2); }
.hand-raised-card { animation: pulseBorder 1.5s infinite; }

@keyframes pulseBorder {
  0%, 100% { border-color: #FF9900; box-shadow: 0 0 15px rgba(255, 153, 0, 0.5); }
  50% { border-color: #FF3300; box-shadow: 0 0 30px rgba(255, 51, 0, 0.9); }
}
