@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0D0B14;
  --surface: #171325;
  --surface-2: #1F1A32;
  --border: #2C2540;
  --text: #E8E6F0;
  --text-dim: #9891AE;
  --purple: #7C3AED;
  --purple-bright: #A78BFA;
  --green: #22D3A6;
  --gold: #F5B324;
  --red: #F0537A;
  /* RGB üçlüleri - rgba() ile saydamlık gerektiren neon glow efektlerinde kullanılır */
  --purple-rgb: 124,58,237;
  --purple-bright-rgb: 167,139,250;
  --green-rgb: 34,211,166;
}

/* =========================================================
   TEMALAR — her biri iki ana vurgu rengi (--purple/--purple-bright
   birincil, --green ikincil) değiştirir. --bg/--surface/--text/--red
   okunabilirlik ve hata anlamlılığı için sabit kalır.
   ========================================================= */
html[data-theme="yesil-kirmizi"] {
  --purple: #16A34A; --purple-bright: #4ADE80; --green: #FB7185;
  --purple-rgb: 22,163,74; --purple-bright-rgb: 74,222,128; --green-rgb: 251,113,133;
}
html[data-theme="mavi-sari"] {
  --purple: #2563EB; --purple-bright: #60A5FA; --green: #FACC15;
  --purple-rgb: 37,99,235; --purple-bright-rgb: 96,165,250; --green-rgb: 250,204,21;
}
html[data-theme="siyah-beyaz"] {
  --purple: #D1D5DB; --purple-bright: #FFFFFF; --green: #94A3B8;
  --purple-rgb: 209,213,219; --purple-bright-rgb: 255,255,255; --green-rgb: 148,163,184;
}
html[data-theme="kirmizi-turuncu"] {
  --purple: #E11D48; --purple-bright: #FB7185; --green: #FB923C;
  --purple-rgb: 225,29,72; --purple-bright-rgb: 251,113,133; --green-rgb: 251,146,60;
}
html[data-theme="mavi-mor"] {
  --purple: #3B82F6; --purple-bright: #7DD3FC; --green: #818CF8;
  --purple-rgb: 59,130,246; --purple-bright-rgb: 125,211,252; --green-rgb: 129,140,248;
}
html[data-theme="pembe-turkuaz"] {
  --purple: #EC4899; --purple-bright: #F9A8D4; --green: #2DD4BF;
  --purple-rgb: 236,72,153; --purple-bright-rgb: 249,168,212; --green-rgb: 45,212,191;
}
html[data-theme="altin-lacivert"] {
  --purple: #1E3A8A; --purple-bright: #3B82F6; --green: #F5B324;
  --purple-rgb: 30,58,138; --purple-bright-rgb: 59,130,246; --green-rgb: 245,179,36;
}
html[data-theme="turuncu-yesil"] {
  --purple: #F97316; --purple-bright: #FDBA74; --green: #22C55E;
  --purple-rgb: 249,115,22; --purple-bright-rgb: 253,186,116; --green-rgb: 34,197,94;
}
html[data-theme="kirmizi-siyah"] {
  --purple: #DC2626; --purple-bright: #F87171; --green: #A1A1AA;
  --purple-rgb: 220,38,38; --purple-bright-rgb: 248,113,113; --green-rgb: 161,161,170;
}

/* RGB (renk döngüsü) — sabit bir renk paleti yerine tüm sayfanın rengini
   sürekli döndürür. Görünürdeki her şeyi (arkaplan dahil) etkilediği için
   sadece body'ye uygulanır; hareket hassasiyeti olan kullanıcılar için
   prefers-reduced-motion ile durdurulur. */
html[data-theme="rgb"] body {
  animation: nexus-rgb-cycle 8s linear infinite;
}
@keyframes nexus-rgb-cycle {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="rgb"] body { animation: none; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, .display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* --- Nexus glow background (hero only) ---
   AÇIK/İSTEK: Artık sabit mor/yeşil değil, aktif temanın renklerini
   (özel hex temalar dahil) kullanıyor VE sürekli hareket edip renkler
   birbirine karışıyor (neon/canlı efekt). */
.nexus-glow {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border);
}
.nexus-glow::before {
  content: '';
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 25% 20%, rgba(var(--purple-rgb), 0.4), transparent 45%),
    radial-gradient(circle at 75% 60%, rgba(var(--green-rgb), 0.3), transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(var(--purple-bright-rgb), 0.25), transparent 50%);
  background-size: 160% 160%;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  animation: nexusGlowDrift 14s ease-in-out infinite;
}
.nexus-glow > * { position: relative; z-index: 1; }

