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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #0a0a0f;
    position: relative;
}

/* Page switching */
.page {
    display: none;
    width: 100%;
    min-height: 100vh;
}

/* .page.active {} */

#loginPage.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#dashboardPage.active {
    display: block;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Animated Background Blobs */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #1e40af 0%, #60a5fa 100%);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #312e81 0%, #6366f1 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    margin: 0 auto;
}

/* Glass Card */
.glass-card {
    background: rgba(15, 15, 25, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(59, 130, 246, 0.1),
            transparent);
    animation: shine 3s infinite;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Header */
.card-header {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

.welcome-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    animation: fadeInDown 0.8s ease-out 0.3s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.input-group {
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-bottom-color: #3b82f6;
}

.input-group input:focus+label,
.input-group input:valid+label {
    transform: translateY(-24px) scale(0.85);
    color: #60a5fa;
}

.input-group label {
    position: absolute;
    left: 0;
    top: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.3s ease;
}

.input-group input:focus~.input-line {
    width: 100%;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-top: -8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.forgot-link {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #93c5fd;
}

/* Submit Button */
.submit-btn {
    position: relative;
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

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

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover .btn-shine {
    left: 100%;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 32px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(59, 130, 246, 0.3),
            transparent);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    color: #93c5fd;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.social-btn svg {
    transition: transform 0.3s ease;
}

.social-btn:hover svg {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 480px) {
    .glass-card {
        padding: 36px 28px;
    }

    .welcome-title {
        font-size: 28px;
    }

    .social-login {
        flex-direction: column;
    }
}

/* Additional Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

.blob-1 {
    animation: float 20s infinite ease-in-out, pulse 4s infinite ease-in-out;
}

.blob-2 {
    animation: float 25s infinite ease-in-out, pulse 5s infinite ease-in-out;
}

.blob-3 {
    animation: float 18s infinite ease-in-out, pulse 6s infinite ease-in-out;
}