/* ==========================================================================
   KlavyeUstam - Ana Stil Dosyası (Global Layout & Reset)
   ========================================================================== */

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

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;  /* Her ikisinde de — mobil drawer overflow'u engeller */
  max-width: 100%;     /* IE/Edge uyumu */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Arka Plan Ambient Neon Işıltısı */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 450px;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* Özel Kaydırma Çubuğu (Custom Scrollbar) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--key-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ==========================================================================
   Modern App Shell & Sol Kenar Menüsü (Sidebar Layout)
   ========================================================================== */

.app-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  width: 100%;
  position: relative;
  background-color: var(--bg-primary);
}

/* Sol Kenar Menüsü (Sidebar) */
.app-sidebar {
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  flex-shrink: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

/* Daraltılmış (Collapsed) Menü Durumu */
.app-sidebar.collapsed {
  width: 76px;
  min-width: 76px;
}

/* Üst Logo & Daraltma Butonu */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.1rem 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 68px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.sidebar-logo-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
  margin: 0;
}

.sidebar-logo-text span {
  font-size: 0.62rem;
  color: var(--accent-secondary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-collapse-toggle {
  width: 30px;
  height: 30px;
  min-width: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.sidebar-collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

/* Navigasyon Listesi */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.sidebar-content::-webkit-scrollbar {
  width: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-group-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem 0.25rem;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.58rem 0.85rem;
  border-radius: var(--radius-sm, 8px);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
  white-space: nowrap;
  transition: all 0.18s ease;
  position: relative;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateX(2px);
}

.sidebar-item.active {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.18), rgba(168, 85, 247, 0.05));
  color: #c084fc;
  border-left: 3px solid #a855f7;
  padding-left: calc(0.85rem - 3px);
  font-weight: 700;
}

.sidebar-item-icon {
  font-size: 1.15rem;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-item-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}

.sidebar-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sidebar-badge.pro {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #ffffff;
  border: none;
}

/* Collapsed Durumda Header ve Buton Düzeni */
.app-sidebar.collapsed .sidebar-header {
  padding: 0.9rem 0.5rem 0.8rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  min-height: auto;
}

.app-sidebar.collapsed .sidebar-logo {
  justify-content: center;
  margin: 0 auto;
}

.app-sidebar.collapsed .sidebar-collapse-toggle {
  width: 38px;
  height: 28px;
  min-width: 38px;
  flex-shrink: 0;
  margin: 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.app-sidebar.collapsed .sidebar-collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

/* Collapsed Durumda Gizlenecek Alanlar */
.app-sidebar.collapsed .sidebar-logo-text,
.app-sidebar.collapsed .sidebar-group-title,
.app-sidebar.collapsed .sidebar-item-label,
.app-sidebar.collapsed .sidebar-badge,
.app-sidebar.collapsed .user-info-text,
.app-sidebar.collapsed .dropdown-chevron,
.app-sidebar.collapsed .sidebar-footer-labels {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-item {
  justify-content: center;
  padding: 0.65rem 0;
}

.app-sidebar.collapsed .sidebar-item.active {
  border-left: none;
  background: rgba(168, 85, 247, 0.2);
  border-radius: 8px;
}

@media (max-width: 992px) {
  .app-sidebar {
    display: none !important;
  }
  .stage-top-bar .hamburger-btn {
    display: flex !important;
  }
}

/* Ana Sahne (Main Stage) */
.app-main-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Minimalist Üst Çubuk (Top Stage Bar) */
.stage-top-bar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}



.stage-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stage-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stage-title b {
  color: var(--text-primary);
}

.stage-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Ana Test Görünümü (Tertemiz, Odaklı Yazma Alanı) */
.stage-content {
  flex: 1;
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

/* Eski kapsayıcı uyumluluğu */
.app-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
  overflow-x: hidden;
  max-width: 100%;
}

main.main-content {
  flex: 1;
  padding: 0.5rem 1.5rem 2rem 1.5rem;
}

/* ==========================================================================
   Alt Bilgi & Kısayol Çubuğu (Footer)
   ========================================================================== */

.app-footer {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-shortcuts {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.kbd-badge {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-tag {
  color: var(--text-secondary);
}

/* Responsive Düzenlemeler */
@media (max-width: 900px) {
  .app-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .results-main-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ===== Platform Tanıtım Bölümü (Feature Cards) ===== */
.platform-intro-section {
  margin: 2.5rem 0 1rem;
  padding: 0 0.5rem;
}

.platform-intro-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.platform-intro-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  letter-spacing: -0.02em;
}

.platform-intro-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.55;
}

.platform-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.platform-feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md, 12px);
  padding: 1.2rem 1rem;
  text-align: left;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.platform-feature-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(139,92,246,0.3);
  transform: translateY(-2px);
}

.pf-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.pf-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  text-align: left;
}

.pf-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: left;
}

@media (max-width: 768px) {
  .platform-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .platform-feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .platform-feature-card {
    padding: 0.85rem 0.6rem;
  }
}
