/* =======================================
   SANCO PANEL — GLOBAL NEON THEME
======================================= */

:root {
  --bg: #040612;
  --bg-elevated: #080b1a;
  --bg-card: #0b1022;

  --accent: #4FC3F7;
  --accent-soft: rgba(79,195,247,0.15);
  --accent-strong: rgba(79,195,247,0.45);

  --danger: #ff4d6a;
  --success: #00e38f;
  --warning: #ffcf5a;

  --text: #f7f8ff;
  --text-muted: #8f95b3;

  --border: #181c30;
  --border-soft: #101425;

  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;

  --shadow-soft: 0 0 30px rgba(0, 0, 0, 0.55);

  --transition-fast: 0.18s ease-out;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== BODY GENEL ===== */
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #101736, #040612 60%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
}

/* ===== FORM ELEMANLARI ===== */

input,
select {
  background: rgba(4, 7, 22, 0.9);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 10px;
  width: 100%;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: var(--transition-fast);
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(79, 195, 247, 0.45);
}

/* ===== BUTONLAR ===== */

.btn-primary {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #4FC3F7, #00e38f);
  color: #02040a;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(79, 195, 247, 0.45);
  transition: var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(79, 195, 247, 0.7);
}

/* ===== AUTH CARD (login / register) ===== */

