/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Lighter Theme for Contrast */
    --primary-color: #18181b;
    --secondary-color: #f5f5f4;
    --accent-color: #d6b25e;
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-light: #71717a;
    --border-color: #e4e4e7;
    --background-light: #fafafa;
    --card-bg: #ffffff;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Animations */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-primary);
    line-height: 1.65;
    background-color: var(--background-light);
    color: var(--text-primary);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--primary-color);
    margin-bottom: 20px;
}

h1 { font-size: 2.5rem; text-align: center; }

/* Forms */
form {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="file"],
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    transition: border-color 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
}

button {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #ffffff;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

button:hover {
    background: transparent;
    color: var(--primary-color);
}

/* Quiz Content */
.question-block {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    transition: var(--transition-smooth);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.question-block:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.question-block p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.option-label {
    display: block;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: #f9f9f9;
}

.option-label:hover {
    background: #f1f1f1;
    border-color: var(--border-color);
}

input[type="radio"] {
    margin-right: 12px;
}

/* Results */
.feedback-item {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    border-left-width: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.correct { border-left-color: #10b981; background: #f0fdf4; }
.incorrect { border-left-color: #ef4444; background: #fef2f2; }

.source-box {
    margin-top: 15px;
    font-size: 0.9rem;
}

.source-box summary {
    cursor: pointer;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.source-content {
    margin-top: 10px;
    padding: 15px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    color: var(--text-secondary);
    line-height: 1.6;
}

.source-content p {
    margin-bottom: 10px;
}

.source-filename {
    font-family: monospace;
    background: #f4f4f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
    word-break: break-all;
}

.snippet-container {
    margin-top: 12px;
}

.snippet-text {
    margin-top: 8px;
    font-style: italic;
    white-space: pre-wrap;
    background: #fdfbf7;
    padding: 12px;
    border-radius: 4px;
    border: 1px inset #f0f0f0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.no-snippet {
    font-style: italic;
    color: var(--text-light);
    margin-top: 10px;
}

/* Spinner */
#loading {
    text-align: center;
    margin-top: 30px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

.flash {
    color: #10b981;
    margin-top: 20px;
    list-style: none;
    text-align: center;
    font-weight: 500;
}

/* Examples styling */
.examples {
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.examples span {
    color: var(--text-secondary);
    font-weight: 500;
}

.examples ul {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.examples li {
    margin-bottom: 4px;
}

.example-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.example-link:hover {
    text-decoration: underline;
}