@keyframes nexusGlowDrift {
  0%   { background-position: 0% 0%, 100% 100%, 50% 100%; transform: scale(1) rotate(0deg); }
  33%  { background-position: 30% 60%, 70% 20%, 20% 60%; transform: scale(1.08) rotate(4deg); }
  66%  { background-position: 70% 30%, 20% 70%, 80% 30%; transform: scale(1.04) rotate(-3deg); }
  100% { background-position: 0% 0%, 100% 100%, 50% 100%; transform: scale(1) rotate(0deg); }
}

/* Ambiyans: sitenin her sayfasında, arka planda hafifçe hareket eden
   temalı neon ışıltı (çok düşük opaklıkta, okunabilirliği bozmadan). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(var(--purple-rgb), 0.16), transparent 35%),
    radial-gradient(circle at 85% 25%, rgba(var(--green-rgb), 0.12), transparent 35%),
    radial-gradient(circle at 50% 90%, rgba(var(--purple-bright-rgb), 0.10), transparent 40%);
  background-size: 180% 180%;
  filter: blur(80px);
  animation: ambientDrift 26s ease-in-out infinite;
}

/* Sitenin geneli için daha hafif versiyon: sadece pozisyon kayar, transform/scale yok
   (her sayfada sürekli çalıştığı için düşük donanımlı telefonlarda daha az yük bindirir). */
@keyframes ambientDrift {
  0%   { background-position: 0% 0%, 100% 100%, 50% 100%; }
  50%  { background-position: 40% 50%, 60% 40%, 60% 40%; }
  100% { background-position: 0% 0%, 100% 100%, 50% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .nexus-glow::before, body::before { animation: none; }
}

/* Kullanıcı arka plan ışıltısını kapatırsa (performans için): animasyon durur
   ve blur'lu katmanlar tamamen kaldırılır, böylece hiç iş yapmazlar. */
html.glow-off .nexus-glow::before,
html.glow-off body::before {
  animation: none;
  display: none;
}

/* --- Layout shell --- */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 640px) {
  .shell { padding: 0 24px; }
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.brand .mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.92rem;
  color: var(--text-dim);
  row-gap: 10px;
}
@media (min-width: 640px) {
  .nav-links { gap: 24px; }
}
.nav-links a:hover { color: var(--text); }

/* --- Nav içi açılır menüler (Ekonomi / Topluluk) --- */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}
.nav-dropdown-btn:hover { color: var(--text); }
.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  z-index: 50;
  flex-direction: column;
  gap: 2px;
}
.nav-dropdown-panel.open { display: flex; }
.nav-dropdown-panel a {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
  white-space: nowrap;
}
.nav-dropdown-panel a:hover { background: var(--surface-2); }

/* --- Mobil hamburger menü --- */
.hamburger-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  font-size: 1.15rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .hamburger-btn { display: inline-flex; }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-top: 4px;
  }
  .nav-links.nav-open { display: flex; }

  .nav-links .search-box,
  .nav-links .theme-picker,
  .nav-links .user-chip,
  .nav-links .btn-primary { width: 100%; }
  .nav-links .search-box input { width: 100%; box-sizing: border-box; }
  .nav-links .theme-picker .theme-panel { left: 0; right: 0; width: auto; }

  .nav-dropdown-btn { width: 100%; text-align: left; padding: 8px 0; }
  .nav-dropdown-panel {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border);
    border-radius: 0;
    margin: 2px 0 6px 10px;
    padding: 2px 0 2px 12px;
    background: transparent;
    min-width: 0;
  }
  .nav-dropdown-panel.open { display: flex; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--purple), #9333EA);
  color: white;
  box-shadow: 0 4px 20px rgba(var(--purple-rgb), 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-primary:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(var(--purple-rgb), 0.5);
}
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--purple-bright); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}
.user-chip img {
  width: 26px; height: 26px; border-radius: 50%;
}

/* --- Hero --- */
.hero {
  padding: 44px 24px 40px;
  text-align: left;
}
@media (min-width: 640px) {
  .hero { padding: 90px 48px 70px; }
}
.eyebrow {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}
.hero h1 {
  font-size: clamp(2rem, 8vw, 3.6rem);
  max-width: 760px;
  letter-spacing: -0.015em;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--purple-bright), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin-top: 22px;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1.08rem;
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.eyebrow-sm { color: var(--purple-bright); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }

