:root {
    --bbms-blue: #003366;
    /* Deep blue inferred from logo/branding */
    --bbms-gold: #c5a059;
    /* Gold inferred from common school branding or logo accents */
    --bbms-light: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: 'Playfair Display', serif;
}

/* Glassmorphism Navbar */
.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar-brand img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.school-name {
    color: var(--bbms-blue);
    font-weight: 700;
    font-size: 1.25rem;
    margin-left: 10px;
    letter-spacing: 0.5px;
}

/* Main Container */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1rem;
    padding-top: 100px;
    /* Account for fixed navbar (approx 76px) + spacing */
}

.form-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 1000px;
    /* Wide enough for form */
    margin: 0 auto;
    min-height: 600px;
    /* Prevent collapse */
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Iframe Styling */
.iframe-container {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Fallback */
    min-height: 800px;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    /* Hidden initially for fade-in */
    transition: opacity 0.5s ease-in;
}

iframe.loaded {
    opacity: 1;
}

/* Loading Spinner */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.4s ease-out, visibility 0.4s;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 51, 102, 0.1);
    border-left-color: var(--bbms-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--bbms-blue);
    font-weight: 500;
    letter-spacing: 1px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Footer */
footer {
    background: var(--bbms-blue);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: auto;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .school-name {
        font-size: 1rem;
        /* Clean look on mobile if needed, or keep it */
    }

    .form-card {
        border-radius: 0;
        /* Full width on smaller screens looks better sometimes, or small radius */
        box-shadow: none;
        background: transparent;
    }

    .iframe-container {
        min-height: 100vh;
        /* Maximize space on mobile */
    }

    .main-wrapper {
        padding: 100px 1rem 1rem 1rem;
        /* Restore padding-top for fixed navbar, add side padding */
    }
}