:root {
    /* COMELEC Official Colors */
    --comelec-blue: #0038A8;
    --comelec-blue-light: #1E4FBF;
    --comelec-gold: #FCD116;
    --comelec-gold-dark: #E5B800;
    --comelec-red: #CE1126;
    --comelec-navy: #001F5B;
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 1.5rem 3rem rgba(0, 24, 77, 0.4);
    --text-primary: #0A1F44;
    --text-secondary: #2C3E66;
    --input-bg: rgba(255, 255, 255, 0.75);
    --input-focus-bg: rgba(255, 255, 255, 0.95);
    --font-main: 'Inter', 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, #0b2b5e 0%, #0a1f3f 40%, #0d3b6e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

/* Decorative elements */
.bg-decoration {
    position: fixed;
    top: -10%;
    right: -5%;
    width: 55%;
    height: 70%;
    background: radial-gradient(circle at 70% 30%, rgba(252, 209, 22, 0.2) 0%, rgba(0, 56, 168, 0) 70%);
    border-radius: 50%;
    filter: blur(70px);
    z-index: 0;
    pointer-events: none;
}

.bg-decoration-2 {
    position: fixed;
    bottom: -15%;
    left: -8%;
    width: 65%;
    height: 65%;
    background: radial-gradient(circle at 30% 70%, rgba(206, 17, 38, 0.18) 0%, rgba(0, 31, 91, 0) 75%);
    border-radius: 50%;
    filter: blur(65px);
    z-index: 0;
    pointer-events: none;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 2.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 2.5rem 2rem;
    transition: all 0.25s ease;
    color: #fff;
}

@media (max-width: 576px) {
    .glass-card {
        padding: 2rem 1.5rem;
        border-radius: 2rem;
    }
}

/* COMELEC Header */
.comelec-header {
    text-align: center;
    margin-bottom: 2.2rem;
}

.comelec-logo {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comelec-logo img {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.comelec-logo img:hover {
    transform: scale(1.05);
}

.comelec-title {
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 0.2rem;
    color: #ffffff;
    text-shadow: 0 4px 12px rgba(0,0,0,0.4);
    margin-bottom: 0.15rem;
}

.comelec-sub {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 40, 104, 0.6);
    padding: 0.35rem 1.2rem;
    border-radius: 30px;
    display: inline-block;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(252, 209, 22, 0.4);
    letter-spacing: 0.3px;
}

.divider-section {
    display: flex;
    align-items: center;
    margin: 1.8rem 0 1.6rem;
    color: rgba(255, 255, 255, 0.8);
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(252, 209, 22, 0.7), transparent);
}

.divider-text {
    padding: 0 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FCD116;
}

/* Google Sign-In Button */
.google-login-wrapper {
    display: flex;
    justify-content: center;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    background-color: #ffffff;
    color: #1f1f1f;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.9rem 1.8rem;
    border-radius: 60px;
    border: 1px solid #dadce0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.2px;
    background: #ffffff;
    backdrop-filter: blur(4px);
    position: relative;
    text-decoration: none;
}

.btn-google:hover {
    background: #f8f9fc;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: #b8c0cc;
    transform: translateY(-1px);
    color: #1f1f1f;
    text-decoration: none;
}

.btn-google:active {
    background: #e9ecef;
    transform: translateY(1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.btn-google:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.google-icon-svg {
    width: 20px;
    height: 20px;
    margin-right: 2px;
}

/* Information text */
.info-text {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.info-text i {
    color: #FCD116;
    margin-right: 0.2rem;
}

.footer-note {
    margin-top: 0.8rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.comelec-seal {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Toast Notifications */
.toast-container {
    z-index: 9999;
}

.toast {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    min-width: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast.text-bg-success {
    background: linear-gradient(135deg, #00a854, #00c853) !important;
}

.toast.text-bg-danger {
    background: linear-gradient(135deg, #ce1126, #e53935) !important;
}

.toast.text-bg-warning {
    background: linear-gradient(135deg, #fcd116, #ffb300) !important;
    color: #1f1f1f !important;
}

.toast.text-bg-info {
    background: linear-gradient(135deg, #0038a8, #1e4fbf) !important;
}

.toast .btn-close-white {
    filter: brightness(0) invert(1);
}

.toast-body {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 1rem 1.2rem;
}

.toast-body i {
    font-size: 1.1rem;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .comelec-title {
        font-size: 1.7rem;
    }
    .glass-card {
        padding: 1.8rem 1.3rem;
    }
    .btn-google {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
    .comelec-logo img {
        width: 80px;
    }
    
    .toast {
        min-width: 250px;
        margin: 0.5rem;
    }
}