/* --- Hero: metin + dekoratif mockup kartı iki sütun --- */
.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
}
.hero-split .stats-band { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-mock { display: none; }
}

.hero-mock {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-card {
  position: absolute;
  width: 300px;
  border-radius: 16px;
  background: #1a1a20;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  padding: 18px 20px;
}

.mock-card-back {
  transform: rotate(6deg) translate(18px, 10px);
  opacity: 0.55;
  filter: blur(0.3px);
}
.mock-card-front {
  transform: rotate(-3deg);
  animation: mock-float 6s ease-in-out infinite;
}

.mock-line { height: 10px; border-radius: 6px; background: rgba(255,255,255,0.08); margin-bottom: 10px; }
.mock-line-title { width: 55%; height: 14px; background: rgba(255,255,255,0.14); }

.mock-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mock-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--purple-bright), var(--green));
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  flex-shrink: 0;
}
.mock-title { font-weight: 700; font-size: 0.92rem; color: #fff; }
.mock-sub { font-size: 0.72rem; color: rgba(255,255,255,0.4); }
.mock-body { font-size: 0.85rem; color: rgba(255,255,255,0.75); line-height: 1.5; margin-bottom: 14px; }
.mock-fields { display: flex; gap: 10px; }
.mock-field {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
}
.mock-field b { color: #fff; font-size: 0.82rem; }

.mock-float {
  position: absolute;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  white-space: nowrap;
  animation: mock-float-alt 5s ease-in-out infinite;
}
.mock-float-1 { top: 6%; right: 0; animation-delay: 0.5s; }
.mock-float-2 { bottom: 10%; left: -4%; animation-delay: 1.8s; }

@keyframes mock-float {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-10px); }
}
@keyframes mock-float-alt {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .mock-card-front, .mock-float { animation: none; }
}

/* --- Feature grid --- */
.section { padding: 60px 0; }
.section-head { max-width: 620px; margin-bottom: 40px; }
.section-head h2 { font-size: 1.9rem; letter-spacing: -0.01em; }
.section-head p { color: var(--text-dim); margin-top: 10px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 24px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--purple-bright);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.feature .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.feature:nth-of-type(6n+1) .icon { background: linear-gradient(135deg, rgba(var(--purple-rgb),0.25), rgba(var(--purple-rgb),0.08)); }
.feature:nth-of-type(6n+2) .icon { background: linear-gradient(135deg, rgba(var(--green-rgb),0.25), rgba(var(--green-rgb),0.08)); }
.feature:nth-of-type(6n+3) .icon { background: linear-gradient(135deg, rgba(245,179,36,0.25), rgba(245,179,36,0.08)); }
.feature:nth-of-type(6n+4) .icon { background: linear-gradient(135deg, rgba(var(--purple-bright-rgb),0.25), rgba(var(--purple-bright-rgb),0.08)); }
.feature:nth-of-type(6n+5) .icon { background: linear-gradient(135deg, rgba(var(--green-rgb),0.22), rgba(var(--purple-rgb),0.10)); }
.feature:nth-of-type(6n+6) .icon { background: linear-gradient(135deg, rgba(245,179,36,0.22), rgba(var(--purple-rgb),0.10)); }
.feature h3 { font-size: 1.08rem; margin-bottom: 10px; }
.feature p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.6; margin: 0; }

/* --- Scroll-reveal: elemanlar görünür alana girince yukarıdan belirir --- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Cards / panels --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.card + .card { margin-top: 16px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.stat .label { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 6px; }
.stat .value { font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; font-weight: 600; }
.stat .value.purple { color: var(--purple-bright); }
.stat .value.green { color: var(--green); }
.stat .value.gold { color: var(--gold); }

/* --- Profile header --- */
.profile-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.profile-head .avatar {
  width: 72px; height: 72px; border-radius: 18px;
  border: 2px solid var(--border);
}
.profile-head .avatar-fallback {
  width: 72px; height: 72px; border-radius: 18px;
  background: linear-gradient(135deg, var(--purple), var(--green));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem; font-weight: 700; color: white;
}
.profile-head h1 { font-size: 1.5rem; }
.profile-head .sub { color: var(--text-dim); font-size: 0.9rem; margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.progress-track {
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--green));
  border-radius: 999px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.tag.job-legal_alt { color: var(--green); border-color: rgba(34,211,166,0.35); }
.tag.job-legal_ust { color: var(--purple-bright); border-color: rgba(167,139,250,0.35); }
.tag.job-illegal { color: var(--red); border-color: rgba(240,83,122,0.35); }

