/* ============================================
   PredictaSport — Auth UI Refresh
   ============================================ */
:root {
    --color-emerald-strong: #0f766e;
    --color-emerald: #10b981;
    --color-emerald-soft: #34d399;
    --color-emerald-glow: rgba(52, 211, 153, 0.24);
    --color-emerald-glow-strong: rgba(52, 211, 153, 0.26);
    --color-blue: #3b82f6;
    --color-blue-soft: #60a5fa;
    --color-blue-glow: rgba(59, 130, 246, 0.16);

    --color-text-primary: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-border: rgba(148, 163, 184, 0.28);
    --color-border-soft: rgba(148, 163, 184, 0.2);
    --color-border-muted: rgba(148, 163, 184, 0.24);
    --color-border-strong: rgba(148, 163, 184, 0.5);
    --color-focus: var(--color-emerald-soft);
    --color-bg-page: #020617;
    --color-bg-card: rgba(15, 23, 42, 0.78);
    --color-bg-input: rgba(15, 23, 42, 0.72);
    --color-card-surface: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.72));
    --color-card-surface-soft: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.72));
    --color-surface-muted: rgba(248, 250, 252, 0.08);
    --color-surface-muted-strong: rgba(248, 250, 252, 0.14);
    --color-surface-soft: rgba(248, 250, 252, 0.98);
    --color-white-glass: rgba(248, 250, 252, 0.38);
    --color-error: #f87171;
    --color-error-bg: rgba(127, 29, 29, 0.25);
    --color-success: var(--color-emerald-soft);
    --color-success-bg: rgba(6, 78, 59, 0.35);
    --color-warning: #fbbf24;

    --primary-dark: var(--color-emerald-strong);
    --primary-mid: var(--color-emerald-soft);
    --primary-light: var(--color-blue-soft);
    --primary-glow: var(--color-emerald-glow);
    --accent-gradient: linear-gradient(135deg, var(--color-emerald) 0%, var(--color-blue) 100%);
    --text-primary: var(--color-text-primary);
    --text-secondary: var(--color-text-secondary);
    --text-muted: var(--color-text-muted);
    --border-color: var(--color-border);
    --border-focus: var(--color-focus);
    --bg-page: var(--color-bg-page);
    --bg-card: var(--color-bg-card);
    --bg-input: var(--color-bg-input);
    --error-color: var(--color-error);
    --error-bg: var(--color-error-bg);
    --success-color: var(--color-success);
    --success-bg: var(--color-success-bg);
    --warning-color: var(--color-warning);

    --shadow-lg: 0 24px 80px rgba(2, 6, 23, 0.55);
    --shadow-glow: 0 0 0 1px rgba(255,255,255,0.04), 0 0 45px rgba(74, 222, 128, 0.12);
    --shadow-input: inset 0 1px 2px rgba(2, 6, 23, 0.32);
    --shadow-focus-ring: 0 0 0 3px rgba(52, 211, 153, 0.16), var(--shadow-input);
    --shadow-focus-ring-error: 0 0 0 3px rgba(248, 113, 113, 0.12);
    --shadow-button: 0 12px 26px rgba(16, 185, 129, 0.22);
    --shadow-button-hover: 0 16px 34px rgba(59, 130, 246, 0.22);
    --shadow-google: 0 10px 24px rgba(2, 6, 23, 0.16);
    --shadow-google-hover: 0 12px 30px rgba(2, 6, 23, 0.2);
    --shadow-card-soft: 0 10px 30px rgba(2, 6, 23, 0.45), 0 0 36px rgba(52, 211, 153, 0.04);

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --space-1: var(--spacing-xs);
    --space-2: var(--spacing-sm);
    --space-3: var(--spacing-md);
    --space-4: var(--spacing-lg);
    --space-5: var(--spacing-xl);
    --space-6: var(--spacing-2xl);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 999px;
    --radius-input: var(--radius-md);
    --radius-card: var(--radius-xl);
    --radius-pill: var(--radius-full);

    --transition-fast: 180ms ease;
    --transition-normal: 280ms ease;

    --font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 1.875rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body.auth-page {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100dvh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.16), transparent 24%),
        linear-gradient(135deg, var(--color-bg-page) 0%, var(--color-bg-card) 45%, #111827 100%);
    position: relative;
    overflow-x: clip;
}

.auth-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 15% 10%, rgba(34, 197, 94, 0.18), transparent 50%),
        radial-gradient(ellipse 60% 50% at 85% 85%, rgba(59, 130, 246, 0.16), transparent 45%);
}

.auth-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 25%, transparent 86%);
}

