/* IH Cloud Data Engineering Learning Hub - Shared Quiz Styles */

/* ==================== Base Theme Variables ==================== */
:root {
    /* Default dark theme colors (can be overridden by quiz config) */
    --bg-primary: #0a0e17;
    --bg-secondary: #121a2e;
    --bg-tertiary: #1a2744;
    --accent-primary: #58a6ff;
    --accent-secondary: #79c0ff;
    --accent-glow: rgba(88, 166, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a8b4c9;
    --text-muted: #6b7a94;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.15);
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(26, 39, 68, 0.6);
    --gradient-1: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8ecf1;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.9);
    --success-bg: rgba(16, 185, 129, 0.1);
    --error-bg: rgba(239, 68, 68, 0.1);
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==================== Background Effects ==================== */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(var(--accent-rgb, 88, 166, 255), 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb, 88, 166, 255), 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .background-grid {
    background-image: 
        linear-gradient(rgba(var(--accent-rgb, 88, 166, 255), 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb, 88, 166, 255), 0.05) 1px, transparent 1px);
}

.floating-decorations {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    user-select: none;
}

.decoration {
    position: absolute;
    font-size: 4rem;
    opacity: 0.06;
    animation: float 30s ease-in-out infinite;
    filter: blur(1px);
    cursor: default;
}

.decoration-1 { top: 10%; left: 5%; animation-delay: 0s; }
.decoration-2 { top: 50%; right: 8%; animation-delay: -10s; font-size: 3rem; }
.decoration-3 { bottom: 15%; left: 12%; animation-delay: -20s; font-size: 5rem; }

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-10px); }
    75% { transform: translateY(-25px) translateX(5px); }
}

[data-theme="light"] .decoration {
    opacity: 0.15;
}

/* ==================== Theme Toggle ==================== */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
}

.theme-toggle-icon {
    font-size: 1.1rem;
}

.theme-toggle-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Home Button */
.home-button {
    position: fixed;
    top: 1rem;
    right: 8rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    text-decoration: none;
    color: var(--text-secondary);
}

.home-button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.home-button-icon {
    font-size: 1.1rem;
}

.home-button-text {
    font-size: 0.8rem;
}

/* ==================== Cookie Banner ==================== */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 2rem;
    z-index: 1000;
    animation: slideUpBanner 0.3s ease;
}

.cookie-banner.show {
    display: block;
}

@keyframes slideUpBanner {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 280px;
}

.cookie-text h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cookie-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
}

.cookie-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background: var(--gradient-1);
    border: none;
    color: #fff;
}

.cookie-btn.decline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

/* ==================== Container ==================== */
.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

/* ==================== Screens ==================== */
.screen {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== Landing Screen ==================== */
#landing-screen {
    text-align: center;
    padding-top: 4vh;
}

.logo-container {
    margin-bottom: 1.5rem;
}

.quiz-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--accent-primary));
}

/* Rotating animation for infinity icon (DevOps) */
.logo-icon .rotating,
.quiz-title-icon .rotating {
    display: inline-block;
    animation: spin 8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .main-title {
    background: linear-gradient(135deg, #1a202c 0%, #4a5568 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ==================== Difficulty Selector ==================== */
.difficulty-selector {
    margin-bottom: 2rem;
}

.difficulty-selector h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
}

.difficulty-option {
    cursor: pointer;
}

.difficulty-option input {
    display: none;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb, 88, 166, 255), 0.05);
}

.difficulty-option input:checked + .option-card {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb, 88, 166, 255), 0.1);
    box-shadow: 0 0 20px var(--accent-glow);
}

.option-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.option-title {
    flex: 1;
    font-weight: 500;
    text-align: left;
    font-size: 0.95rem;
}

.option-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ==================== Topics Preview ==================== */
.topics-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.topic-tag {
    padding: 0.4rem 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    transition: all 0.3s ease;
}

.topic-tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* ==================== Stats Preview ==================== */
.stats-preview {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== Buttons ==================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background: var(--error);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    filter: brightness(1.1);
}

.btn-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

.start-btn {
    margin-bottom: 1rem;
}

