/* ═══════════════════════════════════════════════════════════
   UnoPlay Casino — Login Page Styles (Premium Redesign)
   ═══════════════════════════════════════════════════════════ */

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

:root {
    /* UNO Brand Colors */
    --uno-red:       #e42528;
    --uno-red-dark:  #b51e21;
    --uno-yellow:    #feca1b;
    --uno-blue:      #0065b3;
    --uno-green:     #009a52;
    --uno-black:     #1a1a2e;

    /* Surface Colors */
    --bg-dark:       #0d0f1a;
    --card-bg:       rgba(255,255,255,0.04);
    --card-border:   rgba(255,255,255,0.10);
    --input-bg:      rgba(255,255,255,0.07);
    --input-border:  rgba(255,255,255,0.12);
    --input-focus:   rgba(228, 37, 40, 0.5);

    /* Text */
    --text-primary:  #ffffff;
    --text-secondary:#a0aec0;
    --text-muted:    #718096;

    /* Status */
    --success: #22c55e;
    --error:   #ef4444;
}

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

html, body {
    height: 100%;
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    background: var(--bg-dark);
    overflow-x: hidden;
}

/* ── Toast System ─────────────────────────────────── */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 22px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateX(130%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    pointer-events: none;
    max-width: 300px;
}
.toast.show     { transform: translateX(0); }
.toast.success  { background: linear-gradient(135deg, #16a34a, #22c55e); border-left: 4px solid #4ade80; }
.toast.error    { background: linear-gradient(135deg, #b91c1c, #ef4444); border-left: 4px solid #fca5a5; }

/* ── Background Scene ─────────────────────────────── */
.bg-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.card-float {
    position: absolute;
    font-size: 3rem;
    opacity: 0.07;
    animation: floatAround 20s linear infinite;
    user-select: none;
}

.c1  { top: 10%;  left: 5%;   animation-duration: 18s; animation-delay: 0s; }
.c2  { top: 30%;  left: 85%;  animation-duration: 22s; animation-delay: -4s; }
.c3  { top: 60%;  left: 10%;  animation-duration: 16s; animation-delay: -8s; }
.c4  { top: 75%;  left: 75%;  animation-duration: 24s; animation-delay: -2s; }
.c5  { top: 5%;   left: 50%;  animation-duration: 20s; animation-delay: -6s; }
.c6  { top: 90%;  left: 40%;  animation-duration: 15s; animation-delay: -10s; }
.c7  { top: 45%;  left: 55%;  animation-duration: 26s; animation-delay: -14s; }

@keyframes floatAround {
    0%   { transform: translate(0,  0)   rotate(0deg)   scale(1); }
    25%  { transform: translate(30px, -50px) rotate(90deg)  scale(1.1); }
    50%  { transform: translate(-20px, 30px) rotate(180deg) scale(0.9); }
    75%  { transform: translate(50px, 20px)  rotate(270deg) scale(1.05); }
    100% { transform: translate(0,  0)   rotate(360deg) scale(1); }
}

.bg-gradient-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 0% 0%,   rgba(228, 37, 40, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 70% 60% at 100% 100%, rgba(0, 101, 179, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 50% 50%,  rgba(254, 202, 27, 0.05) 0%, transparent 70%),
        linear-gradient(180deg, #0d0f1a 0%, #111327 100%);
    pointer-events: none;
}

/* ── Page Layout ──────────────────────────────────── */
.page-layout {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* ── Brand Panel (LEFT) ───────────────────────────── */
.brand-panel {
    display: none; /* hidden on mobile */
    flex: 1;
    padding: 3rem 3rem 3rem 4rem;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(228, 37, 40, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.brand-logo-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.brand-logo-text {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--uno-yellow);
    letter-spacing: -2px;
    text-shadow:
        3px 3px 0 var(--uno-red),
        6px 6px 0 rgba(0,0,0,0.3);
    line-height: 1;
}

.brand-logo-badge {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.brand-tagline {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.brand-tagline span {
    color: var(--uno-yellow);
}

.brand-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.brand-badges {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.7rem 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s;
}

.brand-badge:hover {
    border-color: rgba(228, 37, 40, 0.4);
    color: var(--text-primary);
}

.badge-icon {
    font-size: 1.2rem;
}

.promo-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
}

.promo-img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Auth Panel (RIGHT) ───────────────────────────── */
.auth-panel {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 1rem;
    min-height: 100vh;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Mobile only logo */
.mobile-logo {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    justify-content: center;
    padding: 1.5rem 1.5rem 0;
}

.brand-logo-text-sm {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--uno-yellow);
    letter-spacing: -1px;
    text-shadow: 2px 2px 0 var(--uno-red), 4px 4px 0 rgba(0,0,0,0.3);
    line-height: 1;
}

.brand-logo-badge-sm {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ── Tabs ─────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    margin: 1.2rem 1.5rem 0;
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 5px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: 'Poppins', sans-serif;
}

.tab-icon { font-size: 1rem; }

.auth-tab.active {
    background: var(--uno-red);
    color: white;
    box-shadow: 0 4px 15px rgba(228, 37, 40, 0.4);
}

/* ── Auth Body ────────────────────────────────────── */
.auth-body {
    padding: 1.5rem;
}

.auth-content {
    display: none;
    animation: fadeUp 0.35s ease forwards;
}

.auth-content.active {
    display: block;
}

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

.form-heading {
    margin-bottom: 1.5rem;
}

.form-heading h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.form-heading p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ── Input System ─────────────────────────────────── */
.input-group {
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.label-row .input-label { margin-bottom: 0; }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    transition: all 0.25s ease;
}

.input-wrapper:focus-within {
    border-color: var(--uno-red);
    background: rgba(228, 37, 40, 0.06);
    box-shadow: 0 0 0 3px rgba(228, 37, 40, 0.15);
}

.input-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    position: absolute;
    left: 14px;
    pointer-events: none;
    flex-shrink: 0;
    transition: color 0.25s;
}

.input-wrapper:focus-within .input-icon {
    color: var(--uno-red);
}

.input-field {
    width: 100%;
    padding: 0.9rem 0.9rem 0.9rem 2.8rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
}

.input-field::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.3rem;
    transition: color 0.2s;
}
.toggle-password:hover { color: var(--text-primary); }
.toggle-password svg  { width: 18px; height: 18px; }

/* ── Primary Button ───────────────────────────────── */
.btn-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--uno-red) 0%, #c41f22 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 20px rgba(228, 37, 40, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before { left: 100%; }

.btn-primary:hover {
    background: linear-gradient(135deg, #f02f32 0%, #d42527 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(228, 37, 40, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(228, 37, 40, 0.3);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Divider ──────────────────────────────────────── */
.divider {
    position: relative;
    text-align: center;
    margin: 1.2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--card-border);
}

.divider span {
    position: relative;
    background: transparent;
    padding: 0 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    /* We need a bg here to mask the line */
    background: #111524;
    border-radius: 4px;
}

/* ── Social Row ───────────────────────────────────── */
.social-row {
    display: flex;
    gap: 0.8rem;
}

.btn-social {
    flex: 1;
    padding: 0.75rem;
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s;
    font-family: 'Poppins', sans-serif;
}

.btn-social svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-google:hover {
    border-color: #ea4335;
    background: rgba(234, 67, 53, 0.08);
    color: #ea4335;
}

.btn-facebook:hover {
    border-color: #1877f2;
    background: rgba(24, 119, 242, 0.08);
    color: #1877f2;
}

/* ── Misc Text Links ──────────────────────────────── */
.forgot-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--uno-yellow);
    text-decoration: none;
    transition: color 0.2s;
}
.forgot-link:hover { color: #ffe060; }

.switch-prompt {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1.2rem;
}

.link-btn {
    background: none;
    border: none;
    color: var(--uno-yellow);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    padding: 0;
    transition: color 0.2s;
}
.link-btn:hover { color: #ffe060; }

/* ── Back Button ──────────────────────────────────── */
.back-bar { margin-bottom: 1rem; }

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
}
.back-btn:hover { color: var(--text-primary); }
.back-btn svg { width: 18px; height: 18px; }

/* ── Trust Bar ────────────────────────────────────── */
.trust-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    flex-wrap: wrap;
}

/* ── Responsive: Desktop ──────────────────────────── */
@media (min-width: 900px) {
    .brand-panel {
        display: flex;
        max-width: 520px;
    }

    .mobile-logo {
        display: none;
    }

    .auth-panel {
        flex: 1;
        min-height: auto;
        padding: 2rem;
    }

    .auth-card {
        max-width: 420px;
    }
}

/* ── Responsive: Large Desktop ────────────────────── */
@media (min-width: 1200px) {
    .brand-panel {
        max-width: 600px;
        padding: 3rem 4rem 3rem 5rem;
    }

    .brand-logo-text {
        font-size: 5.5rem;
    }

    .brand-tagline {
        font-size: 2.2rem;
    }
}