.auth-card {
  background: rgba(6, 10, 22, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
  max-width: 400px;
  width: 100%;
  margin: auto;
}

/* ===== BAŞLIKLAR ===== */

.title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* ===== GENEL TABLO STİLİ ===== */

.sanco-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(8, 12, 26, 0.8);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sanco-table th {
  padding: 10px;
  background: rgba(10, 16, 32, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.sanco-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.sanco-table tr:hover {
  background: rgba(79, 195, 247, 0.08);
}

/* ===== PROFIL KART PARÇALARI (genel) ===== */

.profile-card {
  background: rgba(6, 10, 22, 0.75);
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  font-weight: 600;
  margin-right: 16px;
}

.stat-box {
  text-align: center;
  padding: 10px;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* =====================================
   LEADERBOARD NEON STYLE
===================================== */

.leaderboard-card {
  margin: 0 auto;
  max-width: 650px;
  border-radius: var(--radius-xl);
  padding: 20px;
  background: rgba(10, 16, 38, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-soft);
  box-shadow: 0 0 35px rgba(79, 195, 247, 0.25);
}

.sanco-table th {
  font-size: 13px;
  padding: 12px 8px;
}

.sanco-table td {
  padding: 12px 8px;
  font-size: 14px;
  text-align: center;
}

.sanco-table tr:nth-child(even) {
  background: rgba(79, 195, 247, 0.05);
}

.sanco-table tr:hover {
  background: rgba(79, 195, 247, 0.12);
  transition: 0.2s;
}

/* Rank Medals */
.sanco-table td.rank-1 {
  color: gold;
  font-weight: 700;
  text-shadow: 0 0 8px gold;
}

.sanco-table td.rank-2 {
  color: silver;
  font-weight: 700;
  text-shadow: 0 0 8px silver;
}

.sanco-table td.rank-3 {
  color: #cd7f32; /* bronze */
  font-weight: 700;
  text-shadow: 0 0 8px #cd7f32;
}

/* =====================================
   PROFILE PROFESSIONAL TABLE (ortak)
===================================== */

.profile-stats-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  background: rgba(10, 16, 38, 0.55);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(79, 195, 247, 0.2);
}

.profile-stats-table thead {
  background: rgba(79, 195, 247, 0.15);
}

.profile-stats-table th {
  padding: 12px;
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-stats-table td {
  padding: 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.profile-stats-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.profile-stats-table tr:hover {
  background: rgba(79, 195, 247, 0.12);
  transition: 0.2s;
}

/* =========================================
   SIDEBAR & NAV (Dashboard / Profil / Leaderboard)
========================================= */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  padding: 24px 20px;
  background: var(--bg-sidebar, #050c16);
  border-right: 1px solid var(--border-soft, #111722);
  display: flex;
  flex-direction: column;
}

/* Marka alanı */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, #4fc3f7, #0af, #0044ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #020713;
  box-shadow: 0 0 18px rgba(79, 195, 247, 0.6);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text, #f5f7ff);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted, #9ba3b5);
}

/* Bölüm başlığı */

.sidebar-section-title {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted, #9ba3b5);
}

/* Nav listeleri */

.nav-list {
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0;
}

.nav-list li {
  margin-bottom: 6px;
}

.nav-list a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted, #9ba3b5);
  text-decoration: none;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform 0.18s ease-out;
}

.nav-list a:hover {
  background: rgba(79, 195, 247, 0.16);
  color: var(--text, #f5f7ff);
  transform: translateX(2px);
}

.nav-list a.active {
  background: linear-gradient(90deg, #4fc3f7, #0af);
  color: #020713;
  font-weight: 600;
}

/* Giriş yap / kayıt ol bloğu */

.nav-list.nav-logged-out {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft, #111722);
}

/* Çıkış linki */

.logout-link {
  color: #ff7676;
}

/* Ana içerik alanı (Dashboard, Profil, Leaderboard) */

.main-content {
  margin-left: 220px; /* sidebar genişliği */
  padding: 40px 40px;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Genel sayfa başlığı */

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text, #f5f7ff);
  margin: 0 0 24px 0;
  text-align: center;
}

/* =====================================
   MOBILE (≤ 768px)
===================================== */

@media (max-width: 768px) {

  body {
    display: block; /* daha basit layout */
  }

  .sidebar {
    width: 70px;
    padding: 16px 6px;
    align-items: center;
  }

  .brand-text,
  .sidebar-section-title {
    display: none;
  }

  .nav-list {
    text-align: center;
  }

  .nav-list a {
    padding: 8px 0;
    font-size: 11px;
  }

  .main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
    padding: 20px 12px;
    align-items: center;
  }

  .page-title {
    font-size: 24px;
    margin-bottom: 18px;
  }

  .leaderboard-card {
    width: 100%;
    padding: 16px;
  }

  .profile-stats-table {
    font-size: 13px;
  }
}

/* ===== MOBILE RESPONSIVE FIX ===== */
@media (max-width: 768px) {

  /* Sidebar daralt */
  .sidebar {
    width: 70px;
    padding: 10px 5px;
  }

  /* Sidebar textleri gizle */
  .brand-text,
  .sidebar-section-title,
  .nav-list a:not(.logout-link) {
    font-size: 0;
  }

  .nav-list a::before {
    content: attr(data-icon);
    font-size: 20px;
    color: var(--text);
  }

  /* Linklere icon ekle */
  .nav-list a[href*="index"]::before { content: "🏠"; }
  .nav-list a[href*="profile"]::before { content: "👤"; }
  .nav-list a[href*="leader"]::before { content: "🏆"; }
  .nav-list a.logout-link::before { content: "🚪"; }

  /* MAIN CONTENT YAPI */
  .main-content {
    margin-left: 70px !important;
    width: calc(100% - 70px) !important;
    padding: 10px;
  }

  /* Kart genişliği */
  .card {
    width: 95% !important;
    margin: 0 auto !important;
  }

  h1.page-title {
    margin-left: 0 !important;
    text-align: center;
  }
}
/* ===== MOBILE MENU MODE ===== */
@media (max-width: 768px) {

  /* sidebar tamamen gizle */
  .sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    height: 100vh;
    width: 220px;
    transition: left 0.3s ease;
    z-index: 9999;
  }

  /* Açıkken */
  .sidebar.open {
    left: 0;
  }

  /* hamburger buton */
  .menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10000;
    background: rgba(255,255,255,0.1);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
  }

  /* main alan tam genişlik */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding-top: 70px; /* hamburger boşluğu */
  }

  /* kart genişliği */
  .card {
    width: 95% !important;
    margin: 0 auto !important;
  }
}
/* ===========================
   RESPONSIVE NAVIGATION
=========================== */

@media (max-width: 768px) {

  /* Sidebar başlangıçta gizli */
  .sidebar {
    width: 230px;
    transform: translateX(-100%);
    transition: transform .3s ease-in-out;
  }

  /* Açık hali */
  .sidebar.open {
    transform: translateX(0);
  }

  /* Hamburger menü görünür */
  .menu-toggle {
    display: block;
    position: fixed;
    top: 18px;
    left: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent-strong);
    text-align: center;
    line-height: 42px;
    color: white;
    cursor: pointer;
    font-size: 24px;
    z-index: 3000;
  }

  /* Main content sola değmesin */
  .main-content {
    margin-left: 0 !important;
    padding: 20px;
  }

  /* Kart genişliği mobil uyum */
  .card {
    width: 95% !important;
    margin: 10px auto;
  }

}