.hint-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==================== Quiz Header ==================== */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.progress-container {
    flex: 1;
    min-width: 200px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

#score-display {
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

/* ==================== Question Container ==================== */
.question-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.question-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.topic-badge {
    padding: 0.35rem 0.9rem;
    background: rgba(var(--accent-rgb, 88, 166, 255), 0.15);
    border: 1px solid rgba(var(--accent-rgb, 88, 166, 255), 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.difficulty-badge {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.difficulty-badge.beginner {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.difficulty-badge.novice {
    background: rgba(34, 211, 238, 0.15);
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: #22d3ee;
}

.difficulty-badge.medium {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.difficulty-badge.expert {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: #f97316;
}

.difficulty-badge.advanced {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* ==================== Options ==================== */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover:not(.disabled) {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb, 88, 166, 255), 0.05);
}

.option.selected {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb, 88, 166, 255), 0.1);
}

.option.correct {
    border-color: var(--success);
    background: var(--success-bg);
}

.option.incorrect {
    border-color: var(--error);
    background: var(--error-bg);
}

.option.disabled {
    cursor: default;
    opacity: 0.7;
}

.option.disabled:not(.correct):not(.incorrect):not(.selected) {
    opacity: 0.5;
}

.option-marker {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.option.selected .option-marker {
    background: var(--accent-primary);
    color: #fff;
}

.option.correct .option-marker {
    background: var(--success);
    color: #fff;
}

.option.incorrect .option-marker {
    background: var(--error);
    color: #fff;
}

.option-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    padding-top: 3px;
}

/* ==================== Feedback ==================== */
.feedback-container {
    display: none;
    margin-bottom: 1.5rem;
}

.feedback-container.show {
    display: block;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback-content {
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.feedback-content.correct {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.feedback-content.incorrect {
    background: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.feedback-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-content.correct .feedback-title {
    color: var(--success);
}

.feedback-content.incorrect .feedback-title {
    color: var(--error);
}

.feedback-explanation {
    color: var(--text-secondary);
}

/* ==================== Question Actions (Legacy) ==================== */
.question-actions {
    display: flex;
    justify-content: center;
}

.question-actions .btn-primary {
    margin: 0 0.5rem;
}

.hidden {
    display: none !important;
}

/* ==================== Results Screen ==================== */
.results-container {
    text-align: center;
    padding: 2rem 0;
}

.score-circle {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
}

.score-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 8;
}

.score-progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-percentage {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.score-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.results-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.results-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    min-width: 100px;
}

.result-stat .stat-icon {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.result-stat.correct .stat-icon { color: var(--success); }
.result-stat.incorrect .stat-icon { color: var(--error); }
.result-stat.time .stat-icon { color: var(--accent-primary); }

.result-stat .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.result-stat .stat-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== Learning Recommendations ==================== */
.learning-recommendations {
    text-align: left;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.learning-recommendations h3 {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recommendation-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    align-items: flex-start;
}

.recommendation-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.recommendation-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.recommendation-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==================== Topic Breakdown ==================== */
.topic-breakdown {
    text-align: left;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.topic-breakdown h3 {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.breakdown-topic {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breakdown-score {
    font-weight: 600;
    font-family: var(--font-mono);
}

.breakdown-score.good { color: var(--success); }
.breakdown-score.medium { color: #fbbf24; }
.breakdown-score.poor { color: var(--error); }

.results-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ==================== Review Screen ==================== */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.review-header h2 {
    font-size: 1.35rem;
}

.review-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.review-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
}

.review-item.correct {
    border-left: 4px solid var(--success);
}

.review-item.incorrect {
    border-left: 4px solid var(--error);
}

.review-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
    align-items: center;
}

.review-number {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.review-question {
    font-size: 1rem;
    margin-bottom: 0.875rem;
    line-height: 1.6;
}

.review-answers {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.review-answers p {
    margin-bottom: 0.35rem;
}

.review-answers .your-answer {
    color: var(--error);
}

.review-answers .correct-answer {
    color: var(--success);
}

.review-explanation {
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

[data-theme="light"] .modal {
    background: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.75rem;
    max-width: 380px;
    text-align: center;
    width: 100%;
}

.modal-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.resume-info {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: left;
}

.resume-info p {
    margin-bottom: 0.25rem;
}

/* ==================== Footer ==================== */
.quiz-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.quiz-footer p {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-link:hover {
    color: var(--accent-primary);
}

/* ==================== Quiz Title Bar ==================== */
.quiz-title-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.quiz-title-icon {
    font-size: 1.5rem;
}

.quiz-title-text {
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Question Navigation ==================== */
.question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.nav-spacer {
    width: 100px;
}

.btn-nav {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-skip {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-skip:hover {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

/* ==================== Unanswered Indicator ==================== */
.unanswered-indicator {
    font-size: 0.8rem;
    color: #fbbf24;
    font-family: var(--font-mono);
    padding: 0.2rem 0.5rem;
    background: rgba(251, 191, 36, 0.15);
    border-radius: 4px;
}

.unanswered-questions {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    word-wrap: break-word;
}

/* Skipped badge in review */
.skipped-badge {
    padding: 0.35rem 0.9rem;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fbbf24;
}

/* Review item for skipped questions */
.review-item.unanswered {
    border-left: 4px solid #fbbf24;
}

/* Result stat for skipped */
.result-stat.skipped .stat-icon {
    color: #fbbf24;
}

/* ==================== Question Footer ==================== */
.question-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.question-footer p {
    margin-bottom: 0.5rem;
}

.question-footer .footer-link {
    font-size: 0.8rem;
}

/* Hide floating decorations during quiz for cleaner focus */
#quiz-screen.active ~ .floating-decorations,
body:has(#quiz-screen.active) .floating-decorations {
    opacity: 0.03;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    #landing-screen {
        padding-top: 2vh;
    }
    
    .quiz-logo {
        padding: 0.75rem 1.5rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .main-title {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .option-card {
        padding: 0.875rem 1rem;
    }
    
    .option-title {
        font-size: 0.85rem;
    }
    
    .option-desc {
        display: none;
    }
    
    .stats-preview {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .quiz-title-bar {
        padding: 0.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .quiz-title-icon {
        font-size: 1.25rem;
    }
    
    .quiz-title-text {
        font-size: 1rem;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 0.875rem;
    }
    
    .quiz-header .btn-secondary {
        align-self: flex-end;
    }
    
    .question-container {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .question-footer {
        margin-top: 1rem;
        font-size: 0.75rem;
    }
    
    .question-footer .footer-link {
        font-size: 0.75rem;
    }
    
    .question-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .nav-spacer {
        display: none;
    }
    
    .btn-nav {
        width: 100%;
        order: 1;
    }
    
    .nav-center {
        width: 100%;
        order: 0;
    }
    
    .btn-skip {
        width: 100%;
    }
    
    .question-text {
        font-size: 1.05rem;
    }
    
    .option {
        padding: 0.875rem;
    }
    
    .option-marker {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }
    
    .option-text {
        font-size: 0.9rem;
    }
    
    .btn-primary {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    .stats-grid {
        gap: 0.875rem;
    }
    
    .result-stat {
        min-width: 85px;
        padding: 1rem;
    }
    
    .result-stat .stat-value {
        font-size: 1.5rem;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-percentage {
        font-size: 2rem;
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .theme-toggle {
        padding: 0.4rem 0.75rem;
    }
    
    .theme-toggle-text {
        display: none;
    }
    
    .home-button {
        right: 5rem;
        padding: 0.4rem 0.75rem;
    }
    
    .home-button-text {
        display: none;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-text {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    
    .difficulty-options {
        gap: 0.5rem;
    }
    
    .option-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .option-emoji {
        font-size: 1.25rem;
    }
    
    .topics-preview {
        gap: 0.4rem;
    }
    
    .topic-tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .question-container {
        padding: 1rem;
    }
    
    .question-meta {
        gap: 0.5rem;
    }
    
    .question-text {
        font-size: 0.95rem;
    }
    
    .options-container {
        gap: 0.5rem;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions button {
        width: 100%;
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
    
    .score-circle {
        width: 130px;
        height: 130px;
    }
    
    .score-percentage {
        font-size: 1.75rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
}

/* ==================== Touch Device Optimizations ==================== */
@media (hover: none) {
    .option:hover:not(.disabled) {
        border-color: var(--border-color);
        background: var(--bg-secondary);
    }
    
    .option.selected {
        border-color: var(--accent-primary);
        background: rgba(var(--accent-rgb, 88, 166, 255), 0.1);
    }
    
    .topic-tag:hover {
        transform: none;
    }
    
    .btn-primary:hover:not(:disabled) {
        transform: none;
    }
}