.auth-background__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    animation: orbFloat 10s ease-in-out infinite;
    opacity: 0.8;
}

.auth-background__orb--1 {
    width: 320px;
    height: 320px;
    background: rgba(16, 185, 129, 0.18);
    top: -90px;
    right: -70px;
}

.auth-background__orb--2 {
    width: 280px;
    height: 280px;
    background: rgba(59, 130, 246, 0.16);
    bottom: -80px;
    left: -50px;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(18px, -16px, 0) scale(1.05); }
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    animation: slideInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-container,
.signup-container {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    animation: slideInDown 0.8s ease;
}

.logo {
    width: 90px;
    height: 90px;
    filter: drop-shadow(0 10px 24px var(--color-emerald-glow-strong));
    transition: transform var(--transition-normal);
}

.logo:hover {
    transform: scale(1.04) rotate(-2deg);
}

.brand-tagline {
    font-size: 0.78rem;
    color: rgba(248, 250, 252, 0.62);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
}

.hero-panel {
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    padding: clamp(1.5rem, 3vw, 2.4rem);
    border-radius: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.9)),
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.24), transparent 28%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.2), transparent 24%);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.32), 0 0 0 1px rgba(255,255,255,0.04);
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(248, 250, 252, 0.14), transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.22), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.18), transparent 26%);
    pointer-events: none;
    z-index: -1;
}

.hero-panel::after {
    content: '';
    position: absolute;
    right: -3rem;
    top: -2rem;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 0 60px rgba(255,255,255,0.05);
    transform: rotate(18deg);
    pointer-events: none;
}

.hero-panel__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.hero-pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.34);
    background: rgba(16, 185, 129, 0.12);
    color: #d1fae5;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.05;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.04em;
    max-width: 620px;
}

.hero-subtitle {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.82);
    max-width: 590px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0.4rem;
}

.hero-cta {
    min-width: 180px;
    width: auto;
    margin-top: 0;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.3rem;
}

.hero-highlights span {
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.07);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: rgba(248, 250, 252, 0.84);
    font-size: 0.9rem;
    backdrop-filter: blur(6px);
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}

.hero-scoreboard {
    width: min(100%, 320px);
    padding: 1.2rem;
    border-radius: 1.4rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.1), rgba(15, 23, 42, 0.12));
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), 0 20px 45px rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(12px);
}

.hero-scoreboard p {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #bfdbfe;
    margin-bottom: 0.8rem;
}

.hero-scoreboard__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.7rem;
    align-items: center;
    font-weight: 700;
    color: #f8fafc;
}

.hero-scoreboard__teams strong {
    font-size: 1.7rem;
    color: #34d399;
}

.hero-scoreboard__bar {
    height: 8px;
    border-radius: 999px;
    margin-top: 1rem;
    background: linear-gradient(90deg, #34d399 0%, #3b82f6 100%);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.24);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scaleX(0.96); opacity: 0.95; }
    50% { transform: scaleX(1.02); opacity: 1; }
}

.stats-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding: clamp(1.5rem, 2.5vw, 2.5rem);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 2rem;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.18);
    backdrop-filter: blur(18px);
}

.stats-intro {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.section-label {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(132, 204, 22, 0.88);
    font-size: 0.78rem;
    font-weight: 700;
}

.stats-title {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    color: #f8fafc;
    font-weight: 800;
    line-height: 1.05;
}

.stats-copy {
    color: rgba(226, 232, 240, 0.76);
    max-width: 760px;
    font-size: 0.98rem;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 1.75rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.22);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    animation: fadeInUp 0.8s ease both;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 28%);
    opacity: 0.7;
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 68px rgba(2, 6, 23, 0.3);
    border-color: rgba(59, 130, 246, 0.3);
}

.ranking-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding: clamp(1.5rem, 2.5vw, 2.5rem);
    background: rgba(12, 20, 40, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 2rem;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.18);
    backdrop-filter: blur(18px);
}

.ranking-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ranking-title {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    color: #f8fafc;
    font-weight: 800;
    line-height: 1.05;
}

.ranking-copy {
    color: rgba(226, 232, 240, 0.76);
    max-width: 760px;
    font-size: 0.98rem;
    line-height: 1.6;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.ranking-card {
    position: relative;
    overflow: hidden;
    padding: 1.4rem;
    border-radius: 1.75rem;
    background: linear-gradient(145deg, rgba(7, 14, 28, 0.94), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.22);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease both;
}

.ranking-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 68px rgba(2, 6, 23, 0.32);
    border-color: rgba(59, 130, 246, 0.3);
}