.field-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.field-row:last-child { border-bottom: none; }
.field-row .k { color: var(--text-dim); }
.field-row .v { font-weight: 500; }

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
thead th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.8rem;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
.rank-medal { font-size: 1.1rem; }

/* --- Inventory grid --- */
.inv-section { margin-bottom: 32px; }
.inv-section h3 { font-size: 1rem; margin-bottom: 12px; color: var(--text-dim); }
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.inv-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}
.inv-item .qty {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 600;
  color: var(--green);
  font-size: 0.8rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state .glyph { font-size: 2.2rem; margin-bottom: 12px; }

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
}

.tabs { display: flex; gap: 6px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.tab {
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--text); border-bottom-color: var(--purple-bright); }
.tab:hover { color: var(--text); }

/* --- Landing stats band (bento-style) --- */
.stats-band {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 52px;
}
@media (min-width: 720px) {
  .stats-band { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 20px;
  overflow: hidden;
  min-width: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--purple-bright);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -30%; right: -30%;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--purple-rgb), 0.28), transparent 70%);
  filter: blur(8px);
  animation: statGlowPulse 5s ease-in-out infinite;
}
.stat-card.accent-gold::before { background: radial-gradient(circle, rgba(245,179,36,0.3), transparent 70%); }
.stat-card.accent-purple::before { background: radial-gradient(circle, rgba(var(--purple-bright-rgb), 0.3), transparent 70%); }
.stat-card.accent-green::before { background: radial-gradient(circle, rgba(var(--green-rgb), 0.3), transparent 70%); }

@keyframes statGlowPulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .stat-card::before { animation: none; }
}
.stat-icon { font-size: 1.3rem; margin-bottom: 10px; }
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-card.accent-gold .stat-value { color: var(--gold); }
.stat-card.accent-purple .stat-value { color: var(--purple-bright); }
.stat-card.accent-green .stat-value { color: var(--green); }
.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* --- How it works steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.step:hover {
  background: var(--surface);
  border-color: var(--border);
  transform: translateY(-2px);
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(135deg, var(--green), var(--purple-bright));
  margin-bottom: 12px;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { color: var(--text-dim); font-size: 0.88rem; margin: 0; }
.step code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.85em;
  color: var(--purple-bright);
}

/* --- Mini progress (energy/hunger/happiness) --- */
.mini-bar-row { margin-bottom: 14px; }
.mini-bar-row:last-child { margin-bottom: 0; }
.mini-bar-label {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; color: var(--text-dim); margin-bottom: 5px;
}
.mini-bar-track {
  height: 6px; background: var(--surface-2); border-radius: 999px;
  overflow: hidden; border: 1px solid var(--border);
}
.mini-bar-fill { height: 100%; border-radius: 999px; }
.mini-bar-fill.energy { background: var(--purple-bright); }
.mini-bar-fill.hunger { background: var(--gold); }
.mini-bar-fill.happiness { background: var(--green); }

.next-tier-note {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.next-tier-note b { color: var(--text); }

/* --- Inventory category tabs + colored cards --- */
.inv-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.inv-tab {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
}
.inv-tab .count { color: var(--text); font-weight: 600; margin-left: 4px; }
.inv-tab:hover { border-color: var(--purple-bright); color: var(--text); }

.inv-item { border-left: 3px solid var(--purple); }
.inv-item.c-mineral { border-left-color: var(--gold); }
.inv-item.c-fish { border-left-color: #38BDF8; }
.inv-item.c-chest { border-left-color: var(--green); }
.inv-item.c-tool { border-left-color: var(--text-dim); }
.inv-item.c-ring, .inv-item.c-house { border-left-color: var(--red); }

/* --- Help / Yardım pages --- */
.cmd-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.cmd-row:last-child { border-bottom: none; }
.cmd-code {
  display: inline-block;
  width: fit-content;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.88rem;
  color: var(--purple-bright);
  font-family: 'Space Grotesk', monospace;
}
.cmd-desc { color: var(--text-dim); font-size: 0.92rem; line-height: 1.5; }

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.help-nav .tag { padding: 8px 14px; font-size: 0.85rem; }
.help-nav .tag-active { color: var(--purple-bright); border-color: var(--purple-bright); background: var(--surface-2); }

@media (min-width: 640px) {
  .cmd-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .cmd-desc { text-align: right; max-width: 55%; }
}

/* --- Tema seçici --- */
.theme-picker { position: relative; }
.theme-panel {
  display: none;
  position: fixed; /* JS ile ekrana göre konumlandırılır, taşma olmaz */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  z-index: 200;
  width: 220px;
  max-width: calc(100vw - 24px);
}
.theme-panel.open { display: block; }
.theme-panel-title { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 10px; }
.theme-panel-divider { height: 1px; background: var(--border); margin: 14px 0; border: none; }
.theme-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.theme-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 0;
  background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.theme-swatch:hover { transform: scale(1.12); }
.theme-swatch.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--purple-bright); }

