/* DRILIS Official Government Style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8a3 50%, #7fcdcd 100%);
    min-height: 100vh;
    color: #2c3e50;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}


/* Landing Page Styles */
.landing-container {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* Animated Background with Moving Car */
.animated-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    pointer-events: none;
}

.moving-car {
    position: absolute;
    bottom: 30px;
    animation: moveCar 15s linear infinite;
}

.car-image {
    width: 220px;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes moveCar {
    0% {
        left: -100px;
    }

    100% {
        left: calc(100vw + 100px);
    }
}

/* Header Section */
.header-section {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 4rem;
}

.logo-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto 1rem;
    padding: 0 2rem;
    gap: 4rem;
}

.coat-arms {
    height: 120px;
    width: auto;
    margin-right: 2rem;
    position: relative;
    z-index: 2;
    margin-top: -15px;
}

.drilis-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2rem;
    position: relative;
    z-index: 2;
    margin-top: -20px;
}

.logo-image {
    height: 120px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.steering-wheel::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: #333;
    border-radius: 50%;
    border: 3px solid white;
}

.steering-wheel::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 6px;
    background: #333;
    border-radius: 3px;
}

.main-title {
    font-size: 1.5rem;
    font-weight: normal;
    color: #df3f3f;
    text-transform: capitalize;
    font-style: italic;
    letter-spacing: 0.5px;
    margin-bottom: 0.7rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.sub-title {
    font-size: 1.2rem;
    color: #2e7d32;
    font-weight: 600;
    font-style: italic;
    text-transform: capitalize;
    margin-bottom: 1rem;
}

.title-container {
    flex: 1;
    text-align: center;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
    padding: 0.8rem 0;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    margin-top: -10.5px;
}

.brand-title::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -200px;
    right: -200px;
    bottom: -5px;
    background: #81c784;
    z-index: -2;
    border-radius: 8px;
}

/* Main Interface Card */
.main-interface {
    max-width: 600px;
    margin: -5rem auto 0;
    padding: 0 2rem;
}

.interface-card {
    padding: 3rem;
}

/* Input Field */
.access-input-container {
    margin: 2rem 0;
    text-align: center;
}

.access-input {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    font-size: 1.2rem;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    letter-spacing: 2px;
    text-transform: lowercase;
    font-weight: bold;
}

.access-input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* Buttons */
.button-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.drilis-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s ease;
    min-width: 120px;
}

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

.btn-enter {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.btn-icon {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
}

/* Form Styles for Other Pages */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.form-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    width: 100%;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2e7d32;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Test Interface Styles */
.test-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #4caf50;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.test-content {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.question-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #2c3e50;
    font-weight: 500;
}

.question-image {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.answer-option {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.answer-option:hover {
    border-color: #4caf50;
    background: #f1f8e9;
}

.answer-option.selected {
    border-color: #4caf50;
    background: #e8f5e8;
    font-weight: 600;
}

.option-letter {
    background: #4caf50;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Control Panel */
.control-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.status-summary {
    margin-bottom: 1.5rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot.correct {
    background: #4caf50;
}

.status-dot.incorrect {
    background: #f44336;
}

.status-dot.unanswered {
    background: #ffc107;
}

.status-dot.current {
    background: #2196f3;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.nav-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-prev {
    background: #607d8b;
    color: white;
}

.btn-next {
    background: #4caf50;
    color: white;
}

.btn-mark {
    background: #ff9800;
    color: white;
    width: 100%;
    margin-bottom: 1rem;
}

.btn-finish {
    background: #f44336;
    color: white;
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 2px solid #4caf50;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2e7d32;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

/* Question Navigator */
.question-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.question-nav-btn {
    aspect-ratio: 1;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

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

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

.question-nav-btn.current {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

.question-nav-btn.unanswered {
    background: white;
    color: #666;
    border-color: #ddd;
}

/* Results Page */
.results-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.results-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.score-display {
    font-size: 4rem;
    font-weight: bold;
    margin: 2rem 0;
}

.score-display.passed {
    color: #4caf50;
}

.score-display.failed {
    color: #f44336;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Admin Styles */
.admin-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1rem 0;
}

.admin-nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */

/* Loading Animation */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4caf50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.hidden {
    display: none;
}

/* Final Mobile Overrides */
@media (max-width: 768px) {
    .logo-section {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        padding: 0 10px !important;
        margin-bottom: 2rem !important;
        gap: 0 !important;
    }

    .coat-arms {
        order: 1 !important;
        height: 40px !important;
        width: auto !important;
    }

    .title-container {
        order: 2 !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: auto !important;
        margin: 0 5px !important;
        padding: 0 !important;
    }

    .drilis-logo {
        order: 3 !important;
        height: 40px !important;
        width: auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .logo-image {
        height: 60px !important;
        width: auto !important;
    }

    .brand-title {
        font-size: 2rem !important;
        padding: 0.3rem 0 !important;
        margin-bottom: 0.5rem !important;
        width: 100% !important;
        position: relative !important;
    }

    .brand-title::before {
        left: -50vw !important;
        right: -50vw !important;
    }

    .main-title {
        font-size: 0.7rem !important;
        line-height: 1.1 !important;
        margin-bottom: 0.1rem !important;
        white-space: normal !important;
        color: #d32f2f !important;
        font-weight: bold !important;
    }

    .car-image {
        width: 120px !important;
    }

    .moving-car {
        bottom: 150px !important;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .header-section {
        padding: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .main-interface {
        padding: 0 1rem !important;
        width: 100% !important;
    }

    .interface-card,
    .form-card {
        padding: 2rem 1.5rem !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .button-container {
        flex-direction: column;
        gap: 0.8rem !important;
    }
}