.ranking-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 28%);
    opacity: 0.7;
    pointer-events: none;
}

.ranking-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.ranking-rank {
    font-size: 1.5rem;
    font-weight: 800;
    color: #93c5fd;
}

.ranking-avatar {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(16, 185, 129, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ranking-name {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
}

.ranking-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.ranking-detail {
    padding: 0.9rem;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ranking-detail strong {
    display: block;
    font-size: 1.15rem;
    color: #f8fafc;
}

.ranking-detail span {
    display: block;
    color: rgba(203, 213, 225, 0.78);
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.stat-card__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
    background: rgba(30, 64, 175, 0.14);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

.stat-label {
    color: rgba(203, 213, 225, 0.85);
    font-size: 0.93rem;
    margin-bottom: 0.55rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.login-card,
.signup-card {
    background: var(--color-card-surface);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    width: 100%;
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out 0.12s both;
}

.login-card::before,
.signup-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(52, 211, 153, 0.08), transparent 35%, rgba(59, 130, 246, 0.08));
    pointer-events: none;
}

.login-title,
.signup-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    text-align: center;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0;
}

.auth-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.auth-card__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-full);
    background: rgba(52, 211, 153, 0.12);
    color: #a7f3d0;
    border: 1px solid rgba(52, 211, 153, 0.2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.status-banner {
    display: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    animation: slideInDown 0.25s ease-out;
    position: relative;
    z-index: 1;
}

.status-banner.visible {
    display: block;
}

.status-banner--success {
    background: var(--success-bg);
    color: #bbf7d0;
    border: 1px solid rgba(52, 211, 153, 0.28);
}

.status-banner--error {
    background: var(--error-bg);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.26);
}

.login-form,
.signup-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.field-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.input-shell,
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-shell:focus-within,
.password-wrapper:focus-within {
    transform: translateY(-1px);
}

.input-icon {
    position: absolute;
    left: 0.95rem;
    width: 18px;
    height: 18px;
    color: rgba(148, 163, 184, 0.86);
    pointer-events: none;
    transition: color var(--transition-fast), transform var(--transition-fast), filter var(--transition-fast);
    z-index: 1;
}

.input-shell:focus-within .input-icon,
.password-wrapper:focus-within .input-icon {
    color: var(--color-emerald-soft);
    transform: scale(1.06);
    filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.24));
}

.input-field {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 3.2rem !important;
    font-size: var(--font-size-base);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.85));
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
    outline: none;
    box-shadow: inset 0 1px 2px rgba(2, 6, 23, 0.32), 0 0 0 1px rgba(255,255,255,0.03);
}

.input-field::placeholder {
    color: rgba(148, 163, 184, 0.8);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.input-field:hover:not(:disabled):not(.error) {
    border-color: rgba(96, 165, 250, 0.55);
    transform: translateY(-1px);
}

.input-field:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18), inset 0 1px 2px rgba(2, 6, 23, 0.32);
    background: rgba(2, 6, 23, 0.95);
    transform: translateY(-1px);
}

.input-field:focus::placeholder {
    color: rgba(148, 163, 184, 0.62);
}

.input-field.error {
    border-color: var(--error-color);
    background: linear-gradient(145deg, rgba(127, 29, 29, 0.24), rgba(69, 10, 10, 0.24));
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14), inset 0 1px 2px rgba(2, 6, 23, 0.28);
}

.input-field:valid:not(:placeholder-shown):not(.error) {
    border-color: rgba(74, 222, 128, 0.8);
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.12), inset 0 1px 2px rgba(2, 6, 23, 0.28);
}

.input-field:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.password-wrapper .input-field {
    padding-left: 3.2rem;
    padding-right: 3.4rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--color-border-soft);
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    outline: none;
    z-index: 2;
}

.toggle-password:hover {
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(52, 211, 153, 0.26);
    transform: translateY(-1px);
}

.eye-icon,
.eye-off-icon {
    width: 20px;
    height: 20px;
}

.error-message {
    display: none;
    color: var(--error-color);
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding-left: 2px;
    animation: slideInDown 0.25s ease-out;
}

.error-message.visible {
    display: block;
}

.password-link-section {
    display: flex;
    justify-content: flex-end;
    margin-top: calc(var(--spacing-sm) * -1);
}

.reset-password-link,
.signup-link,
.login-link {
    font-size: var(--font-size-sm);
    color: #86efac;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
    position: relative;
}

.reset-password-link:hover,
.signup-link:hover,
.login-link:hover {
    color: #d1fae5;
    transform: translateY(-1px);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-dark);
    border-radius: 4px;
}

