:root {
    --primary-bg: #f4f7fa; /* Very light blue-grey for a clean background */
    --glass-bg: rgba(255, 255, 255, 0.45); /* More transparent glassmorphism */
    --glass-border: rgba(255, 255, 255, 0.4);
    --accent-color: #0b2e59; /* Asia Securities Dark Blue */
    --accent-hover: #1a4f8f; /* Slightly lighter blue for hover */
    --text-primary: #1e293b; /* Dark text */
    --text-secondary: #64748b; /* Soft grey text */
    --input-bg: rgba(255, 255, 255, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-image: url('/static/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #bfdbfe; /* Soft light blue */
    animation: float 10s ease-in-out infinite;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: #e2e8f0; /* Soft slate/grey */
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}

.container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    z-index: 1;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(11, 46, 89, 0.15); /* Soft dark blue shadow */
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.header {
    text-align: center;
    margin-bottom: 35px;
}

.header h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.logo {
    max-width: 160px;
    height: auto;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #0b2e59, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.input-group input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid rgba(11, 46, 89, 0.2);
    color: var(--text-primary);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: rgba(100, 116, 139, 0.6);
}

.input-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(11, 46, 89, 0.15);
}

.input-group input:focus + label {
    color: var(--accent-color);
}

.disclaimer-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
}

.submit-btn {
    width: 100%;
    background: var(--accent-color);
    color: #ffffff; /* White text on dark blue button */
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(11, 46, 89, 0.4);
}

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

.text-center {
    text-align: center;
}

.success-icon {
    color: var(--accent-color);
    margin-bottom: 20px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.text-center h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.text-center p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .glass-panel {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .header h1, .text-center h1 {
        font-size: 1.65rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    .input-group input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 14px;
        font-size: 1rem;
    }

    .blob-1 {
        width: 300px;
        height: 300px;
    }

    .blob-2 {
        width: 250px;
        height: 250px;
    }
}

/* Dark Mode Optimization */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-bg: #0f172a;
        --glass-bg: rgba(15, 23, 42, 0.85); /* Darker glass to ensure text readability against potentially bright background images */
        --glass-border: rgba(255, 255, 255, 0.15);
        --accent-color: #60a5fa; /* Brighter blue for visibility */
        --accent-hover: #93c5fd;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --input-bg: rgba(30, 41, 59, 0.95);
    }

    .header h1 {
        background: linear-gradient(135deg, #93c5fd, #bfdbfe);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .input-group input {
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--text-primary);
    }

    .input-group input::placeholder {
        color: rgba(203, 213, 225, 0.6);
    }

    .input-group input:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
    }

    .submit-btn {
        color: #0f172a; /* Dark text on bright blue button */
        box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
    }

    .submit-btn:hover {
        box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
    }
    
    .blob-1 {
        background: rgba(59, 130, 246, 0.4); /* Adjust blobs for dark mode */
    }
    
    .blob-2 {
        background: rgba(30, 58, 138, 0.4);
    }
}
