/* =============================================================================
   GMCHESS — Login & Cadastro  v3.0  |  "Marble & Obsidian" Premium Dark
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=JetBrains+Mono:wght@400;600&display=swap');

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

:root {
  --bg:        #09090d;
  --surface:   #111118;
  --surface2:  #17171f;
  --surface3:  #1e1e28;
  --border:    #252535;
  --border2:   #303045;
  --accent:    #c9a84c;
  --accent2:   #e8c96b;
  --accent-dim: rgba(201,168,76,0.15);
  --red:       #d04040;
  --text:      #ddd8d0;
  --text2:     #9a9590;
  --text3:     #55504a;
  --gold-glow: rgba(201,168,76,0.22);
}

html, body {
  height: 100%;
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 50%, rgba(201,168,76,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 20%, rgba(100,80,200,0.04) 0%, transparent 55%),
    repeating-linear-gradient(45deg, transparent, transparent 60px, rgba(255,255,255,0.008) 60px, rgba(255,255,255,0.008) 61px);
}

body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 80%);
}

.container {
  position: relative; z-index: 2;
  width: 100%; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px; gap: 20px;
}

.chess-logo {
  text-align: center;
  animation: fadeSlideDown 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

.chess-logo .pieces {
  font-size: 1.6rem;
  letter-spacing: 10px;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px var(--gold-glow));
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 10px var(--gold-glow)); }
  50%       { filter: drop-shadow(0 0 24px rgba(201,168,76,0.45)); }
}

.chess-logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.45em; text-transform: uppercase;
}

.form-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 38px 36px;
  width: 100%; max-width: 420px;
  position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 32px 80px rgba(0,0,0,0.7), 0 0 60px rgba(201,168,76,0.04);
  animation: fadeSlideUp 0.65s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}

.form-box::before {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.form-box::after {
  content: '♛';
  position: absolute; top: 16px; right: 18px;
  font-size: 22px; opacity: 0.06; color: var(--accent); pointer-events: none;
}

@keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeSlideUp   { from { opacity: 0; transform: translateY(20px);  } to { opacity: 1; transform: translateY(0); } }

.form-box h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700;
  color: var(--text);
  margin-bottom: 6px; letter-spacing: 0.02em;
}

.subtitle {
  font-size: 0.82rem; color: var(--text2);
  margin-bottom: 26px; line-height: 1.5;
}

label {
  display: block;
  font-size: 0.72rem; font-weight: 600; color: var(--text2);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 6px; margin-top: 16px;
}
label:first-of-type { margin-top: 0; }

input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem; font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus {
  border-color: var(--accent);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1), 0 0 20px rgba(201,168,76,0.08);
}
input::placeholder { color: var(--text3); }

.btn-primary {
  width: 100%; margin-top: 22px; padding: 13px 20px;
  background: linear-gradient(135deg, #8a6c18, #c9a84c, #8a6c18);
  background-size: 200% auto;
  color: #0d0a04;
  font-size: 0.9rem; font-weight: 700; font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.08em;
  border: none; border-radius: 10px; cursor: pointer;
  transition: background-position 0.4s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(201,168,76,0.35);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn-primary:hover { background-position: right center; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(201,168,76,0.5); }
.btn-primary:active { transform: translateY(0); }

.btn-success {
  width: 100%; margin-top: 10px; padding: 11px 20px;
  background: transparent; color: var(--text2);
  font-size: 0.85rem; font-family: 'DM Sans', sans-serif; font-weight: 500;
  border: 1px solid var(--border2); border-radius: 10px; cursor: pointer;
  transition: all 0.18s;
}
.btn-success:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text3); font-size: 0.75rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent2); text-decoration: underline; }

.footer-text { text-align: center; font-size: 0.8rem; color: var(--text2); margin-top: 14px; }

.link-voltar {
  display: block; text-align: center; margin-top: 18px;
  font-size: 0.78rem; color: var(--text3); text-decoration: none; transition: color 0.15s;
}
.link-voltar:hover { color: var(--text2); text-decoration: none; }

/* Payment */
.payment-methods { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.method-option { flex: 1; min-width: 70px; cursor: pointer; }
.method-option input { display: none; }
.method-option .icon {
  width: 100%; height: 44px; object-fit: contain; padding: 6px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface2); transition: all 0.18s; display: block;
}
.method-option input:checked ~ .icon { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 2px rgba(201,168,76,0.2); }
.card-types { display: flex; gap: 10px; margin-bottom: 16px; }
.type-option { flex: 1; cursor: pointer; }
.type-option input { display: none; }
.type-option span {
  display: block; padding: 9px; border: 1px solid var(--border); border-radius: 8px;
  text-align: center; font-size: 0.82rem; color: var(--text2); background: var(--surface2); transition: all 0.15s;
}
.type-option input:checked ~ span { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

@media (max-height: 700px) {
  .container { overflow-y: auto; justify-content: flex-start; padding-top: 24px; }
  html, body { overflow: auto; }
  .form-box { padding: 28px 26px; }
}
@media (max-width: 480px) {
  .form-box { padding: 28px 22px; border-radius: 16px; }
  .chess-logo h1 { font-size: 1.3rem; }
}

/* ── MOBILE RESPONSIVO (melhorias v23) ────────────────────────────────── */
@media (max-width: 420px) {
  .container { padding: 12px; align-items: flex-start; justify-content: flex-start; padding-top: 16px; }
  html, body { overflow: auto; min-height: 100%; height: auto; }
  .form-box {
    width: 100%;
    max-width: 100%;
    padding: 22px 16px 20px;
    border-radius: 14px;
    margin: 0 auto;
  }
  .form-box h1 { font-size: 1.2rem; }
  input[type="text"], input[type="email"], input[type="password"] {
    font-size: 16px; /* evita zoom automático no iOS */
    padding: 11px 12px;
  }
  .btn-primary, .btn-secondary { padding: 12px 14px; font-size: 0.9rem; }
}
