/* Ludusy Auth — Dark Game Theme */
:root {
    --bg: #0a0f1a;
    --bg-card: #0d1525;
    --bg-input: #0a0f1a;
    --border: #1a2540;
    --border-hover: #253550;
    --text: #e8e8f0;
    --text-muted: #8090b0;
    --text-dim: #4a5580;
    --primary: #6afcff;
    --primary-hover: #4de8eb;
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #22c55e;
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

#site-wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}

/* === Auth Header === */
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-logo-img { height: 48px; width: 48px; border-radius: 10px; margin-bottom: 16px; }
.auth-header h1 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.auth-header p { color: var(--text-muted); font-size: 14px; }
.auth-perk { color: var(--primary); font-weight: 600; font-size: 13px; margin-top: 4px; }
.auth-context { color: var(--text-muted); font-size: 13px; font-style: italic; margin-top: 4px; }

/* === Auth Forms === */
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="number"],
.auth-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.auth-form input:focus, .auth-input:focus {
    border-color: var(--accent);
}
.auth-submit {
    width: 100%;
    padding: 14px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.auth-submit:hover { background: var(--accent-hover); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-submit.auth-danger { background: var(--danger); }
.auth-submit.auth-danger:hover { background: var(--danger-hover); }

/* === Messages === */
.auth-msg { font-size: 13px; min-height: 18px; }
.auth-msg.success { color: var(--success); }
.auth-msg.error { color: var(--danger); }

.auth-banner {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.auth-banner.success { border-color: #166534; color: var(--success); }
.auth-banner.error { border-color: #991b1b; color: var(--danger); }

/* === Consent Checkboxes === */
.auth-consent-group { display: flex; flex-direction: column; gap: 10px; margin: 4px 0; }
.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-consent input[type="checkbox"] { display: none; }
.auth-checkmark {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-input);
    position: relative;
    margin-top: 1px;
    transition: background 0.15s, border-color 0.15s;
}
.auth-consent input:checked + .auth-checkmark {
    background: var(--accent);
    border-color: var(--accent);
}
.auth-consent input:checked + .auth-checkmark::after {
    content: '';
    position: absolute;
    left: 5px; top: 2px;
    width: 5px; height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.auth-consent-label { line-height: 1.4; }
.auth-consent-label a { color: var(--primary); }

/* === Alt Links === */
.auth-alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.auth-link { color: var(--primary); font-size: 14px; }
.auth-service-note { text-align: center; margin-top: 12px; font-size: 12px; color: var(--text-dim); }

/* === Services Footer === */
.auth-services { text-align: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.auth-services p { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.service-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.service-logos span {
    font-size: 12px;
    color: var(--text-dim);
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

/* === Verify Panel === */
.verify-panel { text-align: center; }
.verify-email-row { margin: 12px 0; }

/* === Account Page === */
.account-wrap { max-width: 520px; }
.account-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}
.account-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.account-field:last-child { border-bottom: none; }
.account-label { color: var(--text-muted); font-size: 13px; }
.account-value { color: var(--text); font-size: 14px; font-weight: 500; }
.account-section { margin-top: 28px; }
.account-section h2 { font-size: 17px; margin-bottom: 8px; }
.account-muted { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.account-actions { text-align: center; margin-top: 28px; }

/* Credits card on account page */
.credits-account-card {
    display: block;
    background: linear-gradient(135deg, #0d1525 0%, #0f1a2e 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-decoration: none;
    text-align: center;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}
.credits-account-card:hover { border-color: var(--primary); text-decoration: none; }
.credits-account-balance { font-size: 28px; font-weight: 700; color: var(--primary); }
.credits-account-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Service list */
.service-list { display: flex; flex-direction: column; gap: 8px; }
.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.15s;
}
.service-item:hover { border-color: var(--border-hover); text-decoration: none; }
.service-name { color: var(--text); font-weight: 600; font-size: 14px; }
.service-desc { color: var(--text-muted); font-size: 12px; }

/* === Welcome Page === */
.welcome-wrap { max-width: 520px; margin: 0 auto; }
.welcome-balance-card {
    background: linear-gradient(135deg, #0d1525 0%, #0f1a2e 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}
.welcome-balance-amount { font-size: 36px; font-weight: 700; color: var(--primary); }
.welcome-balance-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.welcome-balance-note { font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.welcome-actions { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.welcome-account-link, .welcome-credits-link {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    border: none;
}
.welcome-account-link {
    background: var(--accent);
    color: #fff;
}
.welcome-account-link:hover { background: var(--accent-hover); text-decoration: none; }
.welcome-credits-link {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}
.welcome-credits-link:hover { border-color: var(--border-hover); text-decoration: none; }
.welcome-section { margin-top: 28px; }
.welcome-section h2 { font-size: 17px; margin-bottom: 8px; }
.welcome-section-desc { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.welcome-services-grid { display: flex; flex-direction: column; gap: 8px; }
.welcome-service-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color 0.15s;
}
.welcome-service-card:hover { border-color: var(--border-hover); text-decoration: none; }
.svc-icon { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; }
.welcome-service-info { display: flex; flex-direction: column; gap: 2px; }
.welcome-service-name { color: var(--text); font-weight: 600; font-size: 15px; }
.welcome-service-desc { color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.welcome-how-grid { display: flex; flex-direction: column; gap: 12px; }
.welcome-how-item { display: flex; align-items: flex-start; gap: 14px; }
.welcome-how-icon {
    width: 32px; height: 32px; min-width: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: var(--primary);
}
.welcome-how-text { display: flex; flex-direction: column; gap: 2px; }
.welcome-how-text strong { color: var(--text); font-size: 14px; }
.welcome-how-text span { color: var(--text-muted); font-size: 13px; }

/* === Landing Page === */
.landing-wrap { max-width: 640px; margin: 0 auto; }
.landing-hero { text-align: center; padding: 40px 0 32px; }
.landing-hero h1 { font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.landing-subtitle { color: var(--text-muted); font-size: 16px; margin-bottom: 24px; }
.landing-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing-btn {
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.15s;
}
.landing-btn:hover { text-decoration: none; }
.landing-btn.primary { background: var(--accent); color: #fff; }
.landing-btn.primary:hover { background: var(--accent-hover); }
.landing-btn.secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}
.landing-btn.secondary:hover { border-color: var(--border-hover); }
.landing-section { margin-top: 40px; }
.landing-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; text-align: center; }
.landing-services-grid { display: flex; flex-direction: column; gap: 8px; }
.landing-service-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color 0.15s;
}
.landing-service-card:hover { border-color: var(--border-hover); text-decoration: none; }
.landing-service-info { display: flex; flex-direction: column; gap: 4px; }
.landing-service-name { color: var(--text); font-weight: 700; font-size: 17px; }
.landing-service-tagline { color: var(--primary); font-size: 13px; font-weight: 600; }
.landing-service-desc { color: var(--text-muted); font-size: 13px; line-height: 1.5; margin-top: 4px; }
.landing-coming-soon { text-align: center; color: var(--text-dim); font-size: 13px; margin-top: 12px; }
.landing-how-grid { display: flex; flex-direction: column; gap: 16px; }
.landing-how-item { display: flex; align-items: flex-start; gap: 14px; }
.landing-how-icon {
    width: 36px; height: 36px; min-width: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; color: var(--primary);
}
.landing-how-text { display: flex; flex-direction: column; gap: 2px; }
.landing-how-text strong { color: var(--text); font-size: 15px; }
.landing-how-text span { color: var(--text-muted); font-size: 13px; }
.landing-bottom-cta { text-align: center; padding: 32px 0; }
.landing-bottom-cta p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.landing-company { text-align: center; padding: 24px 0; border-top: 1px solid var(--border); margin-top: 20px; }
.landing-company p { color: var(--text-dim); font-size: 12px; }

/* === Credits Page === */
.credits-wrap { max-width: 560px; }
.credits-context-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}
.credits-context-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.credits-context-name { font-weight: 700; color: var(--text); }
.credits-context-tagline { color: var(--text-muted); font-size: 13px; }
.credits-context-desc { color: var(--text-muted); font-size: 13px; margin-top: 8px; line-height: 1.5; }

.credits-balance-card {
    background: linear-gradient(135deg, #0d1525 0%, #0f1a2e 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}
.credits-total { font-size: 36px; font-weight: 700; color: var(--primary); }
.credits-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.credits-breakdown { display: flex; justify-content: center; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--text-dim); }
.credits-refresh-note { font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.credits-verify-card { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.credits-verify-text { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.credits-verify-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.credits-verify-btn:hover { background: var(--accent-hover); }
.credits-verify-note { font-size: 11px; color: var(--text-dim); margin-top: 8px; }
.credits-signed-out .credits-signin-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    margin-top: 12px;
}
.credits-signin-btn:hover { background: var(--accent-hover); text-decoration: none; }

.credits-section-title { font-size: 17px; margin: 24px 0 12px; }
.credits-section-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }

.credits-topup-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 8px;
}
.credits-topup-row { display: flex; align-items: center; gap: 8px; }
.credits-topup-currency { font-size: 20px; font-weight: 700; color: var(--text); }
.credits-topup-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    outline: none;
}
.credits-topup-input:focus { border-color: var(--accent); }
.credits-topup-btn {
    padding: 12px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.credits-topup-btn:hover { background: var(--accent-hover); }
.credits-topup-hint { display: block; font-size: 11px; color: var(--text-dim); margin-top: 8px; }

.credits-services-grid { display: flex; flex-direction: column; gap: 8px; }
.credits-service-card {
    display: block;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.15s;
}
.credits-service-card:hover { border-color: var(--border-hover); text-decoration: none; }
.credits-svc-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.credits-svc-name { color: var(--text); font-weight: 600; font-size: 14px; }
.credits-svc-tagline { color: var(--text-muted); font-size: 12px; }
.svc-icon-sm { width: 24px; height: 24px; border-radius: 4px; }

.credits-transactions { display: flex; flex-direction: column; gap: 1px; }
.credits-tx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.credits-tx-info { display: flex; flex-direction: column; gap: 2px; }
.credits-tx-desc { color: var(--text); font-size: 13px; }
.credits-tx-meta { color: var(--text-dim); font-size: 11px; }
.credits-tx-amount { font-weight: 600; font-size: 14px; white-space: nowrap; }
.credits-tx-amount.positive { color: var(--success); }
.credits-tx-amount.negative { color: var(--text-muted); }

.credits-back { text-align: center; margin-top: 24px; }

/* === Page (Terms, Privacy) === */
.page-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 0;
}
.page-wrap h1 { font-size: 24px; margin-bottom: 8px; }
.page-wrap h2 { font-size: 18px; margin: 24px 0 8px; color: var(--text); }
.page-wrap h3 { font-size: 15px; margin: 16px 0 6px; color: var(--text-muted); }
.page-wrap p { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
.page-wrap ul { color: var(--text-muted); font-size: 14px; padding-left: 24px; margin-bottom: 12px; line-height: 1.7; }
.page-wrap a { color: var(--primary); }
.page-updated { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }

/* === Footer === */
.site-footer {
    max-width: 640px;
    margin: 40px auto 0;
    padding: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.footer-links a { color: var(--text-dim); font-size: 13px; }
.footer-links a:hover { color: var(--text-muted); }
.footer-company { font-size: 12px; color: var(--text-dim); }
.footer-company a { color: var(--text-dim); }

/* === Responsive === */
@media (max-width: 480px) {
    #site-wrap { padding: 24px 16px 16px; }
    .landing-hero h1 { font-size: 24px; }
    .landing-subtitle { font-size: 14px; }
    .landing-cta { flex-direction: column; }
    .landing-btn { width: 100%; text-align: center; }
    .credits-topup-row { flex-wrap: wrap; }
    .credits-topup-input { min-width: 0; }
    .credits-breakdown { flex-direction: column; gap: 4px; }
}