.checkbox-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-input:checked ~ .checkbox-label {
    color: #f8fafc;
    font-weight: 600;
}

.btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 0.95rem var(--spacing-xl);
    font-size: var(--font-size-base);
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    outline: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    user-select: none;
    min-height: 48px;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.16);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.22) 45%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 0.7s ease;
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(120%);
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22), 0 10px 24px rgba(2, 6, 23, 0.16);
}

.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-primary,
.btn--primary {
    background: var(--accent-gradient);
    color: #f8fafc;
    width: 100%;
    margin-top: var(--spacing-sm);
    box-shadow: var(--shadow-button);
}

.btn-primary:hover:not(:disabled),
.btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

.btn-secondary,
.btn--secondary {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.82));
    color: rgba(248, 250, 252, 0.92);
    border-color: rgba(148, 163, 184, 0.24);
    min-width: 200px;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
}

.btn-secondary:hover:not(:disabled),
.btn--secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9));
    border-color: rgba(96, 165, 250, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.16);
}

.btn-outline,
.btn--outline {
    background: transparent;
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-outline:hover:not(:disabled),
.btn--outline:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(52, 211, 153, 0.48);
    color: #ecfdf5;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.16);
}

.btn-google,
.btn--google {
    width: 100%;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.95));
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: var(--shadow-google);
}

.btn-google:hover:not(:disabled),
.btn--google:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-google-hover);
}

.btn-danger,
.btn--danger {
    background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
    color: #ffffff;
    border-color: rgba(244, 63, 94, 0.28);
    box-shadow: 0 12px 26px rgba(244, 63, 94, 0.2);
}

.btn-danger:hover:not(:disabled),
.btn--danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(244, 63, 94, 0.26);
}

.google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--spacing-sm) 0;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border-strong), transparent);
    margin: 0 var(--spacing-md);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.85;
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.signup-section,
.login-link-section {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border-muted);
    text-align: center;
}

.signup-section {
    flex-direction: column;
    gap: var(--spacing-sm);
}

.signup-prompt,
.login-link-section p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.signup-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-base);
    font-weight: 700;
    min-height: 50px;
    padding: 0.9rem 1.15rem;
    color: #ffffff;
    background: #f59e0b;
    border: 1px solid #f59e0b;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.signup-link:hover {
    color: #ffffff;
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-1px);
}

.login-container .brand-tagline {
    color: #f8fafc;
}

/* ==========================
   LOGIN — Tarjeta compacta
   Reduce la altura del formulario para que "Recordarme",
   "Iniciar Sesión" y "Regístrate" queden visibles con el zoom
   del navegador al 100% incluso en pantallas de 720px de alto.
   ========================== */

.login-card {
    padding: var(--spacing-xl);
}

