@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Base ── */
body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../images/Titanic_Main.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
}

/* ── Card ── */
.login {
    background: rgba(8, 12, 22, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 32px 28px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(30, 60, 120, 0.15);
    width: 340px;
    max-height: 90vh;
    overflow-y: auto;
}

.login h1 {
    text-align: center;
    margin: 0 0 4px 0;
    font-size: 1.6em;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.subtitle {
    text-align: center;
    margin: 0 0 12px 0;
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
}

/* ── Form ── */
.form-label {
    margin-bottom: 4px;
    display: block;
    font-weight: 500;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.9);
}

.form-control {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: inherit;
    font-size: 0.9em;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

select.form-control {
    appearance: none;
    padding-right: 30px;
    background-image: url('../images/arrow-down.png');
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

select.form-control:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

legend {
    text-align: center;
    margin-bottom: 6px;
    margin-top: 12px;
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.65);
}

.mb-3 {
    margin-bottom: 0;
}

/* ── Buttons ── */
.btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

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

/* ── Prefill ── */
.prefill-section {
    text-align: center;
    margin-bottom: 12px;
}

.prefill-label {
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.prefill-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.prefill-btn {
    padding: 5px 14px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-family: inherit;
    font-size: 0.82em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prefill-btn:hover {
    background-color: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
    transform: translateY(-1px);
}

/* ── Footer links ── */
.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0 12px;
}

.footer-links {
    text-align: center;
    margin-bottom: 8px;
}

.link-button {
    background: none;
    border: none;
    color: rgba(140, 180, 255, 0.75);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82em;
    padding: 0;
    transition: color 0.2s ease;
}

.link-button:hover {
    color: #60a5fa;
}

.link-separator {
    color: rgba(255, 255, 255, 0.2);
    margin: 0 8px;
    font-size: 0.85em;
}

.tech-badge {
    text-align: center;
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.25);
    margin: 4px 0 0;
    letter-spacing: 0.03em;
}

/* ── Results page ── */
.results-icon {
    text-align: center;
    font-size: 3em;
    margin-bottom: 8px;
}

.results-output {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
    color: #fff;
    line-height: 1.5;
}

.flavour-text {
    text-align: center;
    font-size: 0.85em;
    font-style: italic;
    color: rgba(200, 220, 255, 0.7);
    margin: 4px 0 12px;
    line-height: 1.4;
}

.results-detail {
    text-align: center;
    font-size: 0.82em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.results-btn {
    display: block;
    width: 100%;
    padding: 11px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.results-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
    color: #fff;
}

/* ── Loading overlay ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 16, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-card {
    text-align: center;
    padding: 40px 36px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin: 0 0 6px;
}

.loading-subtext {
    font-size: 0.82em;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .login {
        width: calc(100vw - 32px);
        padding: 24px 20px;
        border-radius: 12px;
        max-height: 95vh;
    }

    .login h1 {
        font-size: 1.35em;
    }
}

/* ── Scrollbar (for overflow cards) ── */
.login::-webkit-scrollbar {
    width: 4px;
}

.login::-webkit-scrollbar-track {
    background: transparent;
}

.login::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.login::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}