/* ============================================================
   Nyro — Login Page
   ============================================================ */

:root {
  --bg: #0a0812;
  --bg-surface: #110e1c;
  --card: rgba(255, 255, 255, 0.05);
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #e9ecf5;
  --muted: #b8c0d8;
  --primary: #9c6bff;
  --primary-2: #5fe4ff;
  --primary-glow: rgba(156, 107, 255, 0.35);
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --discord-glow: rgba(88, 101, 242, 0.3);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  /* Karanlık temada beyaz gradient */
  --brand-grad-start: #ffffff;
  --brand-grad-end: #e2e8f0;
}

:root[data-theme="light"] {
  --bg: #f8fafc;
  --bg-surface: #ffffff;
  --card: #ffffff;
  --stroke: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #7c3aed;
  --primary-2: #0284c7;
  --primary-glow: rgba(124, 58, 237, 0.25);
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --discord-glow: rgba(88, 101, 242, 0.2);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  /* Açık temada canlı gradient */
  --brand-grad-start: var(--primary);
  --brand-grad-end: var(--primary-2);
}

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

html, body {
  height: 100%;
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden; /* sadece yatay scroll engelle, dikey serbest */
}

/* ── Mesh Background ───────────────────────────────── */
.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
  background-color: var(--bg); /* light/dark temada alan her zaman dolu */
}

/* Minimalist Dot Grid */
.login-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(var(--text) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.03;
  z-index: -2;
  pointer-events: none;
}

/* Mesh Gradient Blurs */
.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
  transition: background 0.3s ease;
}
.mesh-blob-1 {
  top: -10%; left: -5%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(156, 107, 255, 0.15) 0%, transparent 70%);
}
.mesh-blob-2 {
  bottom: -15%; right: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(95, 228, 255, 0.1) 0%, transparent 70%);
}

:root[data-theme="light"] .mesh-blob-1 { background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%); }
:root[data-theme="light"] .mesh-blob-2 { background: radial-gradient(circle, rgba(2, 132, 199, 0.1) 0%, transparent 70%); }
:root[data-theme="light"] .login-bg::before { opacity: 0.05; }

/* ── Card ──────────────────────────────────────────────── */
.login-card {
  display: flex;
  width: 960px;
  max-width: 100%;
  min-height: 520px;
  background: var(--bg-surface);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}

/* ── LEFT SIDE (Stats & Info) ──────────────────────────── */
.login-left {
  flex: 0 0 50%;
  padding: 60px 40px 60px 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 100%);
  border-right: 1px solid var(--stroke);
  position: relative;
  overflow: hidden;
}

:root[data-theme="light"] .login-left {
  background: linear-gradient(135deg, rgba(0,0,0,0.02) 0%, transparent 100%);
}

.login-brand-wrap {
  margin-bottom: auto;
}

.login-brand {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  background: linear-gradient(120deg, var(--brand-grad-start) 0%, var(--brand-grad-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.login-tagline {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 400;
}

/* ── Animated Stats Timeline ────────────────────────────── */
.stats-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin: 40px 0;
}

.tl-track {
  display: none !important;
}

.tl-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border-radius: 2px;
  box-shadow: 0 0 12px var(--primary-glow);
  transition: height 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 2;
  cursor: default;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.6;
}

.tl-dot {
  position: absolute;
  left: -39px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--stroke);
  transition: border-color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
  z-index: 3;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

/* Active State */
.stat-item.is-active {
  opacity: 1;
  transform: translateX(5px);
}

.stat-item.is-active .tl-dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), 0 0 12px var(--primary-glow);
  transform: translateY(-50%) scale(1.2);
}

.stat-val {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 2rem;
  color: var(--primary);
  opacity: 0.8;
}

.stat-label {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  margin-top: 4px;
}

/* Live Status */
.live-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--stroke);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  width: max-content;
  align-self: flex-start;
  margin-left: -39px; /* dot pozisyonuyla hizala */
}

