/* ==========================================================================
   LENIS & SCROLLBAR DÜZELTMELERİ
   ========================================================================== */

/* Lenis Çakışma Önleyici */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) var(--bg);
}

/* ==========================================================================
   TEMA DEĞİŞKENLERİ (DARK - varsayılan)
   ========================================================================== */
:root,
:root[data-theme="dark"] {
  --bg: #0E0E10;
  --bg-soft: #151519;
  --bg-card: #1B1B1F;
  --bg-card-alt: #1e222b;
  --bg-elevated: #222227;
  --bg-input: #14171d;
  --topbar-bg: rgba(14, 14, 16, 0.88);
  --border: #27272A;
  --border-light: #3F3F46;
  --border-alt: #2a2f3d;
  --text: #F4F4F5;
  --text-strong: #ffffff;
  --muted: #71717B;
  --dim: #A1A1AA;
  --accent: #FF6B2C;
  --accent-hover: #FF824D;
  --accent-muted: rgba(255, 107, 44, 0.12);
  --green: #22C55E;

  --map-thumb-bg: #151519;
  --map-thumb-border: #222227;
  --map-card-hover-border: #2A2A30;
  --map-fallback-color: #25252C;
  --map-tag-bg: #111827;
  --map-tag-border: #374151;
  --map-body-bg: #1B1B1F;
  --map-meta-color: #71717B;

  color-scheme: dark;
}

/* ==========================================================================
   TEMA DEĞİŞKENLERİ (LIGHT)
   ========================================================================== */
:root[data-theme="light"] {
  --bg: #FAFAFA;
  --bg-soft: #F2F2F4;
  --bg-card: #FFFFFF;
  --bg-card-alt: #F5F6F8;
  --bg-elevated: #FFFFFF;
  --bg-input: #F2F3F5;
  --topbar-bg: rgba(255, 255, 255, 0.88);
  --border: #E4E4E7;
  --border-light: #D4D4D8;
  --border-alt: #E1E3E8;
  --text: #18181B;
  --text-strong: #000000;
  --muted: #71717A;
  --dim: #52525B;
  --accent: #FF6B2C;
  --accent-hover: #E85A1F;
  --accent-muted: rgba(255, 107, 44, 0.10);
  --green: #16A34A;

  --map-thumb-bg: #F0F0F2;
  --map-thumb-border: #E4E4E7;
  --map-card-hover-border: #D4D4D8;
  --map-fallback-color: #D4D4D8;
  --map-tag-bg: #1F2937;
  --map-tag-border: #374151;
  --map-body-bg: #FFFFFF;
  --map-meta-color: #71717A;

  color-scheme: light;
}

/* Tema geçişini yumuşat */
body, .topbar, .util-card, .map-card, .profile-card, .favorites-container,
.admin-card, .stat-card, .form-card, .util-thumb, .form-group input,
.form-group textarea, .utility-card, .admin-sidebar {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

/* Logo görseli beyaz/açık gri yazı içeriyor; açık temada sayfa arka planına
   karışıp görünmez olmaması için renkleri çevir (turuncu vurgu korunur). */
[data-theme="light"] .brand-logo {
  filter: invert(1) hue-rotate(180deg);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Sayfa geneli yatay kaymayı engeller */
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   HEADER & TOPBAR (STICKY & MOBIL HİZALAMA DÜZELTMESİ)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 17px;
}

.logo-mark {
  width: 60px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-size: 14px;
  color: var(--dim);
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
}

.auth {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--dim);
  border-color: var(--border);
}

.btn-small {
  padding: 8px 14px;
  font-size: 13px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  line-height: 1;
}

.hamburger {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  padding: 24px;
  flex-direction: column;
}

.mobile-nav.open, .mobile-nav.active {
  display: flex;
}

