﻿/* ClearBooks - Ultra Premium Financial Authentication System */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #0066ff;
    --secondary-blue: #004dd9;
    --accent-blue: #3385ff;
    --dark-blue: #001a4d;
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #004dd9 50%, #001a4d 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
    --shadow-main: 0 32px 64px rgba(0, 26, 77, 0.4);
    --shadow-hover: 0 40px 80px rgba(0, 26, 77, 0.5);
    --border-radius: 24px;
    --transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--gradient-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    font-weight: 400;
    line-height: 1.6;
}

    /* Ultra-Premium Animated Background */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at 25% 25%, rgba(0, 212, 255, 0.15) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(0, 102, 255, 0.15) 0%, transparent 50%), linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
        animation: backgroundShift 20s ease-in-out infinite;
        z-index: 0;
    }

@keyframes backgroundShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(1deg);
    }
}

/* Geometric Background Pattern */
.geometric-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    background-image: linear-gradient(30deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff), linear-gradient(150deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff), linear-gradient(30deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff), linear-gradient(150deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff);
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
    animation: geometricFloat 30s linear infinite;
}

@keyframes geometricFloat {
    0% {
        transform: translateY(0px);
    }

    100% {
        transform: translateY(-140px);
    }
}

/* Premium Particle System */
.particle-system {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

    .particle:nth-child(odd) {
        animation-duration: 20s;
        background: radial-gradient(circle, rgba(0, 212, 255, 0.6) 0%, transparent 70%);
    }

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0px) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: scale(1);
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) translateX(100px) scale(0);
        opacity: 0;
    }
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

/* Revolutionary Premium Card Design */
.auth-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 60px 50px;
    width: 100%;
    max-width: 520px;
    position: relative;
    box-shadow: var(--shadow-main), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(0, 102, 255, 0.1);
    transition: var(--transition);
    overflow: hidden;
    animation: cardEntrance 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

    .auth-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        animation: topShimmer 3s ease-in-out infinite;
    }

    .auth-card::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: conic-gradient(from 0deg, transparent, rgba(0, 102, 255, 0.05), transparent);
        animation: rotateGlow 15s linear infinite;
        z-index: -1;
    }

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(80px) scale(0.9);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes topShimmer {
    0%, 100% {
        opacity: 0;
        transform: translateX(-100%);
    }

    50% {
        opacity: 1;
        transform: translateX(100%);
    }
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.auth-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 1), 0 0 0 1px rgba(0, 102, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.93) 50%, rgba(248, 250, 252, 0.98) 100%);
}

/* Premium Header Design */
.auth-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

    .auth-header h1 {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 3.2em;
        font-weight: 800;
        background: linear-gradient(135deg, #0066ff 0%, #004dd9 50%, #001a4d 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 16px;
        letter-spacing: -2px;
        position: relative;
        animation: titleGlow 4s ease-in-out infinite;
        text-shadow: 0 2px 4px rgba(0, 102, 255, 0.1);
    }

        .auth-header h1::before {
            content: '💎';
            position: absolute;
            top: -20px;
            right: -30px;
            font-size: 0.4em;
            animation: gemSpin 3s ease-in-out infinite;
        }

@keyframes titleGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(0, 102, 255, 0.2));
        text-shadow: 0 2px 4px rgba(0, 102, 255, 0.1);
    }

    50% {
        filter: drop-shadow(0 0 40px rgba(0, 102, 255, 0.4));
        text-shadow: 0 4px 8px rgba(0, 102, 255, 0.2);
    }
}

@keyframes gemSpin {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }
}

.auth-header p {
    color: rgba(0, 102, 255, 0.8);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Styling */
.auth-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    color: #001a4d;
    font-size: 2.4em;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -1px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.7s forwards;
    text-shadow: 0 2px 4px rgba(0, 26, 77, 0.1);
}

.auth-subtitle {
    text-align: center;
    color: rgba(0, 102, 255, 0.7);
    margin-bottom: 40px;
    font-size: 16px;
    font-weight: 400;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.9s forwards;
}

/* Revolutionary Form Design */
.auth-form {
    margin-bottom: 35px;
}

