/* Premium Auth Design - Lexnor Pro */

:root {
    /* New Vibrant Sunset Gradient Palette */
    --primary-color: #ff4081;
    /* Pink fallback */
    --primary-gradient: linear-gradient(45deg, #ff00cc, #ff3333, #ff9933, #ffcc00);
    --primary-glow: rgba(255, 64, 129, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(0, 0, 0, 0.5);
}

.auth-content {
    text-align: center;
    padding-top: 10px;
}

.auth-message {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
}


body {
    background: radial-gradient(circle at center, #2b111e, #000000);
}

.container {
    width: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    /* Center only when dashboard is hidden (Login Screen State) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Revert centering for dashboard to allow top-to-bottom flow */
#dashboard:not(.hidden) ~ .container,
.container:has(#dashboard:not(.hidden)) {
    display: block;
    justify-content: flex-start;
    align-items: stretch;
}

.auth-box {
    width: 100%;
    max-width: 380px;
    max-height: 95vh;
    overflow-y: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: clamp(1.5rem, 5vh, 2.5rem);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: floatIn 0.8s ease-out;
    position: relative;
}

/* Decorational Glow at top */
.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 5px;
    background: var(--primary-color);
    box-shadow: 0 0 20px 10px var(--primary-glow);
    border-radius: 10px;
}

.logo {
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.app-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 20px;
    box-shadow: 0 0 20px var(--primary-glow);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 20px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 40px var(--primary-glow);
    }

    100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px var(--primary-glow);
}

.logo p {
    font-size: 0.9rem;
    color: #888;
    letter-spacing: 0.5px;
}

.tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 2rem;
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    z-index: 1;
}

.tab-btn.active {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.input-group {
    position: relative;
    margin-bottom: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    /* Space for eye icon on left */
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    text-align: right;
    /* RTL */
    direction: rtl;
}

.toggle-password {
    position: absolute;
    left: 5px;
    /* RTL placement */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 10;
}

.toggle-password:hover {
    opacity: 1;
}

.toggle-password:active {
    transform: translateY(-50%) !important;
}

.eye-icon {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.1);
    background: rgba(0, 0, 0, 0.6);
}

.input-group .icon {
    position: absolute;
    left: 20px;
    /* Left side because text is RTL */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
    transition: 0.3s;
    filter: grayscale(1);
}

.input-group input:focus+.icon {
    opacity: 1;
    filter: grayscale(0);
    transform: translateY(-50%) scale(1.1);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    margin-top: 1rem;
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px -10px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
    border: none;
}

.input-group input:focus {
    border-color: #ff4081;
    box-shadow: 0 0 0 4px rgba(255, 64, 129, 0.2);
    background: rgba(0, 0, 0, 0.7);
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px var(--primary-glow);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    margin-top: 1rem;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px -10px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: var(--primary-gradient);
    box-shadow: 0 0 20px 10px var(--primary-glow);
    border-radius: 10px;
}

.auth-form {
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-form.active {
    display: block;
}

/* Animations */
@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}

@media (max-height: 650px) {
    .logo {
        margin-bottom: 1rem;
    }

    .app-logo {
        width: 60px;
        height: 60px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .tabs {
        margin-bottom: 1rem;
    }

    .input-group {
        margin-bottom: 0.8rem;
    }

    .btn-primary {
        padding: 12px;
        margin-top: 0.5rem;
    }
}

/* Google Login Styles - Elegant Redesign */
.google-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.google-btn::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: 0.5s;
}

.google-btn:hover::before {
    left: 100%;
}

.google-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 46, 99, 0.2);
}

.google-icon {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.4);
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.or-divider:not(:empty)::before {
    margin-right: .5em;
}

.or-divider:not(:empty)::after {
    margin-left: .5em;
}

.privacy-agreement {
    margin-top: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.privacy-agreement a {
    color: #00e676;
    text-decoration: underline;
    font-weight: bold;
}

.privacy-agreement a:hover {
    color: #ff2e63;
}