/* ============================================================
   JAMANA AUTH — CSS Premium
   signup.php · login.php · verification.php · forgot-password.php
   ============================================================ */

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

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

:root {
    --bg:        #080808;
    --card:      rgba(14,14,14,.92);
    --red:       #ff0000;
    --red2:      #cc0000;
    --red-glow:  rgba(255,0,0,.2);
    --text:      #f1f1f1;
    --text2:     #94a3b8;
    --text3:     #64748b;
    --border:    rgba(255,255,255,.08);
    --input-bg:  rgba(255,255,255,.05);
    --input-focus: rgba(255,255,255,.1);
    --success:   #10b981;
    --danger:    #ef4444;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── BACKGROUND ── */
.auth-bg {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255,0,0,.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255,0,0,.07) 0%, transparent 50%),
        #080808;
}
.auth-bg-grid {
    position: absolute; inset: 0; opacity: .04;
    background-image:
        linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── WRAPPER ── */
.auth-wrapper {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}

/* ── CARD ── */
.auth-card {
    width: 100%; max-width: 460px;
    background: var(--card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 40px 36px;
    position: relative; overflow: hidden;
    animation: authFadeUp .6s cubic-bezier(.16,1,.3,1) both;
    box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
}
/* Glow coin haut-droit */
.auth-card::before {
    content: '';
    position: absolute; top: -80px; right: -80px;
    width: 200px; height: 200px; border-radius: 50%;
    background: var(--red-glow); filter: blur(60px);
    pointer-events: none;
}
/* Glow coin bas-gauche */
.auth-card::after {
    content: '';
    position: absolute; bottom: -60px; left: -60px;
    width: 160px; height: 160px; border-radius: 50%;
    background: rgba(62,166,255,.07); filter: blur(50px);
    pointer-events: none;
}

/* ── LOGO ── */
.auth-logo {
    text-align: center; margin-bottom: 28px;
    position: relative; z-index: 2;
}
.auth-logo-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 36px;
    background: var(--red); border-radius: 10px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(255,0,0,.35);
}
.auth-logo-icon i { color: #fff; font-size: 18px; }
.auth-logo h1 {
    font-size: 28px; font-weight: 900;
    letter-spacing: -.5px; color: var(--text);
    margin-bottom: 6px;
}
.auth-logo h1 span { color: var(--red); }
.auth-logo p { font-size: 13px; color: var(--text3); line-height: 1.5; }

/* ── TITLE ── */
.auth-title {
    margin-bottom: 24px;
    position: relative; z-index: 2;
}
.auth-title h2 {
    font-size: 22px; font-weight: 700;
    margin-bottom: 5px; letter-spacing: -.3px;
}
.auth-title p { font-size: 13px; color: var(--text2); }

/* ── ALERT ── */
.auth-alert {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 12px;
    font-size: 13px; font-weight: 500;
    margin-bottom: 20px; line-height: 1.4;
    position: relative; z-index: 2;
}
.auth-alert i { flex-shrink: 0; font-size: 14px; }
.auth-alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.25);  color: #fca5a5; }
.auth-alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.25); color: #6ee7b7; }
.auth-alert-info    { background: rgba(62,166,255,.1); border: 1px solid rgba(62,166,255,.25); color: #93c5fd; }

/* ── FORM ── */
.auth-form { position: relative; z-index: 2; }
.auth-form-group { margin-bottom: 16px; }
.auth-form-group label {
    display: block; font-size: 12px; font-weight: 600;
    color: #c8d0e0; margin-bottom: 7px; letter-spacing: .2px;
}

/* Input wrapper */
.auth-input-wrap { position: relative; }
.auth-input-wrap .ai-icon {
    position: absolute; top: 50%; left: 15px;
    transform: translateY(-50%);
    color: var(--text3); font-size: 15px; pointer-events: none;
}
.auth-input {
    width: 100%; height: 50px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    padding: 0 44px 0 44px;
    font-size: 14px; outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
    font-family: 'Inter', sans-serif;
}
.auth-input:focus {
    border-color: rgba(255,0,0,.5);
    background: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(255,0,0,.1);
}
.auth-input::placeholder { color: var(--text3); }
.auth-input.valid   { border-color: rgba(16,185,129,.5); }
.auth-input.invalid { border-color: rgba(239,68,68,.5); }

.auth-eye {
    position: absolute; top: 50%; right: 14px;
    transform: translateY(-50%);
    color: var(--text3); cursor: pointer; font-size: 15px;
    padding: 4px; border-radius: 4px; transition: color .2s;
}
.auth-eye:hover { color: var(--text2); }

/* Password strength */
.auth-pwd-strength { display: flex; gap: 4px; margin-top: 8px; }
.auth-pwd-bar {
    flex: 1; height: 3px; border-radius: 2px;
    background: rgba(255,255,255,.1); transition: background .3s;
}
.auth-pwd-bar.weak   { background: var(--danger); }
.auth-pwd-bar.medium { background: #f59e0b; }
.auth-pwd-bar.strong { background: var(--success); }
.auth-pwd-text { font-size: 11px; color: var(--text3); margin-top: 5px; }

/* Match indicator */
.auth-match {
    font-size: 12px; font-weight: 600;
    margin-top: 7px; display: flex; align-items: center; gap: 5px;
    min-height: 18px;
}
.auth-match.ok  { color: var(--success); }
.auth-match.bad { color: var(--danger); }

/* Options row */
.auth-options {
    display: flex; align-items: center;
    justify-content: space-between; gap: 10px;
    margin-bottom: 20px;
}
.auth-remember {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text2); cursor: pointer;
}
.auth-remember input { accent-color: var(--red); cursor: pointer; }
.auth-forgot {
    font-size: 13px; color: #38bdf8;
    text-decoration: none; transition: color .2s;
}
.auth-forgot:hover { color: #fff; }

/* Submit button */
.auth-submit {
    width: 100%; height: 50px;
    background: linear-gradient(135deg, var(--red) 0%, #ff4040 100%);
    border: none; border-radius: 12px;
    color: #fff; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: .25s;
    box-shadow: 0 6px 20px rgba(255,0,0,.3);
    font-family: 'Inter', sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    position: relative; overflow: hidden;
}
.auth-submit::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.1), transparent);
    opacity: 0; transition: opacity .25s;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,0,0,.4); }
