/* Complete Styles for Mock Test System - Latest from Monolithic File */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Global Button Styles - Applied to all .btn elements across all pages */
.btn,
button {
    position: relative;
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-block;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.btn::before,
button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.4s ease;
}

.btn:hover,
button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
    background: linear-gradient(135deg, #7c8ff0 0%, #8a5fb6 100%);
}

.btn:hover::before,
button:hover::before {
    width: 100%;
}

.btn:active,
button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
}

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 4px 15px rgba(250, 112, 154, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Button Sizes */
.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 18px;
    border-radius: 14px;
}

/* Disabled State */
.btn:disabled,
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
}

/* Loading State */
.btn.loading,
button.loading {
    color: transparent;
}

.btn.loading::after,
button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

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

/* Navigation Bar - Matching slate.freejobalert.com exactly */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Header with Slate Logo - Matching slate.freejobalert.com */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    border-radius: 0;
    margin: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 80px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header.scrolled {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

/* Navigation Container */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
}

/* Add margin to container to account for fixed header */
.container {
    padding-top: 90px;
}

/* Logo Styling - Matching slate.freejobalert.com */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
}

/* Slate Logo Styling (backward compatibility) */
.slate-logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.slate-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.slate-logo-link:hover {
    transform: scale(1.05);
}

.slate-logo-link:active {
    transform: scale(0.98);
}

.slate-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: #1a202c;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
}

/* PDF Converter Button Style - Matching slate.freejobalert.com */
.nav-link.pdf-converter {
    background: #7c3aed;
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.nav-link.pdf-converter:hover {
    background: #6d28d9 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    color: white !important;
}

.nav-link.pdf-converter::after {
    display: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link.active {
    color: #667eea;
}

.nav-link.active::after {
    width: 100%;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    height: 100%;
}

.nav-dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
    animation: dropdownSlide 0.3s ease;
}

/* Large dropdown for PDF Converter style */
.dropdown-content.large {
    min-width: 650px;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: #1a202c;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background: #f7f8fa;
    color: #667eea;
    padding-left: 24px;
}

.dropdown-content a.active {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    font-weight: 500;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: #333;
    transition: transform 0.3s ease;
}

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Panel */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: white;
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-panel.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.mobile-nav-links {
    padding: 20px;
}

.mobile-nav-links .nav-link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.mobile-nav-dropdown {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-dropdown .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-dropdown .dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    display: none;
    padding: 10px 0 10px 20px;
    background: #f8f9fa;
}

.mobile-dropdown-content.active {
    display: block;
}

.mobile-dropdown-content a {
    display: block;
    padding: 10px 0;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.mobile-dropdown-content a:hover {
    color: #667eea;
}

/* Timer Styles - Mobile Header */
.timer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 20px;
    font-weight: bold;
    font-family: monospace;
    display: none;
}

.timer-icon {
    display: inline;
    margin-right: 5px;
}

.timer.warning {
    background: #ff9800;
    animation: pulse-warning 1s ease-in-out infinite;
}

.timer.danger {
    background: #f44336;
    animation: pulse 0.5s ease-in-out infinite;
}

/* Hide header timer on desktop completely */
@media (min-width: 769px) {
    .header .timer {
        display: none !important;
    }
}

/* Desktop Timer in Horizontal Question Panel */
.desktop-timer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 15px;
    min-width: 100px;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.desktop-timer .timer-icon {
    font-size: 16px;
}

.desktop-timer.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 2px 10px rgba(255, 152, 0, 0.3);
    animation: pulse 1s infinite;
}

.desktop-timer.danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 2px 10px rgba(244, 67, 54, 0.3);
    animation: pulse 0.5s infinite;
}

/* Hide desktop timer on mobile */
@media (max-width: 768px) {
    .desktop-timer {
        display: none !important;
    }
}

/* Screen Management */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Horizontal Question Panel */
.horizontal-question-panel {
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.question-nav-arrow {
    width: 44px;
    height: 44px;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #764ba2) border-box;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 20px;
    color: #667eea;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.question-nav-arrow:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.question-nav-arrow:active:not(:disabled) {
    transform: scale(0.95);
}

.question-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f0f0f0;
    border-color: #e0e0e0;
}

.question-numbers-container {
    display: flex;
    gap: 8px;
    overflow: hidden;
    flex: 1;
    margin: 0 20px;
    justify-content: center;
}