.login-card .auth-card__header {
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.login-card .login-card__brand {
    gap: var(--spacing-sm);
}

.login-card .login-card__brand .logo {
    width: 76px;
    height: 76px;
}

.login-card .brand-tagline {
    font-size: 0.68rem;
}

.login-card .login-title {
    margin-bottom: 0;
}

.login-form {
    gap: var(--spacing-md);
}

.login-form .input-field {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.login-card .signup-section {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
}

.login-card .signup-link {
    min-height: 44px;
    padding: 0.7rem 1.15rem;
}

.auth-footer-note {
    font-size: var(--font-size-xs);
    color: var(--color-white-glass);
    text-align: center;
    margin-top: var(--spacing-md);
}

@media (max-width: 768px) {
    body.auth-page {
        padding: var(--spacing-md);
        align-items: flex-start;
        padding-top: var(--spacing-xl);
    }

    .login-container,
    .signup-container {
        max-width: 100%;
    }

    .login-card,
    .signup-card {
        padding: var(--spacing-xl);
        border-radius: var(--radius-lg);
    }

    .logo {
        width: 74px;
        height: 74px;
    }

    .login-title,
    .signup-title {
        font-size: var(--font-size-xl);
    }

    .btn-secondary {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 900px) {
    .hero-panel {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .hero-visual {
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .login-card,
    .signup-card {
        padding: var(--spacing-xl);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-cta {
        width: 100%;
    }

    .input-field {
        font-size: 16px;
        padding: 0.8rem 0.9rem;
    }

    .btn {
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.btn:focus-visible,
.input-field:focus-visible,
.toggle-password:focus-visible,
a:focus-visible,
.checkbox-input:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

@media print {
    .auth-background { display: none; }
    body.auth-page { background: white; }
    .login-card, .signup-card { box-shadow: none; border: 1px solid #ccc; }
}

/* ==========================
   Sección: CÓMO JUGAR
   ========================== */
.how-to-play-section {
    width: 100%;
    margin-top: var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
}

.how-to-play-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.htp-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    align-items: stretch;
}

.htp-card {
    background: var(--color-card-surface-soft);
    padding: calc(var(--spacing-md) + 0.5rem);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148,163,184,0.08);
    box-shadow: var(--shadow-card-soft);
    backdrop-filter: blur(8px);
    text-align: left;
}

.htp-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.htp-card-text {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.4;
}

.htp-list {
    margin: 0.5rem 0 0 1rem;
    color: var(--text-secondary);
}

@media (max-width: 980px) {
    .htp-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .htp-cards {
        grid-template-columns: 1fr;
    }

    .how-to-play-section {
        padding: 0 var(--spacing-md);
    }

    .htp-card {
        text-align: left;
    }
}

/* ==========================
   Sección: DASHBOARD ROOMS
   ========================== */
body.auth-page.dashboard-page {
    align-items: flex-start;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-lg);
}

.dashboard-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    animation: slideInDown 0.6s ease both;
}

.dashboard-header .logo-section {
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-md);
    text-align: left;
}

.dashboard-header .logo {
    width: 64px;
    height: 64px;
}

.dashboard-title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.dashboard-sub {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.dashboard-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.rooms-dashboard {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: clamp(1.5rem, 2.5vw, 2.5rem);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 2rem;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.18);
    backdrop-filter: blur(18px);
}

.rooms-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.rooms-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    color: #f8fafc;
    font-weight: 800;
    line-height: 1.05;
}

.rooms-sub {
    color: rgba(226, 232, 240, 0.76);
    max-width: 760px;
    font-size: 0.98rem;
    line-height: 1.6;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.25rem;
}

.rooms-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #cbd5e1;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rooms-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rooms-tab.is-active {
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.12);
    color: #6ee7b7;
}

.room-card--add {
    display: flex;
    align-items: stretch;
    border: 1px dashed rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.04);
}

.room-card__add-btn {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.5rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #6ee7b7;
    transition: all 0.2s ease;
}

.room-card__add-btn:hover {
    background: rgba(52, 211, 153, 0.08);
}

.room-card__add-plus {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.35);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.room-card__add-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: #6ee7b7;
}

.room-card__add-sub {
    font-size: 0.78rem;
    color: rgba(203, 213, 225, 0.7);
}

.room-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.4rem;
    border-radius: 1.75rem;
    background: linear-gradient(145deg, rgba(7, 14, 28, 0.94), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.22);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    animation: fadeInUp 0.8s ease both;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 68px rgba(2, 6, 23, 0.32);
    border-color: rgba(59, 130, 246, 0.3);
}

.room-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.1), transparent 30%);
    opacity: 0.7;
    pointer-events: none;
}

.room-card__head {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.room-card__title-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.room-card__type {
    width: fit-content;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a7f3d0;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.room-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
}

.room-card__code {
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.82);
    letter-spacing: 0.04em;
}

.room-badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.32rem 0.7rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.room-badge--open {
    color: #bbf7d0;
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.room-badge--almost-full {
    color: #fde68a;
    background: rgba(113, 63, 18, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.32);
}

.room-badge--full {
    color: #fecaca;
    background: var(--error-bg);
    border: 1px solid rgba(248, 113, 113, 0.28);
}

.room-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.room-stat {
    padding: 0.9rem;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.room-stat strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #f8fafc;
}

.room-stat span {
    display: block;
    color: rgba(203, 213, 225, 0.78);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.room-progress {
    position: relative;
    height: 8px;
    border-radius: var(--radius-full);
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.room-progress__bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-emerald) 0%, var(--color-blue) 100%);
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.28);
    transition: width 0.6s ease;
}

.room-card--stake-10::before,
.room-card--stake-20::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.room-card--stake-10::before { background: linear-gradient(90deg, #34d399, #10b981); }
.room-card--stake-20::before { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

.room-card__actions {
    position: relative;
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.room-card__actions .btn {
    flex: 1;
    margin-top: 0;
    min-height: 42px;
    padding: 0.6rem 1rem;
    font-size: var(--font-size-sm);
}

.room-card__actions .btn-primary {
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.22);
}

@media (max-width: 768px) {
    body.auth-page.dashboard-page {
        padding-top: var(--spacing-xl);
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-actions {
        width: 100%;
    }

    .dashboard-actions .btn {
        width: 100%;
    }

    .room-card__actions {
        flex-direction: column;
    }
}