/* Tagline accent (Güçlü / Renkli) */
.tagline-accent {
  font-weight: 800;
  font-style: normal;
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ── RIGHT SIDE (Login Actions) ────────────────────────── */
.login-right {
  flex: 1;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0;
  position: relative;
}

.login-discord-icon {
  font-size: 4rem;
  color: var(--discord);
  margin-bottom: 24px;
  filter: drop-shadow(0 8px 20px rgba(88, 101, 242, 0.4));
  animation: lf-float 4s ease-in-out infinite;
}

@keyframes lf-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.login-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.login-desc {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 300px;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  gap: 12px;
  background: var(--discord);
  color: #fff;
  text-decoration: none;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.2px;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 0 0 transparent, 0 8px 25px var(--discord-glow);
}

.btn-discord:hover {
  background: var(--discord-hover);
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--discord), 0 12px 30px rgba(88, 101, 242, 0.5);
}

.btn-discord i {
  font-size: 1.4rem;
}

.terms-text {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.6;
  max-width: 280px;
  line-height: 1.5;
  transition: opacity 0.3s;
}
.terms-text:hover { opacity: 1; }

.terms-text a {
  color: var(--primary);
  text-decoration: none;
}
.terms-text a:hover { text-decoration: underline; }

/* ── Theme toggle ── */
.login-theme-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.login-theme-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

:root[data-theme="light"] .login-theme-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

.login-theme-btn i {
  font-size: 0.95rem;
}

/* ── Back home link ── */
.login-back {
  position: absolute;
  top: 28px;
  left: 32px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.25s;
}

.login-back:hover {
  color: var(--text);
}

/* ── Responsive ────────────────────────────────────────── */
/* ── Responsive (tablet & mobil) ─────────────────────────────────── */
@media (max-width: 850px) {
  /* Dikey scroll açık */
  html, body { overflow-y: auto; }

  .login-bg {
    align-items: flex-start;   /* Kart viewport'tan uzunsa başından başlasın */
    padding: 48px 16px 48px;
    min-height: 100dvh;
  }

  .login-card {
    flex-direction: column;
    width: 100%;
    min-height: unset;
    border-radius: 20px;
  }

  /* Sol panel: dengeli padding, içerik ortada */
  .login-left {
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--stroke);
    padding: 36px 28px 32px 28px;
    overflow: visible;          /* dot'ların kırpılmaması için */
    align-items: center;
    text-align: center;
  }

  .login-brand-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .login-brand { font-size: 2.2rem; }

  .stats-timeline {
    margin: 28px auto;
    gap: 20px;
    width: max-content;
    align-items: flex-start;
  }

  .stat-item {
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    padding-left: 30px;
  }

  .stat-item.is-active {
    transform: translateX(5px);
  }

  .tl-dot {
    left: 0;
  }

  .stat-content  { align-items: flex-start; }
  .stat-val      { font-size: 2.2rem; gap: 10px; }
  .stat-icon     { font-size: 1.8rem; }
  .stat-label    { text-align: left; }

  .live-status   { align-self: center; margin-left: 0; }

  /* Sağ panel */
  .login-right {
    padding: 40px 28px 44px;
  }

  .login-desc { margin-bottom: 32px; }
}

@media (max-width: 480px) {
  .login-bg { padding: 36px 12px 40px; }

  .login-left {
    padding: 28px 20px 28px 20px;
  }

  .login-brand { font-size: 1.9rem; }

  .stats-timeline { gap: 16px; margin: 20px auto; }
  .stat-val       { font-size: 1.9rem; }
  .stat-icon      { font-size: 1.5rem; }

  .login-right   { padding: 32px 20px 40px; }
  .login-title   { font-size: 1.8rem; }
  .login-discord-icon { font-size: 3rem; margin-bottom: 16px; }

  .login-theme-btn {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .btn-discord  { font-size: 1rem; padding: 14px 16px; }
  .terms-text   { font-size: 0.72rem; }
}
