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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #e4e4e4;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    color: #00d4ff;
    font-size: 1.8rem;
}

.timer-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.timer-display {
    background: #0f0f23;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: #00ff88;
    border: 2px solid #00ff88;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-timer {
    background: #00d4ff;
    color: #1a1a2e;
}

.btn-timer:hover {
    background: #00a8cc;
    transform: scale(1.05);
}

.btn-timer.paused {
    background: #ff6b6b;
}

/* Screen */
.screen {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Paper Selection */
#selectionScreen h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #00d4ff;
}

.mode-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.mode-btn {
    padding: 12px 30px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
}

.mode-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    color: #1a1a2e;
    border-color: transparent;
}

.mode-description {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.mode-description p {
    color: #aaa;
    font-size: 0.95rem;
    margin: 0;
}

.paper-list {
    display: grid;
    gap: 15px;
}

.paper-item {
    background: linear-gradient(135deg, #2d2d44 0%, #1f1f35 100%);
    padding: 20px 30px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.paper-item:hover {
    border-color: #00d4ff;
    transform: translateX(10px);
}

.paper-item h3 {
    color: #fff;
    font-size: 1.2rem;
}

.paper-item span {
    color: #888;
    font-size: 0.9rem;
}

/* Question Container */
.question-container {
    margin-bottom: 30px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.question-num {
    background: #00d4ff;
    color: #1a1a2e;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
}

.question-progress {
    color: #888;
}

.question-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    white-space: pre-wrap;
}

.options-container {
    display: grid;
    gap: 12px;
}

.option {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.option:hover {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.option.selected {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.15);
}

.option-label {
    background: #00d4ff;
    color: #1a1a2e;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.option.selected .option-label {
    background: #00ff88;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

/* Study Feedback */
.study-feedback {
    margin-top: 30px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.feedback-header {
    margin-bottom: 20px;
    text-align: center;
}

.feedback-status {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 700;
}

.feedback-status.correct {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 2px solid #00ff88;
}

.feedback-status.incorrect {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 2px solid #ff6b6b;
}

.feedback-content {
    margin-bottom: 20px;
}

.feedback-section {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.feedback-section strong {
    display: block;
    color: #00d4ff;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.feedback-section span,
.feedback-section p {
    color: #e4e4e4;
    line-height: 1.6;
    margin: 0;
}

.btn-continue {
    width: 100%;
    background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    color: #1a1a2e;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-continue:hover {
    transform: scale(1.02);
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-nav {
    background: #2d2d44;
    color: #fff;
    min-width: 120px;
}

.btn-nav:hover {
    background: #3d3d54;
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit {
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    color: #1a1a2e;
    min-width: 150px;
}

.btn-submit:hover {
    transform: scale(1.05);
}

/* Question Palette */
.question-palette {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
}

.question-palette h3 {
    margin-bottom: 15px;
    color: #00d4ff;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.palette-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    background: #2d2d44;
    color: #fff;
    transition: all 0.2s ease;
}

.palette-btn:hover {
    transform: scale(1.1);
}

.palette-btn.answered {
    background: #00ff88;
    color: #1a1a2e;
}

.palette-btn.current {
    border: 3px solid #00d4ff;
}

.palette-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #888;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.answered {
    background: #00ff88;
}

.dot.unanswered {
    background: #2d2d44;
}

.dot.current {
    background: #2d2d44;
    border: 2px solid #00d4ff;
}

/* Result Screen */
#resultScreen h2 {
    text-align: center;
    color: #00d4ff;
    margin-bottom: 30px;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.result-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.result-card.correct {
    border-color: #00ff88;
}

.result-card.incorrect {
    border-color: #ff6b6b;
}

.result-card.time {
    border-color: #00d4ff;
}

.result-label {
    display: block;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

.result-card.correct .result-value {
    color: #00ff88;
}

.result-card.incorrect .result-value {
    color: #ff6b6b;
}

.result-card.time .result-value {
    color: #00d4ff;
}

.detailed-results h3 {
    color: #00d4ff;
    margin-bottom: 20px;
}

.review-container {
    max-height: 500px;
    overflow-y: auto;
}

.review-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #888;
}

.review-item.correct {
    border-left-color: #00ff88;
}

.review-item.incorrect {
    border-left-color: #ff6b6b;
}

.review-item.unanswered {
    border-left-color: #ffa500;
}

.review-question {
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.review-answers {
    display: grid;
    gap: 5px;
    font-size: 0.9rem;
}

.review-answers span {
    padding: 5px 10px;
    border-radius: 5px;
}

.your-answer {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.your-answer.correct {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.correct-answer {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.explanation {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 5px;
    font-size: 0.85rem;
    color: #aaa;
}

.btn-primary {
    display: block;
    margin: 30px auto 0;
    background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    color: #1a1a2e;
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-primary:hover {
    transform: scale(1.05);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #00d4ff;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .question-text {
        font-size: 1rem;
    }

    .result-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}
