/* CSS variables + body/page backgrounds injected via inline <style> in
   login.php. The previous `<?= $bgCSS ?>` placeholder here was inert (this
   file is served as static .css, not PHP) and got removed. */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg4, #0c1319);
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page {
    width: 100%; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}

.login-card {
    width: 380px; max-width: 100%;
    background: color-mix(in srgb, var(--bg2) 80%, transparent);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border1);
    border-radius: calc(var(--radius) * 2);
    padding: 40px 32px;
    box-shadow: 0 24px 80px rgba(0,0,0,.5);
}

/* Logo */
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo img { height: 48px; max-width: 240px; object-fit: contain; }

/* Error */
.login-error {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
    color: var(--danger); font-size: 13px; font-weight: 500;
    padding: 10px 14px; border-radius: var(--radius);
    margin-bottom: 16px; text-align: center;
}
.login-disabled {
    background: color-mix(in srgb, var(--warning, #f59e0b) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 25%, transparent);
    border-radius: var(--radius); padding: 24px 20px; margin-bottom: 16px; text-align: center;
}
.login-disabled-icon { font-size: 36px; margin-bottom: 8px; }
.login-disabled-title { font-size: 16px; font-weight: 700; color: var(--warning, #f59e0b); margin-bottom: 6px; }
.login-disabled-text { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; margin-bottom: 14px; }
.login-disabled-contact { display: flex; gap: 10px; justify-content: center; }
.login-contact-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 6px; font-size: 12px; font-weight: 600;
    text-decoration: none; transition: .15s; color: #fff;
}
.login-contact-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.login-contact-wa { background: #25d366; }
.login-contact-tg { background: #0088cc; }

/* Blocked */
.login-blocked {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 24px; text-align: center; color: var(--danger);
}
.login-blocked svg { width: 48px; height: 48px; opacity: .6; }
.login-blocked span { font-size: 14px; }

/* Form */
.login-form { display: flex; flex-direction: column; gap: 10px; }

.login-field {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg3); border: 1px solid var(--border1);
    border-radius: var(--radius); padding: 0 14px; height: 48px;
    transition: border-color .2s, box-shadow .2s;
}
.login-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 15%, transparent);
}
.login-field svg {
    width: 18px; height: 18px; color: var(--text1); flex-shrink: 0;
    fill: none; stroke: currentColor;
}
.login-field input {
    flex: 1; border: none; background: none; outline: none;
    color: var(--text1); font-size: 16px; font-family: inherit;
    height: 100%;
}
.login-field input::placeholder { color: var(--text2); }
.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 50px var(--bg3) inset !important;
    -webkit-text-fill-color: var(--text1) !important;
    caret-color: var(--text1);
    transition: background-color 5000s ease-in-out 0s;
}

/* Submit */
.login-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; margin-top: 8px;
    background: var(--primary); color: #000;
    border: none; border-radius: var(--radius);
    font-size: 15px; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: all .2s;
    text-transform: uppercase; letter-spacing: .5px;
}
.login-submit:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 30%, transparent); }
.login-submit:active { transform: translateY(0); }
.login-submit svg {
    width: 18px; height: 18px; fill: none; stroke: #000; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}

/* Social */
/* 2026-10-28 — KYC Policy / Responsible Gaming (public /legal pages) */
.login-legal {
    display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; align-items: center;
    margin-top: 16px; font-size: 12px; color: var(--text4);
}
.login-legal a { color: var(--text3); text-decoration: none; }
.login-legal a:hover, .login-legal a:focus-visible { color: var(--primary); text-decoration: underline; }
.login-social {
    display: flex; gap: 8px; justify-content: center; margin-top: 20px;
    padding-top: 16px; border-top: 1px solid var(--border1);
}
.login-social-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius);
    background: var(--bg3); border: 1px solid var(--border1);
    color: var(--text2); font-size: 12px; font-weight: 500;
    text-decoration: none; transition: all .15s;
}
.login-social-btn:hover { border-color: var(--primary); color: var(--text1); }
.login-social-btn svg { width: 16px; height: 16px; }

/* ── Responsive ── */
@media (max-width: 480px) {
    body { overflow: hidden; }
    .login-page { padding: 16px; align-items: center; height: 100vh; height: 100dvh; }
    .login-card {
        width: 100%;
        border-radius: calc(var(--radius) * 2);
        padding: 28px 24px;
        background: color-mix(in srgb, var(--bg2) 95%, transparent);
    }
    .login-logo { margin-bottom: 20px; }
    .login-logo img { height: 36px; }
    .login-field, .login-submit { height: 44px; }
    .login-submit { font-size: 14px; margin-top: 4px; }
    .login-form { gap: 8px; }
    .login-social { margin-top: 14px; padding-top: 12px; }
}
@media (max-width: 380px) {
    .login-card { padding: 24px 16px; }
}
@media (max-height: 600px) {
    .login-card { padding: 20px 24px; margin-bottom: 0; }
    .login-logo { margin-bottom: 14px; }
    .login-logo img { height: 32px; }
    .login-field, .login-submit { height: 40px; }
    .login-form { gap: 6px; }
}
<?php if ($mobileBgCSS): ?>
@media (max-width: 768px) {
    body { <?= $mobileBgCSS ?> background-size: cover; background-position: center; }
}
<?php endif; ?>
