:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f7fa;
    --text-color: #333;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: #f0f2f5;
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.app-container {
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px 20px 0 20px; /* Adjust padding to remove bottom padding */
    display: flex;
    flex-direction: column;
    position: relative;
}

header h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 0 0 auto;
    padding: 10px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #7f8c8d;
    transition: all 0.3s ease;
    scroll-snap-align: start;
    white-space: nowrap;
    border-radius: 8px;
}

.tab-btn:hover {
    color: var(--primary-color);
    background-color: #f9f9f9;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
    margin-top: 100px;
}

.question-card {
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid transparent;
}

.question-text {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.answer-option:hover {
    background: #fafafa;
}

.answer-option input[type="radio"] {
    margin-right: 10px;
    accent-color: var(--primary-color);
}

/* Grading Styles */
.correct-answer {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.wrong-answer {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.description {
    margin-top: 15px;
    padding: 10px;
    background-color: #e2e3e5;
    border-radius: 4px;
    font-size: 0.9em;
    color: #383d41;
    border-left: 4px solid var(--primary-color);
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.floating-controls {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    z-index: 1000;
    padding: 15px 30px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 400px;
}

.primary-btn, .secondary-btn {
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.1s, box-shadow 0.2s;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.primary-btn:hover {
    background-color: #357abd;
    transform: translateY(-1px);
}

.secondary-btn {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: #f0f7ff;
}

.score-display {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--text-color);
}

.hidden {
    display: none;
}