.theme-swatch-rgb {
  background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
  animation: nexus-rgb-swatch-spin 4s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .theme-swatch-rgb { animation: none; }
}
@keyframes nexus-rgb-swatch-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.theme-swatch-rgb:hover { animation-play-state: paused; }

.theme-custom-rows { display: flex; flex-direction: column; gap: 8px; }
.theme-custom-row {
  display: grid;
  grid-template-columns: 1fr auto 84px;
  align-items: center;
  gap: 8px;
}
.theme-custom-row label { font-size: 0.78rem; color: var(--text-dim); }
.theme-custom-row input[type="color"] {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
}
.hex-input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
  font-family: monospace;
}
.hex-input:focus { border-color: var(--purple-bright); outline: none; }
.theme-custom-actions { display: flex; gap: 8px; margin-top: 12px; }
.theme-custom-actions .btn { flex: 1; text-align: center; }

.theme-glow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text);
}
.theme-glow-hint { font-size: 0.72rem; color: var(--text-dim); margin: 4px 0 0; }
.glow-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--purple);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.glow-toggle .glow-toggle-knob {
  position: absolute;
  top: 2px;
  left: 20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s ease;
}
.glow-toggle.off { background: var(--surface-2); }
.glow-toggle.off .glow-toggle-knob { left: 2px; }


.search-box input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text);
  width: 150px;
  outline: none;
}
.search-box input:focus { border-color: var(--purple-bright); }
.search-box input::placeholder { color: var(--text-dim); }

/* --- Leaderboard user cell / clan members / search results --- */
.lb-user, .search-result-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lb-user img {
  width: 28px; height: 28px; border-radius: 8px;
}
.search-result-row {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.search-result-row:last-child { border-bottom: none; }
.search-result-row:hover { background: var(--surface-2); }
.search-result-row img {
  width: 36px; height: 36px; border-radius: 10px;
}

/* --- Rounded table container fix --- */
table { border-radius: inherit; }
thead tr:first-child th:first-child { border-top-left-radius: 16px; }
thead tr:first-child th:last-child { border-top-right-radius: 16px; }
tbody tr:last-child td:first-child { border-bottom-left-radius: 16px; }
tbody tr:last-child td:last-child { border-bottom-right-radius: 16px; }

/* --- Flash messages --- */
.flash-stack { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.flash {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}
.flash-success { background: rgba(34,211,166,0.12); border-color: rgba(34,211,166,0.35); color: var(--green); }
.flash-error { background: rgba(240,83,122,0.12); border-color: rgba(240,83,122,0.35); color: var(--red); }

/* --- Shop / Pet catalog --- */
.shop-pager { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.shop-page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
}
.shop-page-btn.active { color: white; background: linear-gradient(135deg, var(--purple), #9333EA); border-color: transparent; }
.shop-page-btn:hover:not(.active) { border-color: var(--purple-bright); color: var(--text); }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.shop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.shop-card-name { font-weight: 600; font-size: 0.98rem; margin-bottom: 8px; }
.shop-card-desc { color: var(--text-dim); font-size: 0.85rem; line-height: 1.5; margin: 0 0 14px; flex-grow: 1; }
.shop-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-price { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--gold); font-size: 0.95rem; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }

.pazar-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pazar-form select, .pazar-form input[type="number"] {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font-size: 0.88rem;
}
.pazar-form select { min-width: 220px; }
.pazar-form input[type="number"] { width: 130px; }
.pazar-buy-form { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.pazar-buy-form input[type="number"] {
  width: 70px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-size: 0.88rem;
}

/* --- Quests --- */
.quest-card { margin-bottom: 14px; }
.quest-card.quest-done { border-color: rgba(34,211,166,0.4); }
.quest-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.quest-title { font-weight: 600; font-size: 0.95rem; }
.quest-progress-text { color: var(--text-dim); font-size: 0.85rem; }
.quest-desc { color: var(--text-dim); font-size: 0.85rem; margin: 0 0 12px; }
.quest-reward { margin-top: 12px; font-size: 0.85rem; color: var(--gold); }

/* --- Casino / clan forms --- */
.casino-form { display: flex; gap: 8px; flex-wrap: wrap; }
.casino-form input[type="text"],
.casino-form input[type="number"],
.casino-form select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.88rem;
  flex: 1;
  min-width: 100px;
  outline: none;
}
.casino-form input:focus, .casino-form select:focus { border-color: var(--purple-bright); }

/* --- Sellable inventory items --- */
.inv-item.sellable { flex-direction: column; align-items: stretch; gap: 8px; }
.btn-sell {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--green);
  cursor: pointer;
}
.btn-sell:hover { border-color: var(--green); }

/* --- Badges --- */
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
}
.badge-gold { color: var(--gold); border-color: rgba(245,179,36,0.35); }
.badge-red { color: var(--red); border-color: rgba(240,83,122,0.35); }
.badge-purple { color: var(--purple-bright); border-color: rgba(167,139,250,0.35); }
.badge-green { color: var(--green); border-color: rgba(34,211,166,0.35); }

/* --- Profile wall --- */
.wall-form { display: flex; gap: 8px; margin-bottom: 20px; }
.wall-form input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
}
.wall-form input:focus { border-color: var(--purple-bright); }
.wall-messages { display: flex; flex-direction: column; gap: 12px; }
.wall-message {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.wall-author { font-weight: 600; font-size: 0.85rem; color: var(--purple-bright); }
.wall-message p { margin: 4px 0 0; font-size: 0.88rem; color: var(--text); }

/* --- Featured user card --- */
.featured-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(34,211,166,0.1));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 26px;
}
.featured-badge { font-size: 0.78rem; color: var(--green); font-weight: 600; margin-bottom: 14px; }
.featured-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.featured-avatar { width: 56px; height: 56px; border-radius: 14px; }
.featured-name { font-weight: 700; font-size: 1.05rem; }
.featured-sub { color: var(--text-dim); font-size: 0.85rem; margin-top: 2px; }

