@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-blue: #1864c2;
    --primary-blue-hover: #1455a3;
    --primary-blue-light: rgba(24, 100, 194, 0.1);
    --accent-gold: #fbbf24;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --border-soft: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 0 4px rgba(24, 100, 194, 0.15);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif-font {
    font-family: 'Merriweather', Georgia, serif;
}

/* Hero Section */
.hero-banner {
    position: relative;
    width: 100%;
    min-height: 420px;
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(105deg, rgba(15, 60, 120, 0.95) 0%, rgba(24, 100, 194, 0.75) 50%, transparent 100%);
    padding: 4rem 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-overlay h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    font-weight: 300;
    font-style: italic;
    max-width: 500px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border-left: 3px solid var(--accent-gold);
    padding-left: 1rem;
}

@media (max-width: 768px) {
    .hero-overlay {
        background: linear-gradient(180deg, rgba(15,60,120,0.95) 0%, rgba(24,100,194,0.85) 100%);
        padding: 3rem 1.5rem;
        align-items: center;
        text-align: center;
    }
    .hero-banner {
        min-height: 340px;
    }
    .hero-overlay h1 {
        font-size: 2rem;
    }
    .hero-overlay p {
        border-left: none;
        border-top: 2px solid var(--accent-gold);
        padding-left: 0;
        padding-top: 1rem;
    }
}

/* Main Content Container */
.main-container {
    flex: 1;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    transform: translateY(-40px); /* Overlaps header slightly for modern feel */
    z-index: 10;
    position: relative;
}

.form-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 650px;
    padding: 3rem;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

.form-header-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.5rem;
}

.form-header-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-gold);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Inputs */
.input-group {
    display: flex;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.input-group:focus-within {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    background-color: var(--bg-page);
    color: var(--text-muted);
    border: 1px solid var(--border-soft);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 1.2rem;
    transition: var(--transition);
}

.input-group:focus-within .input-icon {
    color: var(--primary-blue);
    background-color: var(--primary-blue-light);
    border-color: var(--primary-blue);
}

.form-control {
    flex: 1;
    border: 1px solid var(--border-soft);
    border-left: 1px solid transparent;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 15px 16px;
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--text-main);
    background-color: var(--bg-surface);
    outline: none;
    transition: var(--transition);
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.form-control:focus {
    border-color: var(--primary-blue);
    border-left-color: var(--border-soft);
}

/* Button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 2.5rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 24px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(24, 100, 194, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 100, 194, 0.4);
    background: linear-gradient(135deg, var(--primary-blue-hover) 0%, #0d4080 100%);
}

.btn-submit:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(24, 100, 194, 0.3);
}

/* Footer Strip */
.footer-strip {
    width: 100%;
    display: flex;
    background-color: #f1f5f9;
    border-top: 1px solid var(--border-soft);
    margin-top: auto;
}
.footer-strip img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    opacity: 0.95;
}

/* Loader */
#loader {
    display: none;
    position: fixed;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
}

.spinner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(24, 100, 194, 0.1);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 0.8s linear infinite;
}

/* Auth / Verification pages overrides */
.code-input {
    text-align: center;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    width: 50px !important;
    height: 60px;
    border: 2px solid var(--border-soft) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--primary-blue) !important;
    box-shadow: none !important;
}

.code-input:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: var(--shadow-glow) !important;
}

.visually-hidden {
    display: none !important;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

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

@media (max-width: 576px) {
    .main-container {
        transform: translateY(-30px);
    }
    .form-card {
        padding: 2rem 1.5rem;
    }
}
