/* ============================================
   EnigmaTV — Auth Pages (Login / Register)
   ============================================ */

:root {
    --bg: #06060b;
    --bg-card: #0e0e18;
    --border: #1a1a2e;
    --border-light: #252545;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --accent: #c084fc;
    --accent-2: #a855f7;
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --text-muted: #64748b;
    --text-faint: #475569;
    --success: #22c55e;
    --danger: #ef4444;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html, body {
    height: 100%;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

/* Background */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: orbMove 25s ease-in-out infinite;
}

.auth-orb-1 {
    width: 500px; height: 500px;
    background: rgba(99, 102, 241, 0.12);
    top: -10%; right: -5%;
}

.auth-orb-2 {
    width: 400px; height: 400px;
    background: rgba(168, 85, 247, 0.08);
    bottom: -10%; left: -5%;
    animation-delay: -12s;
}

@keyframes orbMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, 30px); }
}

/* Container */
.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: fadeUp 0.6s ease-out;
}

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

/* Brand */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.auth-logo {
    height: 44px;
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.4));
}

.auth-brand-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.auth-brand-text .tv {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card */
.auth-card {
    width: 100%;
    padding: 36px 32px;
    background: rgba(14, 14, 24, 0.7);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.auth-alert svg {
    width: 18px; height: 18px;
    flex-shrink: 0;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.auth-alert-error svg { color: #ef4444; }

.auth-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.auth-alert-success svg { color: #22c55e; }

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-faint);
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: all 0.25s;
}

.input-wrapper input::placeholder {
    color: var(--text-faint);
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-wrapper input:focus + svg,
.input-wrapper:focus-within svg {
    color: var(--primary-light);
}

/* Plan Selector */
.plan-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.plan-option {
    cursor: pointer;
}

.plan-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.25s;
    text-align: center;
}

.plan-option-card:hover {
    border-color: var(--border-light);
    background: rgba(99, 102, 241, 0.05);
}

.plan-option input:checked + .plan-option-card {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.plan-option input:checked + .plan-option-inicio {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
}

.plan-option input:checked + .plan-option-premium {
    border-color: var(--gold);
    background: rgba(245, 158, 11, 0.08);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.plan-option-name {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-2);
}

.plan-option-price {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-option-premium .plan-option-price {
    background: linear-gradient(135deg, var(--gold-light), #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-block { width: 100%; padding: 14px; font-size: 14px; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent-2));
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    margin-top: 4px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Footer text */
.auth-footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 20px;
}

.auth-footer-text a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

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

/* Back link */
.auth-back {
    color: var(--text-faint);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.auth-back:hover {
    color: var(--text-2);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 24px 16px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 20px;
    }

    .plan-selector {
        grid-template-columns: 1fr;
    }

    .plan-option-card {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 16px;
    }
}