.question-btn-horizontal {
    width: 45px;
    height: 45px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.question-btn-horizontal:hover:not(.current) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-color: #FFD54F;
    background: #FFFDE7;
}

.question-btn-horizontal.answered {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.question-btn-horizontal.marked {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
}

/* Ensure marked takes precedence over visited and answered */
.question-btn-horizontal.visited.marked,
.question-btn-horizontal.answered.marked {
    background: #ff9800 !important;
    color: white !important;
    border-color: #ff9800 !important;
}

.question-btn-horizontal.current {
    border-color: #FFC107;
    background: #FFC107;
    color: #333;
    font-weight: bold;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.3);
    transform: scale(1.15);
    animation: pulse 1.5s ease-in-out infinite;
}

.question-btn-horizontal.visited {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #333;
}

/* Ensure marked takes precedence over visited for horizontal panel */
.question-btn-horizontal.visited.marked {
    background: #ff9800 !important;
    color: white !important;
    border-color: #ff9800 !important;
}

/* Test Container Layout */
.test-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Content wrapper for 70-30 split on desktop */
.test-content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

/* Desktop layout - 70% question area */
@media (min-width: 1024px) {
    .test-content-wrapper {
        display: flex;
        gap: 20px;
    }
    
    .question-area-container {
        flex: 0 0 70%;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        position: relative;
    }
    
    .question-area {
        width: 100%;
        min-height: auto;
        height: auto;
        overflow-y: visible;
        overflow-x: hidden;
        resize: none;
        max-height: none;
        position: relative;
    }
    
    .legend-container {
        flex: 0 0 28%;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        position: sticky;
        top: 80px;
    }
    
    .question-legend {
        width: 100%;
        height: auto;
        min-height: 400px;
        display: flex;
        flex-direction: column;
    }
}

/* Question Area */
.question-area {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    resize: none;
    overflow-y: visible;
    overflow-x: hidden;
    min-height: auto;
    max-height: none;
    height: auto;
}

