:root {
    --primary-color: #7C3AED;
    --secondary-color: #6366F1;
    --background-color: #0F172A;
    --text-color: #E2E8F0;
    --surface-color: #1E293B;
    --input-border: #334155;
    --success: #22c55e;
    --error: #ef4444;
    --shadow: rgba(0, 0, 0, 0.25);
    --text-muted: #94A3B8;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--background-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 25%);
    color: var(--text-color);
    line-height: 1.7;
    margin: 0;
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 800px;
    margin: 1rem auto;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 24px;
    box-shadow: 0 20px 40px var(--shadow),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
}

.quiz-topic {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 600;
}

.quiz-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 650px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group:last-of-type {
    margin-bottom: 2.5rem;  /* Increased spacing before the button */
}

.generate-btn {
    margin-top: 1rem;  /* Adjusted top margin */
    align-self: flex-start;
    width: fit-content;
}

label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1.1rem;
}

input, select {
    padding: 1rem 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    outline: none;
}

.generate-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

/* Update question block styling */
.question-block {
    background: rgba(30, 41, 59, 0.95);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.question-text {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Improve options styling */
.option {
    background: rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.option:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: var(--primary-color);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.option.selected {
    background: rgba(124, 58, 237, 0.25);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Enhance submit button */
.submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.25);
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(124, 58, 237, 0.35);
}

/* Add this to match the action buttons styling */
.submit-answers-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 2rem 0;
    width: 100%;
}

.submit-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    margin: 0;
    border: none;
    cursor: pointer;
}

.submit-btn:hover, .bottom-back-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .submit-answers-container {
        flex-direction: column;
        gap: 1rem;
    }

    .submit-btn, .bottom-back-home {
        width: 100%;
        text-align: center;
    }
}

/* Action buttons container */
.action-buttons {
    display: flex;
    justify-content: space-between;  /* Changed from flex-start to space-between */
    align-items: center;
    margin-top: 2rem;
    padding: 2rem 0;
    width: 100%;
}

.back-to-home, .try-another-quiz {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    margin: 0;
    border: none;
    cursor: pointer;
}

.back-to-home:hover, .try-another-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
    opacity: 0.9;
}

.back-to-home svg,.try-another-quiz svg {
    margin-right: 0.5rem;
}
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .back-to-home, .try-another-quiz {
        width: 100%;
        text-align: center;
    }
}

.options {
    display: grid;
    gap: 1rem;
}

.option {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.option:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.option input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.option.selected {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--primary-color);
}

.results-section {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    background: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.result-item.correct {
    background: rgba(34, 197, 94, 0.1);
    border-left: 4px solid var(--success);
}

.result-item.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--error);
}

#score-display {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.score-summary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 16px;
    font-size: 1.25rem;
    text-align: center;
    box-shadow: 0 8px 16px var(--shadow);
}

pre {
    background: var(--background-color);
    color: var(--text-color);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    overflow-x: auto;
    font-size: 0.95rem;
    line-height: 1.5;
}

code {
    color: var(--text-color);
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .container {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
}