.mobile-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.mobile-nav a {
  display: block;
  font-size: 22px;
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   HERO SECTION & STATS DÜZELTMELERİ
   ========================================================================== */
.hero {
  max-width: 1320px;
  margin: 0 auto;
  padding: 96px 28px 88px;
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 700;
}

.hero h1 {
  font-size: 72px;
  line-height: 0.92;
  letter-spacing: -0.06em;
  font-weight: 800;
  max-width: 580px;
  text-transform: lowercase;
}

.hero h1 .dim {
  color: var(--muted);
}

.hero-desc {
  max-width: 600px;
  margin-top: 32px;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* TAŞMAYI ENGELLEYEN STATS TANIMI */
.hero-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-top: 72px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  width: 100%;
  max-width: 480px;
}

.stat-val {
  font-size: 32px;
  font-weight: 800;
  white-space: nowrap;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* ==========================================================================
   SECTIONS & CARDS
   ========================================================================== */
.section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px !important;
  margin: 24px 0 48px !important;
}

.map-card {
  background: var(--map-thumb-bg) !important;
  border: 1px solid var(--map-thumb-border) !important;
  border-radius: 12px !important;
  aspect-ratio: 1 / 0.9 !important;
  transition: .2s !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-card:hover {
  transform: translateY(-2px) !important;
  border-color: var(--map-card-hover-border) !important;
}

.map-card-img {
  flex: 1;
  position: relative;
  background: var(--map-thumb-bg) !important;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 125px !important;
}

.map-card-img .fallback, .map-card-img span {
  font-size: 36px !important;
  font-weight: 800 !important;
  color: var(--map-fallback-color) !important;
  opacity: 0.15;
}

/* ==========================================================================
   MAP CARD TAGS
   ========================================================================== */
.map-card-tag {
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;
  z-index: 10 !important;
  
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  
  padding: 2px 6px !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  border-radius: 3px !important;
  
  color: #ffffff !important;
  background: var(--map-tag-bg) !important;
  border: 1px solid var(--map-tag-border) !important;
  opacity: 1 !important;
  
  width: auto !important;
  max-width: calc(100% - 12px) !important;
  box-sizing: border-box !important;
}

.map-card-tag.active {
  background: #22c55e !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

.map-card-tag.reserve {
  background: #475569 !important;
  border-color: #334155 !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

.map-card-tag::before,
.map-card-tag::after {
  display: none !important;
}

.map-card-body {
  padding: 10px 12px 12px !important;
  background: var(--map-body-bg) !important;
  border-top: 1px solid var(--map-thumb-border) !important;
}

.map-card-body .n {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
}

.map-card-body .m {
  font-size: 11px !important;
  margin-top: 3px !important;
  color: var(--map-meta-color) !important;
}

.map-card-body .m::before {
  display: none !important;
}

.util-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.util-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: .22s;
}

.util-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.util-thumb {
  aspect-ratio: 16/9;
  background: #0A0A0B;
  position: relative;
}

.util-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
}

.util-body {
  padding: 16px 18px;
}

.util-title {
  font-size: 15px;
  font-weight: 600;
}

.util-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* ==========================================================================
   UTIL DETAIL PAGE & COMMENTS
   ========================================================================== */
.util-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: #6B8AFF;
}

.util-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--dim);
  font-weight: 600;
  text-transform: uppercase;
}

.tag-side {
  background: var(--accent-muted);
  color: var(--accent);
}

.util-detail-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 28px;
}

.util-layout {
  display: grid;
  grid-template-columns: 1.7fr 0.6fr;
  gap: 24px;
}

.video-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.video-wrap .player {
  aspect-ratio: 16/9;
  background: #000;
}

.video-wrap video {
  width: 100%;
  height: 100%;
}

.meta-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.meta-row {
  margin-bottom: 20px;
}

.meta-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 700;
}

.meta-value {
  font-size: 14px;
}

.meta-value.easy {
  color: var(--green);
}

.divider {
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
  margin: 32px 0;
}

.comments-head {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
}

.vote-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.vote-btn {
  display: flex;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--dim);
  cursor: pointer;
}

.vote-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}

.comment-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}

.comment-author {
  font-size: 14px;
  font-weight: 600;
}

.comment-time {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}

.comment-text {
  font-size: 14px;
  color: var(--dim);
  margin-top: 10px;
  line-height: 1.6;
}

.reply-btn {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  margin-top: 12px;
  display: inline-block;
}

.replies {
  margin-left: 20px;
  border-left: 1px solid var(--border);
  padding-left: 18px;
  margin-top: 14px;
}

.comment-input-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.comment-input {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
}

/* ==========================================================================
   FORMS & UTILS
   ========================================================================== */
.form-wrap {
  max-width: 480px;
  margin: 72px auto;
  padding: 0 28px;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}

