* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f2df0c;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.quiz-title {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 700;
}

.timer-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.current-time {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    color: #555;
}

.clock-icon {
    width: 24px;
    height: 24px;
    fill: #555;
}

.circular-timer {
    position: relative;
    width: 120px;
    height: 120px;
}

.circular-timer svg {
    transform: rotate(-90deg);
}

.timer-background {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: #4caf50;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.timer-progress.warning {
    stroke: #ff9800;
}

.timer-progress.danger {
    stroke: #f44336;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

.timer-text.danger {
    animation: blink 1s infinite;
    color: #f44336;
}

.instructions-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.answer-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.answer-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.instructions-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .questions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .questions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.question-tile {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.question-tile:nth-child(4n+1) {
    background: #e8f5e9;
}

.question-tile:nth-child(4n+2) {
    background: #e3f2fd;
}

.question-tile:nth-child(4n+3) {
    background: #fce4ec;
}

.question-tile:nth-child(4n) {
    background: #fff3e0;
}

.question-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.question-number {
    display: inline-block;
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-bottom: 15px;
    font-weight: 600;
}

.question-text {
    color: #2c3e50;
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option {
    background: white;
    border: 2px solid transparent;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.option:hover {
    border-color: #2196f3;
    background: #f0f7ff;
}

.option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #2196f3;
}

.option label {
    cursor: pointer;
    color: #555;
    flex: 1;
}

.submit-section {
    text-align: center;
    margin-top: 40px;
}

.submit-button {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border: none;
    padding: 15px 50px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(33, 150, 243, 0.4);
}

/* Instructions Drawer */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}

.drawer {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.drawer.open {
    right: 0;
}

.drawer-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-size: 1.5em;
    color: #333;
    font-weight: 600;
}

.close-drawer {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.close-drawer:hover {
    color: #333;
}

.drawer-content {
    padding: 30px;
}

.instruction-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.instruction-item:last-child {
    border-bottom: none;
}

.instruction-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-text {
    color: #666;
    line-height: 1.6;
}

.loading {
    text-align: center;
    padding: 60px;
    color: #666;
}

.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #2196f3;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

@media (max-width: 600px) {
    .drawer {
        width: 100%;
        right: -100%;
    }

    .questions-grid {
        grid-template-columns: 1fr;
    }

    .timer-section {
        gap: 20px;
    }

    .circular-timer {
        width: 100px;
        height: 100px;
    }

    .timer-text {
        font-size: 1.2em;
    }
}