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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Helvetica, Arial, sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    padding: 40px 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Floating sticky header */
.floating-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(210, 210, 215, 0.6);
    z-index: 100;
    padding: 12px 24px;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.floating-header-content {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.floating-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.floating-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    white-space: nowrap;
}

.floating-exit-btn {
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
}

.floating-exit-btn:hover {
    background: #e8e8ed;
    transform: translateY(-1px);
}

.floating-submit-btn {
    background: #0071e3;
    color: white;
}

.floating-submit-btn:hover {
    background: #0077ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.floating-btn:active {
    transform: scale(0.98);
}

.floating-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.floating-progress-text {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap;
    min-width: 70px;
}

.floating-progress-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(210, 210, 215, 0.6);
    border-radius: 10px;
    overflow: hidden;
    max-width: 300px;
}

.floating-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0071e3, #0077ed);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    padding: 6px 16px;
    background: rgba(245, 245, 247, 0.8);
    border-radius: 20px;
    white-space: nowrap;
}

.floating-timer svg {
    opacity: 0.6;
}

.floating-timer.warning {
    color: #ff3b30;
    animation: pulse 1s infinite;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    background: white;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Landing Page */
.landing-page {
    padding: 80px 40px;
    text-align: center;
}

.landing-header {
    margin-bottom: 64px;
}

.landing-icon {
    margin: 0 auto 24px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0071e3, #0077ed);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.25);
}

.landing-header h1 {
    font-size: 48px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.landing-subtitle {
    font-size: 19px;
    color: #6e6e73;
    font-weight: 400;
}

.exam-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.exam-card {
    background: #fbfbfd;
    border: 1.5px solid #d2d2d7;
    border-radius: 16px;
    padding: 32px;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.exam-card:not(.exam-card-coming-soon):hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 113, 227, 0.12);
    border-color: #0071e3;
}

.exam-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.exam-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.3px;
}

.exam-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    background: #0071e3;
    color: white;
    border-radius: 8px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exam-badge.coming-soon {
    background: #6e6e73;
}

.exam-card-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exam-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6e6e73;
    font-size: 15px;
}

.exam-detail svg {
    opacity: 0.6;
}

.exam-start-btn {
    width: 100%;
    background: #0071e3;
    color: white;
    border: none;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    margin-top: auto;
}

.exam-start-btn:hover {
    background: #0077ed;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
}

.exam-start-btn:active {
    transform: translateY(0);
}

.exam-card-coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.coming-soon-text {
    font-size: 15px;
    color: #6e6e73;
    margin: 0;
}

header {
    background: white;
    color: #1d1d1f;
    padding: 48px 40px 40px;
    text-align: center;
    border-bottom: 1px solid #d2d2d7;
    position: relative;
}

