/* Global Styles */
:root {
    --primary-black: #000000;
    --primary-white: #FFFFFF;
    --accent-yellow: #CA8A04;
    --border-width: 2px;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.75rem;
    --border-radius-2xl: 1rem;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body {
    font-family: var(--font-mono);
    margin: 0;
    padding: 0;
    background-color: var(--primary-white);
    color: var(--primary-black);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1,
h2,
h3 {
    margin-top: 0;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 1rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.gap-4 {
    gap: 1rem;
}

.hidden {
    display: none;
}

/* Components */
.section-card {
    border: var(--border-width) solid var(--primary-black);
    border-radius: var(--border-radius-2xl);
    padding: 2rem;
    margin-bottom: 2rem;
    background-color: var(--primary-white);
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="file"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: var(--border-width) solid var(--primary-black);
    border-radius: var(--border-radius-lg);
    background-color: #f9fafb;
    font-family: var(--font-mono);
    box-sizing: border-box;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-black);
    color: var(--primary-white);
    border: var(--border-width) solid var(--primary-black);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-mono);
    transition: all 0.2s;
}

.btn:hover {
    background-color: var(--primary-white);
    color: var(--primary-black);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-black);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.spinner-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-black);
    opacity: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.85; }
    100% { opacity: 1; }
}

.spinner-overlay.hidden {
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Result Page Specifics */
.qualifier-box {
    height: 15vh;
    /* 15% of viewport as requested */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: var(--border-width) solid var(--primary-black);
    border-radius: var(--border-radius-2xl);
    margin-bottom: 2rem;
    background: #fdfdfd;
}

.score {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-yellow);
}

.revised-score-container {
    padding: 1rem;
    background: #f0fdf4;
    /* Light green tint */
    border: var(--border-width) solid var(--primary-black);
    border-radius: var(--border-radius-xl);
    margin-bottom: 1rem;
    text-align: center;
}

.resume-content,
.cover-letter-content {
    /* white-space: pre-wrap; removed to fix excessive gaps with HTML rendering */
    background: #fafafa;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-xl);
}

.resume-content h1,
.resume-content h2,
.resume-content h3,
.resume-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.resume-content p {
    margin-bottom: 0.5rem;
}

.resume-content ul {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.resume-content li {
    margin-bottom: 0.25rem;
}

details summary {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 1rem;
    list-style: none;
    /* Hide default triangle if preferred, but usually keep it */
}

details summary::-webkit-details-marker {
    color: var(--primary-black);
}