.form-group {
    margin-bottom: 28px;
    position: relative;
    opacity: 0;
    animation: fadeInUp 1s ease-out calc(1.1s + var(--delay, 0s)) forwards;
}

    .form-group:nth-child(1) {
        --delay: 0s;
    }

    .form-group:nth-child(2) {
        --delay: 0.1s;
    }

    .form-group:nth-child(3) {
        --delay: 0.2s;
    }

    .form-group:nth-child(4) {
        --delay: 0.3s;
    }

    .form-group:nth-child(5) {
        --delay: 0.4s;
    }

    .form-group label {
        display: block;
        margin-bottom: 12px;
        color: #001a4d;
        font-weight: 600;
        font-size: 15px;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        opacity: 0.9;
    }

        .form-group label span {
            margin-right: 8px;
            font-size: 16px;
        }

    /* Premium Input Design */
    .form-group input {
        width: 100%;
        padding: 20px 24px;
        border: 2px solid rgba(0, 102, 255, 0.15);
        border-radius: 16px;
        font-size: 16px;
        font-weight: 500;
        background: rgba(255, 255, 255, 0.8);
        color: #001a4d;
        transition: var(--transition);
        outline: none;
        backdrop-filter: blur(10px);
        font-family: 'Poppins', sans-serif;
        position: relative;
        box-shadow: inset 0 1px 3px rgba(0, 102, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    }

        .form-group input::placeholder {
            color: rgba(0, 102, 255, 0.5);
            font-weight: 400;
        }

        .form-group input:focus {
            border-color: #00d4ff;
            background: rgba(255, 255, 255, 0.95);
            box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.2), 0 20px 40px rgba(0, 0, 0, 0.15), inset 0 1px 3px rgba(0, 212, 255, 0.1);
            transform: translateY(-2px);
        }

        .form-group input.error {
            border-color: #ff3366;
            background: rgba(255, 255, 255, 0.9);
            box-shadow: 0 0 0 4px rgba(255, 51, 102, 0.2), inset 0 1px 3px rgba(255, 51, 102, 0.1);
        }

/* Ultra-Premium Button */
.auth-btn {
    width: 100%;
    padding: 22px 32px;
    background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.8s forwards;
}

    .auth-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: var(--transition);
    }

    .auth-btn:hover {
        background: linear-gradient(135deg, #0066ff 0%, #004dd9 100%);
        transform: translateY(-4px);
        box-shadow: 0 30px 60px rgba(0, 212, 255, 0.4);
    }

        .auth-btn:hover::before {
            left: 100%;
        }

    .auth-btn:active {
        transform: translateY(-2px);
    }

    .auth-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* Advanced Loading Animation */
.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.loader-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spinPremium 1s linear infinite;
}

@keyframes spinPremium {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Premium Message Design */
.message {
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 15px;
    font-weight: 600;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: messageSlide 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

    .message::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        animation: messageShimmer 2s infinite;
    }

@keyframes messageSlide {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes messageShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.error-message {
    background: rgba(255, 51, 102, 0.15);
    color: #ff6b8a;
    border-color: rgba(255, 51, 102, 0.3);
}

.success-message {
    background: rgba(0, 255, 127, 0.15);
    color: #00ff7f;
    border-color: rgba(0, 255, 127, 0.3);
}

.form-group .error-message {
    background: none;
    border: none;
    padding: 0;
    margin: 8px 0 0 0;
    font-size: 13px;
    font-weight: 500;
}

/* Enhanced Footer */
.auth-footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 102, 255, 0.2);
    opacity: 0;
    animation: fadeInUp 1s ease-out 2s forwards;
}

    .auth-footer p {
        color: rgba(0, 102, 255, 0.7);
        font-size: 15px;
        font-weight: 500;
    }

    .auth-footer a {
        color: #0066ff;
        text-decoration: none;
        font-weight: 700;
        transition: var(--transition);
        position: relative;
    }

        .auth-footer a::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, #00d4ff, #0066ff);
            transition: var(--transition);
        }

        .auth-footer a:hover {
            color: #004dd9;
            text-shadow: 0 0 20px rgba(0, 102, 255, 0.4);
        }

            .auth-footer a:hover::after {
                width: 100%;
            }

/* Floating Background Elements */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    animation: floatAdvanced 12s ease-in-out infinite;
    backdrop-filter: blur(2px);
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    top: 50%;
    right: -5%;
    animation-delay: 4s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 20%;
    right: 10%;
    animation-delay: 8s;
}

@keyframes floatAdvanced {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-40px) rotate(90deg) scale(1.1);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-20px) rotate(180deg) scale(0.9);
        opacity: 0.4;
    }

    75% {
        transform: translateY(-60px) rotate(270deg) scale(1.2);
        opacity: 0.7;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        padding: 50px 35px;
        margin: 20px;
        max-width: 450px;
    }

    .auth-header h1 {
        font-size: 2.5em;
    }

    .auth-content h2 {
        font-size: 2em;
    }

    .form-group input {
        padding: 18px 20px;
        font-size: 16px;
    }

    .auth-btn {
        padding: 20px 28px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 20px 10px;
    }

    .auth-card {
        padding: 40px 25px;
    }

    .auth-header h1 {
        font-size: 2.2em;
    }

    .form-group input {
        padding: 16px 18px;
    }

    .auth-btn {
        padding: 18px 24px;
    }
}

/* Accessibility & Performance */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .auth-card {
        background: rgba(0, 0, 0, 0.9);
        border: 3px solid #00d4ff;
    }

    .form-group input {
        background: rgba(255, 255, 255, 0.1);
        border-width: 3px;
    }
}

/* Advanced Focus States */
.form-group input:focus,
.auth-btn:focus {
    outline: 3px solid rgba(0, 212, 255, 0.6);
    outline-offset: 2px;
}

/* Print Optimization */
@media print {
    .auth-background,
    .geometric-bg,
    .particle-system {
        display: none;
    }

    .auth-card {
        background: white;
        color: black;
        box-shadow: none;
    }
}