header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.exit-btn-header {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 24px;
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

.exit-btn-header:hover {
    background: #e8e8ed;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.exit-btn-header:active {
    transform: scale(0.98);
}

.progress-indicator {
    margin: 0 auto 24px;
    max-width: 500px;
}

.progress-text {
    font-size: 14px;
    color: #6e6e73;
    margin-bottom: 12px;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #d2d2d7;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0071e3, #0077ed);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(0, 113, 227, 0.4);
}

.timer-container {
    background: #f5f5f7;
    padding: 20px 32px;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid #d2d2d7;
}

.timer {
    font-size: 40px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    color: #1d1d1f;
    letter-spacing: -1px;
}

.timer-label {
    font-size: 13px;
    margin-top: 8px;
    opacity: 0.6;
    font-weight: 400;
    color: #6e6e73;
}

.timer.warning {
    color: #ff3b30;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.exam-section {
    padding: 48px 40px;
}

.question-block {
    margin-bottom: 40px;
    padding: 32px;
    background: #fbfbfd;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    transition: all 0.3s ease;
}

.question-block:hover {
    border-color: #0071e3;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.08);
}

.question-block.answered {
    border-color: #30d158;
    background: #f6fef9;
}

.question-block.answered .question-number::after {
    content: '✓';
    margin-left: 8px;
    color: #30d158;
    font-weight: 600;
}

.question-number {
    color: #0071e3;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
}

.question-text {
    font-size: 17px;
    margin-bottom: 24px;
    line-height: 1.5;
    color: #1d1d1f;
    font-weight: 400;
}

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

.option-label {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: 1.5px solid #d2d2d7;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    color: #1d1d1f;
}

.option-label:hover {
    border-color: #0071e3;
    background: #f5f5f7;
    transform: translateY(-1px);
}

.option-label input[type="radio"] {
    margin-right: 14px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0071e3;
}

.option-label.correct {
    border-color: #30d158;
    background: #f0fdf4;
}

.option-label.incorrect {
    border-color: #ff3b30;
    background: #fef2f2;
}

.option-label.not-selected {
    opacity: 0.5;
}

.navigation-buttons {
    text-align: center;
    margin-top: 48px;
    padding: 32px 0;
    border-top: 1px solid #d2d2d7;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.submit-btn, .restart-btn, .exit-btn {
    background: #0071e3;
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 17px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

.exit-btn {
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1.5px solid #d2d2d7;
}

.exit-btn:hover {
    background: #e8e8ed;
    border-color: #86868b;
    transform: translateY(-1px);
}

.submit-btn:hover, .restart-btn:hover {
    background: #0077ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.submit-btn:active, .restart-btn:active {
    transform: scale(0.98);
}

.exit-btn:active {
    transform: scale(0.98);
}

.results-section {
    padding: 48px 40px;
}

.results-section h2 {
    text-align: center;
    color: #1d1d1f;
    margin-bottom: 40px;
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    margin-bottom: 56px;
    padding: 40px;
    background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.2);
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 600;
    color: #0071e3;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    letter-spacing: -1px;
}

.score-details {
    text-align: left;
}

.score-details p {
    font-size: 19px;
    margin-bottom: 12px;
    font-weight: 400;
}

.score-details strong {
    font-size: 26px;
    font-weight: 600;
}

.detailed-results {
    margin-top: 48px;
}

.detailed-results h3 {
    color: #1d1d1f;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 1px solid #d2d2d7;
    padding-bottom: 12px;
    letter-spacing: -0.3px;
}

.result-item {
    margin-bottom: 20px;
    padding: 24px;
    background: #fbfbfd;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
}

.result-item.correct-answer {
    border-color: #30d158;
    background: #f0fdf4;
}

.result-item.wrong-answer {
    border-color: #ff3b30;
    background: #fef2f2;
}

.result-question {
    font-weight: 500;
    margin-bottom: 12px;
    color: #1d1d1f;
    font-size: 15px;
}

.result-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.result-status.correct {
    background: #30d158;
    color: white;
}

.result-status.incorrect {
    background: #ff3b30;
    color: white;
}

.result-answer {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    color: #6e6e73;
}

.restart-btn {
    display: block;
    margin: 48px auto 0;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #0077ed;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

/* Notification toast */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #1d1d1f;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 20px 16px;
    }
    
    .landing-page {
        padding: 48px 24px;
    }
    
    .landing-header {
        margin-bottom: 48px;
    }
    
    .landing-icon {
        width: 64px;
        height: 64px;
    }
    
    .landing-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .landing-header h1 {
        font-size: 36px;
    }
    
    .landing-subtitle {
        font-size: 17px;
    }
    
    .exam-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .exam-card {
        padding: 24px;
    }
    
    .exam-card h3 {
        font-size: 20px;
    }
    
    .floating-header {
        padding: 10px 16px;
    }
    
    .floating-header-content {
        gap: 12px;
    }
    
    .floating-actions {
        gap: 6px;
    }
    
    .floating-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .floating-progress-text {
        font-size: 12px;
        min-width: 60px;
    }
    
    .floating-progress-bar-container {
        max-width: 150px;
    }
    
    .floating-timer {
        font-size: 14px;
        padding: 5px 12px;
    }
    
    .floating-timer svg {
        width: 14px;
        height: 14px;
    }
    
    .container {
        margin: 0;
        border-radius: 16px;
    }
    
    header {
        padding: 32px 24px 28px;
    }
    
    header h1 {
        font-size: 26px;
    }
    
    .timer {
        font-size: 32px;
    }
    
    .exam-section, .results-section {
        padding: 32px 24px;
    }
    
    .question-block {
        padding: 24px;
    }
    
    .question-text {
        font-size: 16px;
    }
    
    .score-display {
        flex-direction: column;
        gap: 24px;
        padding: 32px 24px;
    }
    
    .score-circle {
        width: 140px;
        height: 140px;
        font-size: 38px;
    }
    
    .results-section h2 {
        font-size: 28px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
    
    .notification {
        top: 16px;
        right: 16px;
        left: 16px;
        font-size: 14px;
        padding: 14px 20px;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .navigation-buttons, .restart-btn, header {
        display: none;
    }
}
