/* ═══════════════════════════════════════════════════════════════
   OyunTECH — Auth Pages (Login, Register, Reset, New Password)
   Ortak CSS — auth.css olarak kaydet
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #0a0b0e;
  --surface: rgba(240,244,255,0.03);
  --surface-2: rgba(240,244,255,0.06);
  --border: rgba(240,244,255,0.09);
  --border-strong: rgba(240,244,255,0.15);
  --text: #f3f4f7;
  --text-secondary: rgba(243,244,247,0.66);
  --text-muted: #989aa2;
  --accent: #b9fa4d;
  --accent-ink: #102112;
  --accent-bg: rgba(185,250,77,0.12);
  --accent-border: rgba(185,250,77,0.32);
  --accent-glow: rgba(185,250,77,0.20);
  --danger: #f87171;
  --danger-bg: rgba(248,113,113,0.12);
  --success: #34d399;
  --success-bg: rgba(52,211,153,0.12);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
}

html, body {
  height: 100%;
  font-family: 'Manrope', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px;
}

/* ── BG: düz, sade koyu arka plan ── */

/* ── AUTH BOX ── */
.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

/* Register daha geniş */
.auth-wrapper.auth-wide {
  max-width: 540px;
}

.auth-box {
  background: rgba(12,16,23,0.95);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  backdrop-filter: none;
  box-shadow:
    0 24px 64px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.03) inset;
  overflow: hidden;
  animation: authIn 0.5s ease both;
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ── */
.auth-logo {
  text-align: center;
  padding: 32px 28px 16px;
}

.auth-logo img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

/* ── Header ── */
.auth-header {
  text-align: center;
  padding: 0 28px 20px;
}

.auth-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.auth-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Alerts ── */
.auth-alert {
  margin: 0 24px 16px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-alert--error {
  background: var(--danger-bg);
  border: 1px solid rgba(248,113,113,0.25);
  color: var(--danger);
}

.auth-alert--error::before {
  content: '⚠';
  font-size: 1rem;
}

.auth-alert--success {
  background: var(--success-bg);
  border: 1px solid rgba(52,211,153,0.25);
  color: var(--success);
}

.auth-alert--success::before {
  content: '✓';
  font-size: 1rem;
}

/* ── Form ── */
.auth-form {
  padding: 0 28px 28px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-field label a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.auth-field label a:hover {
  text-decoration: underline;
}

.auth-input {
  position: relative;
}

.auth-input input,
.auth-field input[type="text"],
.auth-field input[type="password"],
.auth-field input[type="email"],
.auth-field input[type="number"] {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* İkon olmayan input'lar */
.auth-field-plain input {
  padding-left: 14px !important;
}

.auth-input input:focus,
.auth-field input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-input input::placeholder,
.auth-field input::placeholder {
  color: var(--text-muted);
}

.auth-input .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

/* Help text */
.auth-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Row layout (şifre yan yana) ── */
.auth-row {
  display: flex;
  gap: 12px;
}

.auth-row .auth-field {
  flex: 1;
}

@media (max-width: 480px) {
  .auth-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ── Radio buttons (Cinsiyet) ── */
.auth-radio-group {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.auth-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.auth-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: 50%;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}

.auth-radio input[type="radio"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.auth-radio input[type="radio"]:checked::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #000;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.auth-radio label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
  cursor: pointer;
}

/* ── Captcha ── */
.captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.captcha-code {
  min-width: 90px;
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  padding: 10px 14px;
  border-radius: var(--r-md);
  letter-spacing: 4px;
  user-select: none;
  font-family: 'Courier New', monospace;
  color: var(--accent);
}

.captcha-row input {
  flex: 1;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.captcha-row input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.captcha-row input::placeholder {
  color: var(--text-muted);
}

/* ── Checkbox (Sözleşme) ── */
.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: 5px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  position: relative;
  margin-top: 2px;
  transition: background 0.15s, border-color 0.15s;
}

.auth-checkbox input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.auth-checkbox input[type="checkbox"]:checked::after {
  content: '✓';
  color: #000;
  font-size: 12px;
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.auth-checkbox span {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.auth-checkbox a {
  color: var(--accent);
  text-decoration: none;
}

.auth-checkbox a:hover {
  text-decoration: underline;
}

/* ── Buttons ── */
.auth-actions {
  margin-top: 20px;
}

.btn-auth {
  width: 100%;
  padding: 13px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: filter 0.15s, box-shadow 0.15s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(185,250,77,0.25);
}

.btn-auth:hover {
  filter: brightness(1.12);
  box-shadow: 0 8px 24px rgba(185,250,77,0.35);
  transform: translateY(-1px);
}

.btn-auth:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

/* ── Remember me ── */
.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.auth-remember input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.auth-remember input[type="checkbox"]:checked::after {
  content: '✓';
  color: #000;
  font-size: 11px;
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.auth-remember label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
}

/* ── Divider ── */
.auth-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── Secondary button (Kayıt/Giriş link) ── */
.btn-auth-ghost {
  display: block;
  width: 100%;
  padding: 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: background 0.15s, border-color 0.15s, transform 0.15s, color 0.15s;
}

.btn-auth-ghost:hover {
  background: var(--surface);
  border-color: var(--accent-border);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--accent);
}

/* ── Footer ── */
.auth-footer {
  text-align: center;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}

.auth-footer span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding-top: 24px;
  }
  .auth-logo { padding: 24px 20px 12px; }
  .auth-logo img { max-width: 140px; }
  .auth-header h1 { font-size: 1.15rem; }
  .auth-form { padding: 0 20px 24px; }
  .auth-footer { padding: 12px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-box { animation: none; }
  .btn-auth, .btn-auth-ghost { transition: none; }
}