.input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  margin-top: 8px;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}

label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 18px;
  display: block;
  font-weight: 600;
}

/* ==========================================================================
   PRO PLAYERS: grid, cards & detail page
   ========================================================================== */
.player-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.player-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: .22s;
}

.player-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-flag {
  width: 28px;
  height: 21px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.player-nick {
  font-size: 17px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-name {
  font-size: 13px;
  color: var(--dim);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crosshair-box {
  margin-top: 16px;
  background: var(--bg-soft);
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--dim);
}

.crosshair-box code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.btn-copy {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.player-detail-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.player-detail-flag {
  width: 52px;
  height: 39px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.crosshair-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Decorative generic crosshair icon (not a decode of the share code) */
.crosshair-visual {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.crosshair-visual span {
  position: absolute;
  background: var(--accent);
  border-radius: 2px;
}

.crosshair-visual span:nth-child(1),
.crosshair-visual span:nth-child(2) {
  width: 4px;
  height: 22px;
  left: 30px;
}

.crosshair-visual span:nth-child(1) { top: 0; }
.crosshair-visual span:nth-child(2) { bottom: 0; }

.crosshair-visual span:nth-child(3),
.crosshair-visual span:nth-child(4) {
  height: 4px;
  width: 22px;
  top: 30px;
}

.crosshair-visual span:nth-child(3) { left: 0; }
.crosshair-visual span:nth-child(4) { right: 0; }

@media (max-width: 900px) {
  .player-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .player-grid {
    grid-template-columns: 1fr;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: .7s;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE (TABLET & MOBIL DÜZELTMELERİ)
   ========================================================================== */
@media(max-width: 1024px) {
  .map-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .util-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width: 768px) {
  .topbar-inner {
    padding: 12px 16px;
  }
  .nav {
    display: none !important;
  }
  .auth .btn-ghost, .auth .icon-btn {
    display: none !important;
  }
  .hamburger {
    display: flex !important;
  }
  .hero {
    padding: 48px 16px 48px;
  }
  .hero h1 {
    font-size: 38px;
  }
  
  /* Hero Stats Mobilde Ekrana Tam Sığar */
  .hero-stats {
    gap: 12px;
    margin-top: 48px;
  }
  .stat-val {
    font-size: 24px;
  }
  .stat-label {
    font-size: 11px;
  }

  .map-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Mobilde kart biraz daha uzun görünsün diye oranı hafif arttırdık (~5-10px) */
  .map-card {
    aspect-ratio: 1 / 1.5 !important;
  }

  /* Mobil Tag Boyutları */
  .map-card-tag {
    top: 5px !important;
    left: 5px !important;
    padding: 2px 5px !important;
    font-size: 8px !important;
    border-radius: 3px !important;
  }

  .map-card-tag.active,
  .map-card-tag.reserve {
    font-size: 8px !important;
  }

  .util-grid {
    grid-template-columns: 1fr;
  }
  .util-layout {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 0 16px;
  }
  .util-page {
    padding: 16px;
  }

  /* Profil / Admin sayfalarındaki inline grid'ler tek sütuna insin */
  .profile-grid,
  .admin-split {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .field-row-2 {
    grid-template-columns: 1fr !important;
  }
  .admin-maps-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   PROFILE PAGE STYLES
   ========================================================================== */
.profile-page {
  padding-top: 40px;
  padding-bottom: 80px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

/* Sol Profil Card & Nav */
.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  margin: 0 auto 16px;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.profile-email {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* Tab Menüsü */
.profile-tabs {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: .2s ease;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.tab-btn.active {
  background: var(--accent-muted);
  color: var(--accent);
}

/* Sağ Sekme İçerikleri */
.profile-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  min-height: 400px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.pane-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.profile-form .form-group {
  margin-bottom: 16px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-target-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.comment-target-title:hover {
  text-decoration: underline;
}

.empty-text {
  color: var(--muted);
  font-size: 14px;
}

/* Mobil Uyumluluk */
@media (max-width: 868px) {
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .profile-content {
    padding: 20px;
  }
}

/* Search Tabs */
.search-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

.search-tab-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ==========================================================================
   SEARCH & FILTER PAGE
   ========================================================================== */
.search-page {
  padding-top: 32px;
  padding-bottom: 64px;
}

.search-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.search-tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.search-tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Filtre Kartı ve Arama Barı İyileştirmeleri */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px !important;
  border-radius: 12px !important;
}

/* Arama Girdisi & Buton Hizalaması */
.filter-card div:first-child,
.search-main-input {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-dropdowns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .search-main-input {
    flex-direction: column;
  }
  .filter-dropdowns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .filter-dropdowns {
    grid-template-columns: 1fr;
  }
}

/* Input ve Select Elemanlarının İç Boşlukları & Kenarları */
.filter-card .input,
.filter-card select {
  height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  margin-top: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Select Menü İşaretçisi & Hizalaması */
.filter-card select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Focus Durumundaki Yumuşak Vurgu (Mevcut Rengi Korur) */
.filter-card .input:focus,
.filter-card select:focus {
  box-shadow: 0 0 0 2px var(--accent-muted);
  border-color: var(--accent);
}

/* Arama Butonunun Duruşu */
.filter-card .btn-primary {
  height: 44px;
  padding: 0 24px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* Custom Profile & Admin Dashboard Styles */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

.favorites-container, .admin-card {
    background: var(--bg-card-alt);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-alt);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--dim);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-alt);
    color: var(--text);
    border-radius: 4px;
}

.utility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.utility-card {
    background: var(--bg-input);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-alt);
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-input);
    padding: 2rem 1rem;
    border-right: 1px solid var(--border-alt);
}

.admin-content {
    flex: 1;
    padding: 2rem;
    min-width: 0;
}

@media (max-width: 768px) {
    .admin-wrapper {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-alt);
    }
    .admin-table-wrap {
        overflow-x: auto;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: var(--bg-card-alt);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th, .admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-alt);
}

/* ==========================================================================
   PAGE LOADER
   ========================================================================== */
#pageLoader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}

#pageLoader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  animation: loader-spin 1s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   AUTH PAGES (Login / Register)
   ========================================================================== */
.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.auth-logo img {
  height: 36px;
  width: auto;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  color: var(--text);
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  margin-bottom: 28px;
}

.auth-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

.auth-alert.error {
  background: rgba(255, 107, 44, 0.1);
  border: 1px solid rgba(255, 107, 44, 0.3);
  color: var(--accent);
}

.auth-alert.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--green);
}

.auth-form label {
  margin-top: 16px;
}

.auth-form label:first-of-type {
  margin-top: 0;
}

.auth-submit {
  width: 100%;
  margin-top: 24px;
  padding: 13px;
  font-size: 14.5px;
  font-weight: 700;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

.auth-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 32px 22px;
    border-radius: 14px;
  }
}

/* ==========================================================================
   SUBMIT UTILITY PAGE
   ========================================================================== */
.submit-page {
  max-width: 680px;
  margin: 56px auto;
  padding: 0 20px;
}

.submit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
}

.submit-header {
  margin-bottom: 8px;
}

.submit-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.submit-subtitle {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 6px;
}

.submit-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 20px;
}

.submit-alert.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--green);
}

.submit-alert.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.submit-alert.error div + div {
  margin-top: 4px;
}

.submit-form {
  margin-top: 24px;
}

.form-section-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-top: 28px;
  margin-bottom: 12px;
}

.form-section-label:first-child {
  margin-top: 0;
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-row-2 label {
  margin-top: 16px;
}

.field-row-2 .field:first-child label {
  margin-top: 16px;
}

.file-drop {
  margin-top: 8px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  background: var(--bg-soft);
  transition: border-color .2s ease, background .2s ease;
  position: relative;
  cursor: pointer;
}

.file-drop:hover {
  border-color: var(--accent);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-drop-icon {
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.file-drop-text {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 600;
}

.file-drop-hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

.file-drop-filename {
  font-size: 12.5px;
  color: var(--accent);
  margin-top: 8px;
  font-weight: 600;
  word-break: break-all;
}

.submit-btn {
  width: 100%;
  margin-top: 28px;
  padding: 13px;
  font-size: 14.5px;
  font-weight: 700;
}

@media (max-width: 560px) {
  .submit-card {
    padding: 24px 20px;
    border-radius: 14px;
  }
  .field-row-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.util-thumb {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;   /* kutuyu sabit oranda tut, video tam otursun */
}

.util-thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.util-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 1;
}

.util-thumb .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
}