/* --- Propose form select --- */
.propose-select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

/* --- Nav notification badges --- */
.nav-link-badge { display: inline-flex; align-items: center; gap: 6px; }
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

/* ============================================================
   GENEL "OYUN HİSSİ" GEÇİŞİ — buton basma animasyonu, kart derinliği,
   form/input birleştirme, hover glow
   ============================================================ */

.btn { transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease; }
.btn:active { transform: scale(0.96); }
.btn-primary { box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5); }

.card, .shop-card, .feature, .stat-card, .quest-card, .wall-message, .inv-item, .friend-card, .featured-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
/* AÇIK/İSTEK: tema renkleri artık sadece yazılarda değil, Discord embed'lerini
   andıran bu sol vurgu çizgisiyle her "kart" bileşeninde de görünüyor.
   NOT: .inv-item hariç tutuldu, çünkü onun kendi eşya-tipi renk kodlaması var
   (maden=altın, balık=mavi, sandık=yeşil vb. — bkz. .inv-item.c-* kuralları). */
.card, .shop-card, .feature, .stat-card, .quest-card, .wall-message, .friend-card, .featured-card {
  border-left: 4px solid var(--purple);
}
.card:hover, .shop-card:hover {
  border-color: var(--purple-bright);
  border-left-color: var(--purple-bright);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.inv-item:hover { border-color: var(--purple-bright); transform: translateY(-2px); }

/* Tüm form input/select tek görsel dil */
input[type="text"], input[type="number"], select, .wall-form input, .propose-select {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus, input[type="number"]:focus, select:focus {
  border-color: var(--purple-bright) !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.casino-form { display: flex; gap: 10px; flex-wrap: wrap; }
.casino-form input, .casino-form select { flex: 1; min-width: 110px; }
@media (max-width: 480px) {
  .casino-form { flex-direction: column; }
  .casino-form input, .casino-form select, .casino-form button { width: 100%; }
}

/* Sandık/mağaza/pet kartlarına hafif üst glow şeridi */
.shop-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.shop-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-bright);
  box-shadow: 0 14px 32px rgba(0,0,0,0.35);
}
.shop-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--green));
  opacity: 0;
  transition: opacity 0.2s ease;
}
.shop-card:hover::before { opacity: 1; }
.shop-card.selected {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(var(--green-rgb), 0.08), transparent);
}

/* Progress bar animasyonlu dolum */
.progress-fill, .mini-bar-fill { transition: width 0.5s ease; }

/* Rozetlere hafif parlama */
.badge { transition: transform 0.15s ease; }
.badge:hover { transform: scale(1.05); }