.auth-submit:hover::before { opacity: 1; }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled {
    opacity: .45; cursor: not-allowed;
    transform: none; box-shadow: none;
}

/* Divider */
.auth-divider {
    display: flex; align-items: center;
    gap: 14px; margin: 22px 0;
    font-size: 12px; color: var(--text3);
}
.auth-divider::before,
.auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: var(--border);
}

/* Social buttons */
.auth-socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-social-btn {
    height: 46px; border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    display: flex; align-items: center; justify-content: center; gap: 9px;
    color: var(--text); font-size: 13px; font-weight: 500;
    text-decoration: none; transition: .2s; cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.auth-social-btn:hover { background: rgba(255,255,255,.07); transform: translateY(-1px); }
.auth-social-btn .fa-google    { color: #ea4335; }
.auth-social-btn .fa-facebook-f { color: #1877f2; }

/* Footer */
.auth-footer {
    text-align: center; margin-top: 22px;
    font-size: 13px; color: var(--text3);
    position: relative; z-index: 2;
}
.auth-footer a { color: #38bdf8; font-weight: 600; text-decoration: none; transition: color .2s; }
.auth-footer a:hover { color: #fff; }

/* Terms */
.auth-terms {
    font-size: 11px; color: var(--text3); text-align: center;
    margin-top: 14px; line-height: 1.6; position: relative; z-index: 2;
}
.auth-terms a { color: var(--text2); text-decoration: underline; }

/* ── OTP INPUT ── */
.otp-row { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.otp-input {
    width: 50px; height: 56px; text-align: center;
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: 12px; color: var(--text);
    font-size: 22px; font-weight: 700; outline: none;
    transition: .2s; font-family: 'Inter', sans-serif;
    caret-color: var(--red);
}
.otp-input:focus { border-color: rgba(255,0,0,.5); box-shadow: 0 0 0 3px rgba(255,0,0,.1); }
.otp-input.filled { border-color: rgba(16,185,129,.4); }
@media(max-width: 400px) { .otp-input { width: 42px; height: 50px; font-size: 18px; } }

/* ── ANIMATION ── */
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media(max-width: 520px) {
    .auth-card { padding: 28px 22px 26px; border-radius: 20px; }
    .auth-logo h1 { font-size: 24px; }
    .auth-title h2 { font-size: 20px; }
    .auth-socials { grid-template-columns: 1fr; }
}
@media(max-width: 380px) {
    .auth-card { padding: 24px 16px; }
    .auth-input { height: 46px; font-size: 13px; }
    .auth-submit { height: 46px; font-size: 14px; }
}