:root {
  --bg: #050816;
  --bg-soft: #070b1f;
  --panel: rgba(15, 23, 42, 0.9);
  --panel-soft: rgba(15, 23, 42, 0.75);
  --border: rgba(148, 163, 184, 0.2);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --accent-strong: rgba(59, 130, 246, 0.35);
  --danger: #ef4444;
  --text: #e5e7eb;
  --text-soft: #9ca3af;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
  --glass-blur: 18px;
  font-size: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
}

/* GENEL BODY BACKGROUND */
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 60%),
    radial-gradient(circle at 100% 0%, rgba(129, 140, 248, 0.18), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(94, 234, 212, 0.12), transparent 60%),
    linear-gradient(135deg, #020617, #020617 48%, #020617 100%);
  color: var(--text);
}

/* =======================================================
   GİRİŞ SAYFASI
======================================================= */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  width: 100%;
  max-width: 960px;
  padding: 20px;
}

.auth-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-logo-circle {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: radial-gradient(circle at 0% 0%, #38bdf8, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #e5f3ff;
  font-size: 1rem;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9);
}

.auth-logo-text {
  display: flex;
  flex-direction: column;
}

.auth-logo-main {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.auth-logo-sub {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 16px;
  background: var(--panel-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(var(--glass-blur));
  padding: 16px;
}

/* SOL / PREVIEW */
.auth-preview {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(
      circle at 0% 0%,
      rgba(56, 189, 248, 0.2),
      rgba(15, 23, 42, 0.98)
    );
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-preview-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.auth-avatar-big {
  width: 120px;
  height: 120px;
  border-radius: 40px;
  background: radial-gradient(circle at 0% 0%, #38bdf8, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.9);
  margin-bottom: 10px;
  overflow: hidden;
}

.auth-preview-nick {
  font-size: 1rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 4px;
}

.auth-preview-role {
  font-size: 0.85rem;
  color: #a5b4fc;
  margin-bottom: 8px;
}

.auth-small-info {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-bottom: 10px;
}

/* Avatar seç butonu */
.avatar-select-btn {
  margin-top: 4px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: radial-gradient(
      circle at 0% 0%,
      rgba(59, 130, 246, 0.4),
      rgba(15, 23, 42, 0.98)
    );
  color: #e5f3ff;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.85);
}

/* SAĞ / FORM */
.auth-form-wrap {
  display: flex;
  flex-direction: column;
}

.auth-tab-row {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.96);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 2px;
  margin-bottom: 12px;
}

.auth-tab {
  border: none;
  background: transparent;
  color: var(--text-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  flex: 1;
  text-align: center;
}

.auth-tab.active {
  background: radial-gradient(
      circle at 0% 0%,
      rgba(59, 130, 246, 0.5),
      rgba(37, 99, 235, 0.95)
    );
  color: white;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.7);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-field label {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.auth-field input[type="text"],
.auth-field input[type="password"] {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.96);
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.auth-field input::placeholder {
  color: #6b7280;
}

/* Cinsiyet pill row */
.auth-gender-row {
  display: flex;
  gap: 8px;
}

.gender-pill {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.96);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-soft);
}

.gender-pill input {
  display: none;
}

.gender-pill .gender-emoji {
  font-size: 1rem;
}

.gender-pill.active {
  border-color: rgba(96, 165, 250, 0.9);
  background: radial-gradient(
      circle at 0% 0%,
      rgba(59, 130, 246, 0.4),
      rgba(15, 23, 42, 0.98)
    );
  color: #e5f3ff;
}

/* Hatırla - Kurallar */
.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.auth-check input {
  accent-color: #3b82f6;
}

.auth-terms {
  text-align: right;
}

/* Submit */
.auth-submit-btn {
  margin-top: 6px;
  border-radius: 999px;
  border: none;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #3b82f6, #22c55e);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.75);
  transition: 0.16s ease;
}

.auth-submit-btn span {
  font-size: 1rem;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.9);
}

.auth-form-footer {
  margin-top: 4px;
  font-size: 0.8rem;
}

.auth-form-footer a {
  color: #93c5fd;
  text-decoration: none;
}

.auth-form-footer a:hover {
  text-decoration: underline;
}

/* Auth Responsive */
@media (max-width: 800px) {
  .auth-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===================== AVATAR MODAL ===================== */

.avatar-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  display: none;            /* JS ile .open gelince flex olacak */
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.avatar-modal.open {
  display: flex;
}

.avatar-modal-inner {
  width: 430px;
  max-width: calc(100% - 40px);
  background: rgba(15, 23, 42, 0.98);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  padding: 14px;
}

.avatar-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-top: 4px;
}

.avatar-choice {
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.16s;
}

.avatar-choice:hover {
  border-color: rgba(59, 130, 246, 0.8);
  transform: translateY(-1px);
}

.modal-close-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border-radius: 999px;
  border: none;
  background: #ef4444;
  color: white;
  cursor: pointer;
  font-size: 0.85rem;
}