/* --- Admin panel --- */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.admin-row:last-child { border-bottom: none; }
.admin-row:hover { background: var(--surface-2); }

/* --- Duyuru banner'ı --- */
.announcement-banner {
  background: linear-gradient(90deg, rgba(124,58,237,0.25), rgba(34,211,166,0.2));
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 500;
}

/* Arama kutusu pill şeklini genel input kuralından koru */
.search-box input {
  border-radius: 999px !important;
  width: 150px;
}

/* --- Sandık açılış animasyonu --- */
.chest-reveal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 11, 20, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.2s ease;
}
.chest-reveal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  max-width: 360px;
  width: 90%;
}
.chest-reveal-emoji {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: chestShake 0.9s ease;
}
.chest-reveal-emoji.chest-burst {
  animation: chestBurst 0.5s ease;
}
.chest-reveal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.chest-reveal-message {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.6;
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes chestShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(-8deg) scale(1.05); }
  30% { transform: rotate(8deg) scale(1.05); }
  45% { transform: rotate(-8deg) scale(1.08); }
  60% { transform: rotate(8deg) scale(1.08); }
  75% { transform: rotate(-4deg) scale(1.1); }
}
@keyframes chestBurst {
  0% { transform: scale(0.5); opacity: 0; text-shadow: 0 0 0 transparent; }
  50% { transform: scale(1.4); text-shadow: 0 0 40px rgba(245, 179, 36, 0.8); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Profil isim efektleri (Görünen Ad Stili) --- */
@keyframes nexus-rainbow-text {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* =========================================================
   ORTAK SUNUCULAR — dikey kayan sunucu vitrini
   ========================================================= */

/* =========================================================
   DAKTİLO (TYPEWRITER) ROZETİ — komut ipuçlarını terminal
   tarzında yazıp siliyor. Sadece textContent değişimi ve
   opacity kullanır, kasma yapmaz.
   ========================================================= */
.typewriter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 18px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(15, 12, 24, 0.55);
  border: 1px solid rgba(var(--purple-rgb, 124, 58, 237), 0.35);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13.5px;
  color: var(--green, #22D3A6);
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}
.typewriter-badge .tw-prompt {
  color: var(--purple-bright, var(--purple, #7C3AED));
  font-weight: 700;
}
.typewriter-badge .tw-text {
  color: var(--text, #e9e9f5);
}
.typewriter-badge .tw-cursor {
  color: var(--green, #22D3A6);
  animation: tw-blink 1s steps(1) infinite;
}
@keyframes tw-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .typewriter-badge .tw-cursor { animation: none; }
}
html.fx-off .typewriter-badge .tw-cursor { animation: none; opacity: 1; }
@media (max-width: 640px) {
  .typewriter-badge { font-size: 12px; padding: 7px 11px; }
}

.nxp-wrap {
  max-width: 1100px;
  margin: 0 auto 32px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- Dikey kayan sunucu şeridi (yukarıdan aşağıya) --- */
.nxp-scroll-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 4px 8px;
}

.nxp-scroll {
  height: 56px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.nxp-scroll-track {
  display: flex;
  flex-direction: column;
  animation: nxp-scroll-up 16s linear infinite;
}

.nxp-scroll:hover .nxp-scroll-track {
  animation-play-state: paused;
}

.nxp-scroll-item {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  font-size: 0.9rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.nxp-scroll-item img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.nxp-scroll-item span {
  font-weight: 600;
  color: var(--text);
}

@keyframes nxp-scroll-up {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* =========================================================
   ORTAK DEKORATİF EFEKTLER — hover ışıltısı, konfeti,
   sayfa geçiş fade'i, maskot, ampul arıza (flicker) efekti.
   Tamamı transform/opacity kullanır, layout/paint tetiklemez.
   ========================================================= */

/* ---- Hover ışıltısı: imleci takip eden yumuşak glow ---- */
.feature, .stat-card, .step, .btn, .theme-swatch, .featured-card {
  position: relative;
  isolation: isolate;
}
.feature::after, .stat-card::after, .step::after, .btn::after,
.theme-swatch::after, .featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%),
              rgba(var(--purple-rgb, 124, 58, 237), 0.35), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 0;
}
.feature.glow-hover::after, .stat-card.glow-hover::after, .step.glow-hover::after,
.btn.glow-hover::after, .theme-swatch.glow-hover::after, .featured-card.glow-hover::after {
  opacity: 1;
}
html.glow-off .feature::after, html.glow-off .stat-card::after, html.glow-off .step::after,
html.glow-off .btn::after, html.glow-off .theme-swatch::after, html.glow-off .featured-card::after {
  display: none;
}

/* ---- Konfeti patlaması ---- */
.nexus-confetti-host {
  position: fixed;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 9999;
}
.confetti-piece {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 12px;
  margin: -6px 0 0 -4px;
  background: var(--c, #fff);
  border-radius: 2px;
  opacity: 0;
  animation: confetti-burst 1s cubic-bezier(.2,.7,.3,1) forwards;
  will-change: transform, opacity;
}
@keyframes confetti-burst {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 160px)) rotate(var(--rot)) scale(0.6); }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-piece { animation: none; opacity: 0; }
}

/* ---- Yumuşak sayfa geçişi (fade) ---- */
html.page-fade-ready body {
  opacity: 0;
  transition: opacity 0.22s ease;
}
html.page-fade-ready.page-fade-in body {
  opacity: 1;
}
html.page-fade-ready.page-fade-out body {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  html.page-fade-ready body { transition: none; opacity: 1; }
}

/* ---- Maskot (küçük ejderha/pet, sadece anasayfa hero'sunda) ---- */
.nexus-mascot {
  position: absolute;
  right: -6px;
  bottom: -14px;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(var(--green-rgb,34,211,166),0.35), rgba(var(--purple-rgb,124,58,237),0.25));
  box-shadow: 0 0 18px 4px rgba(var(--purple-rgb,124,58,237),0.35);
  cursor: pointer;
  animation: mascot-bob 3.2s ease-in-out infinite;
  user-select: none;
  z-index: 4;
}
.nexus-mascot-bubble {
  position: absolute;
  bottom: 64px;
  right: -10px;
  max-width: 168px;
  background: rgba(20, 16, 32, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text, #fff);
  font-size: 12px;
  line-height: 1.35;
  padding: 8px 10px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  white-space: normal;
}
.nexus-mascot-bubble.show { opacity: 1; transform: translateY(0); }
@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-9px) rotate(4deg); }
}
html.fx-off .nexus-mascot { animation: none; }
html.fx-off .nexus-mascot-bubble { display: none; }
@media (prefers-reduced-motion: reduce) {
  .nexus-mascot { animation: none; }
}

/* Parallax destek: hero-mock transform ile kayar */
.hero-mock { will-change: transform; }


/* =========================================================
   Yeni sayfalar (Hediye, Piyango, Arazi, Meslekler, Avcılık,
   Şirketler, Blackjack, Poker, Rus Ruleti, Mini Oyunlar) — ortak
   güzelleştirme: sayfa ikonu rozeti, oyun masası dokusu, stat pilleri
   ========================================================= */

.page-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 1.7rem;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(var(--purple-rgb), 0.25), rgba(var(--green-rgb), 0.15));
  box-shadow: 0 0 0 1px var(--border);
}