/* Question area will auto-resize based on content */

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.question-number {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.question-marks {
    font-size: 14px;
    color: #666;
}

.question-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #333;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* Options */
.options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.option {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    background: white;
    min-height: 60px;
}

.option:hover {
    border-color: #667eea;
    background: #f8f6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
}

.option.selected {
    border-color: #667eea;
    background: #f0ebff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.option-label {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
}

/* Universal Button Styles - Apply to all buttons */
button {
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    outline: none;
    border: none;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

button:hover::before {
    width: 100%;
    height: 100%;
}

button:focus {
    outline: 2px solid rgba(102, 126, 234, 0.4);
    outline-offset: 2px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Basic Button Styles */
.btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    text-align: center;
    box-shadow: 
        0 4px 6px -1px rgba(102, 126, 234, 0.2),
        0 2px 4px -1px rgba(102, 126, 234, 0.1);
    letter-spacing: 0.3px;
    text-transform: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 20px -5px rgba(102, 126, 234, 0.35),
        0 4px 8px -2px rgba(102, 126, 234, 0.2);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px -1px rgba(102, 126, 234, 0.2),
        0 1px 2px -1px rgba(102, 126, 234, 0.1);
}

/* Navigation Buttons */
.question-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.nav-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn.prev {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
}

.nav-btn.prev:hover {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.nav-btn.next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-btn.next:hover {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

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

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #94a3b8;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    padding: 12px 24px;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #764ba2) border-box;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #667eea;
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.2);
}

.action-btn.clear {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #f44336, #e91e63) border-box;
    color: #f44336;
}

.action-btn.clear:hover {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    color: white;
    box-shadow: 0 6px 12px rgba(244, 67, 54, 0.3);
}

.action-btn.mark {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #ff9800, #ffc107) border-box;
    color: #ff9800;
}

.action-btn.mark:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
    color: white;
    box-shadow: 0 6px 12px rgba(255, 152, 0, 0.3);
}

.action-btn.mark.marked {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

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

/* Legend Section */
.question-legend {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.legend-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #e0e0e0;
    background: white;
    display: inline-block;
    flex-shrink: 0;
}

.legend-color.not-visited {
    background: white !important;
    border-color: #e0e0e0 !important;
}

.legend-color.visited {
    background: #e3f2fd !important;
    border-color: #2196f3 !important;
}

.legend-color.answered {
    background: #4caf50 !important;
    border-color: #4caf50 !important;
}

.legend-color.marked {
    background: #ff9800 !important;
    border-color: #ff9800 !important;
}

/* Category Navigation */
.category-navigation {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    width: 97%;
    margin: 0 auto 15px auto;
    order: 0;
}

.category-buttons-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    position: relative;
    min-width: 120px;
    text-align: center;
}

.category-btn:hover {
    background: #f8f9ff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.category-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.category-btn-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
}

.category-progress {
    font-size: 11px;
    opacity: 0.8;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    margin-top: 20px;
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 28px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 
        0 4px 6px -1px rgba(244, 67, 54, 0.2),
        0 2px 4px -1px rgba(244, 67, 54, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 10px 20px -5px rgba(244, 67, 54, 0.4),
        0 4px 8px -2px rgba(244, 67, 54, 0.2);
}

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

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f5f7fa 100%);
    border-radius: 28px;
    padding: 40px 35px;
    max-width: 480px;
    width: 90%;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        inset 0 1px 3px rgba(255, 255, 255, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #f5576c 75%,
        #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.modal-content::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

/* Modal Elements */
.modal-icon {
    font-size: 56px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
    animation: iconPulse 2s ease-in-out infinite;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.modal-message {
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 400;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin: 30px 0;
}

.modal-stat {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.modal-stat:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 12px -2px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.modal-stat-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.modal-stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-buttons {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 30px;
}

.modal-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modal-btn:hover::before {
    width: 300px;
    height: 300px;
}

.modal-btn.cancel {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-btn.cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.15);
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 
        0 4px 6px -1px rgba(102, 126, 234, 0.3),
        0 2px 4px -1px rgba(102, 126, 234, 0.2);
}

.modal-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 12px -2px rgba(102, 126, 234, 0.4),
        0 4px 6px -1px rgba(102, 126, 234, 0.3);
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #64748b;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    color: white;
    transform: rotate(90deg);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Navigation Mobile Styles */
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-container {
        gap: 10px;
    }
    
    /* Global Button Styles for Mobile */
    .btn,
    button {
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .btn-sm {
        padding: 8px 16px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .btn-lg {
        padding: 14px 28px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    /* Button width adjustment for mobile */
    .btn:not(.inline),
    button:not(.inline) {
        width: 100%;
        margin: 10px 0;
    }
    
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 10px 12px;
        height: 45px;
        border-radius: 0;
        margin-bottom: 15px;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .header .timer {
        display: flex !important;
        padding: 6px 12px;
        font-size: 14px;
        border-radius: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        align-items: center;
        min-width: 65px;
        justify-content: center;
    }
    
    .timer-icon {
        display: inline;
        font-size: 12px;
    }
    
    .slate-logo-container {
        flex: 1;
        gap: 10px;
    }
    
    .slate-logo-img {
        height: 30px;
    }
    
    /* Question Area Mobile */
    .question-area {
        padding: 15px;
        width: 97%;
        border-radius: 15px;
        margin: 0 auto;
        resize: none;
        overflow-y: visible;
        overflow-x: hidden;
        min-height: auto;
        max-height: none;
        height: auto;
    }
    
    /* Make question area container responsive */
    .question-area-container {
        width: 100%;
        padding: 0 1.5%;
        box-sizing: border-box;
    }
    
    /* Hide desktop legend on mobile */
    .legend-container {
        display: none;
    }
    
    /* Mobile legend inside question area */
    .mobile-legend-inside {
        display: flex;
        justify-content: space-around;
        align-items: center;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        padding: 8px;
        border-radius: 10px;
        margin-top: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        width: 100%;
    }
    
    .mobile-legend-item {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        color: #666;
    }
    
    .mobile-legend-color {
        width: 16px;
        height: 16px;
        border-radius: 3px;
        border: 1px solid #ddd;
        display: inline-block;
        flex-shrink: 0;
    }
    
    .mobile-legend-color.not-visited {
        background: white !important;
        border-color: #e0e0e0 !important;
    }
    
    .mobile-legend-color.visited {
        background: #e3f2fd !important;
        border-color: #2196f3 !important;
    }
    
    .mobile-legend-color.answered {
        background: #4caf50 !important;
        border-color: #4caf50 !important;
    }
    
    .mobile-legend-color.marked {
        background: #ff9800 !important;
        border-color: #ff9800 !important;
    }
    
    /* Keep 2x2 grid for options on mobile */
    .options {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .option {
        padding: 12px 15px;
        min-height: 50px;
    }
    
    /* Reduce spacing in mobile */
    .question-text {
        font-size: 16px;
        margin-bottom: 12px;
        line-height: 1.4;
    }
    
    .question-nav {
        margin-top: 15px;
        gap: 8px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .action-buttons {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Mobile submit button */
    .mobile-submit-btn {
        display: inline-block;
        background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
        color: white;
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    /* Hide desktop submit button on mobile */
    .submit-btn {
        display: none;
    }
    
    /* Category Navigation Mobile - 2 Column Grid */
    .category-navigation {
        order: 3;
        padding: 10px;
        margin-top: 10px;
        margin-bottom: 5px;
    }
    
    .category-buttons-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding-bottom: 10px;
        overflow-x: visible;
    }
    
    .category-btn {
        width: 100%;
        padding: 10px 12px;
        min-width: unset;
        font-size: 13px;
        min-height: 65px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        white-space: normal;
    }
    
    .category-btn-content {
        width: 100%;
        align-items: center;
    }
    
    .category-name {
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    .category-progress {
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }
}

/* Very small mobile screens */
@media (max-width: 480px) {
    .slate-logo-container {
        gap: 8px;
    }
    
    .slate-logo-img {
        height: 28px;
    }
    
    .timer {
        padding: 5px 10px;
        font-size: 13px;
        min-width: 60px;
    }
    
    .question-area {
        padding: 15px;
        font-size: 15px;
    }
}

/* Hide mobile-only elements on desktop */
.mobile-legend {
    display: none;
}

.mobile-legend-inside {
    display: none;
}

.mobile-submit-btn {
    display: none;
}

/* Animation Keyframes */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Ad Container Styles - Matching slate.freejobalert.com */
.ad-container {
    text-align: center;
    margin: 3rem auto;
    padding: 1rem;
    max-width: 1200px;
    width: 100%;
    position: relative;
}

.video-ad-container {
    margin: 2rem auto;
    text-align: center;
    min-height: 280px;
    max-width: 1200px;
    padding: 1rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 10px;
    position: relative;
}

.display-ad-container {
    margin: 2rem auto;
    text-align: center;
    max-width: 1200px;
    padding: 1rem;
    min-height: 90px;
}

.video-ad-container[data-ad-loaded="true"] {
    background: transparent;
    animation: none;
    min-height: auto;
}

/* Mobile Ad Adjustments */
@media (max-width: 768px) {
    .ad-container,
    .video-ad-container,
    .display-ad-container {
        margin: 1.5rem auto;
        padding: 0.75rem;
    }
    
    .video-ad-container {
        min-height: 200px;
    }
    
    /* Modal Stats - 4 items in single column for mobile */
    .modal-stats {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        gap: 8px;
        margin: 15px 0;
        padding: 8px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    }
    
    .modal-stat {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 10px;
        background: white;
        border: 1px solid rgba(102, 126, 234, 0.08);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        border-radius: 6px;
        min-height: 36px;
        box-sizing: border-box;
    }
    
    .modal-stat:nth-child(1) {
        border-left: 3px solid #667eea;
    }
    
    .modal-stat:nth-child(2) {
        border-left: 3px solid #28a745;
    }
    
    .modal-stat:nth-child(3) {
        border-left: 3px solid #ff9800;
    }
    
    .modal-stat:nth-child(4) {
        border-left: 3px solid #f44336;
    }
    
    .modal-stat-label {
        font-size: 9px;
        color: #64748b;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1px;
        order: 1;
        flex: 1;
        text-align: left;
        line-height: 1.1;
    }
    
    .modal-stat-value {
        font-size: 14px;
        font-weight: 700;
        order: 2;
        margin: 0;
        flex: 0 0 auto;
        text-align: right;
        color: #667eea;
        line-height: 1;
    }
    
    /* Modal content adjustments for mobile */
    .modal-content {
        padding: 30px 20px;
        max-width: 95%;
        margin: 20px auto;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-message {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .modal-btn {
        width: 100%;
        padding: 14px 20px;
    }
}