/* --- Reset & Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    /* Book Fair Blue Theme */
    background-color: #003edd;
    margin: 0;
    /* Reset */
    color: #333;
    /* Dark text for readability on white card */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Header / Banner --- */
header {
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
    background: transparent;
    /* No background color */
}

.banner-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Ensure it covers the area */
}


/* --- Main Content --- */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Start from top */
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 600px;
}

.glass-card {
    /* Clean White Card Style */
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* Soft shadow */
    margin-top: 1rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #0033aa;
    /* Theme Blue */
}

p.subtitle {
    font-size: 1rem;
    color: #64748b;
    /* Slate Gray for secondary text */
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* --- Form Styles --- */
.input-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 0.875rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    /* Light gray border */
    background: #f8fafc;
    /* Very light background */
    color: #1e293b;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: #0055ff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.1);
}

.error-msg {
    color: #dc2626;
    background: #fee2e2;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border: 1px solid #fecaca;
    font-weight: 500;
}

/* --- Image CAPTCHA Styles --- */
.captcha-box {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.captcha-image-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

#captchaImg {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    display: block;
    mix-blend-mode: normal;
}

.refresh-btn {
    background: #e2e8f0;
    border: none;
    color: #475569;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: #cbd5e1;
    color: #1e293b;
}

.captcha-input {
    background: #ffffff;
    border-color: #cbd5e1;
}

/* --- Buttons --- */
.action-btn {
    width: 100%;
    background: #0055ff;
    /* Vibrant Blue */
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.action-btn:hover {
    background: #0044cc;
    transform: translateY(-1px);
}

.action-btn:active {
    transform: scale(0.99);
}

/* --- Footer --- */
/* --- Footer --- */
footer {
    width: 100%;
    margin-top: auto;
    /* Push to bottom */
    padding: 0;
    line-height: 0;
    /* Remove gap */
}

.footer-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .glass-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .banner-img {
        width: 100%;
        height: auto;
    }
}