/* Kart oyunları için kadife masa dokusu */
.game-table {
  position: relative;
  border-radius: 24px;
  padding: 32px 24px;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(var(--green-rgb), 0.15), transparent 60%),
    radial-gradient(circle at 15% 100%, rgba(var(--purple-rgb), 0.12), transparent 55%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.25), 0 20px 50px rgba(0,0,0,0.3);
}

/* Oynanabilir iskambil kartı görünümü (Blackjack/Poker) */
.playing-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 90px;
  border-radius: 10px;
  background: #f4f4f6;
  color: #16161a;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.06);
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.playing-card:hover { transform: translateY(-4px); }
.playing-card .pc-rank { font-size: 1.15rem; line-height: 1; }
.playing-card .pc-suit { font-size: 1.3rem; margin-top: 4px; }
.playing-card.pc-red { color: #d6294a; }
.playing-card.pc-held { box-shadow: 0 0 0 3px var(--green), 0 6px 16px rgba(0,0,0,0.35); }
.playing-card.pc-back {
  background: linear-gradient(135deg, var(--purple-bright), var(--purple));
  color: transparent;
}
.playing-card.pc-back::after {
  content: '?';
  color: rgba(255,255,255,0.5);
  font-size: 1.5rem;
}

/* Stat pilleri (enerji, kredi notu, çalışma sayısı vb. küçük rozetler) */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.stat-pill strong { color: var(--text); }

/* Enerji/ilerleme çubuğu */
.energy-bar {
  height: 8px;
  border-radius: 6px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 6px;
}
.energy-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--purple-bright));
  transition: width 0.4s ease;
}
