/* ============================================
   WordPress Fundamentals Quiz - CSS
   Professional University Exam Style
   ============================================ */

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    line-height: 1.6;
}

body {
    padding: 20px;
    min-height: 100vh;
}

/* Timer */
.timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 150px;
    z-index: 1000;
}

.timer-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #7f8c8d;
    font-weight: 600;
}

.timer-value {
    font-size: 28px;
    font-weight: bold;
    color: #2980b9;
    font-family: 'Courier New', monospace;
}

.timer.warning .timer-value {
    color: #f39c12;
}

.timer.danger .timer-value {
    color: #e74c3c;
}

/* Quiz Container */
.quiz-container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Quiz Wrapper */
.quiz-wrapper {
    padding: 60px 50px;
}

/* Header */
.quiz-header {
    text-align: center;
    margin-bottom: 40px;
}

.quiz-header h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.quiz-header p {
    font-size: 16px;
    color: #7f8c8d;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 40px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2980b9 0%, #3498db 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: right;
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 600;
}

/* Quiz Form */
.quiz-form {
    animation: fadeIn 0.5s ease-in;
}

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

/* Step Container */
.step-container {
    display: none;
}

.step-container.active {
    display: block;
    animation: slideIn 0.4s ease-in-out;
}

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

.step-container h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 30px;
    border-bottom: 3px solid #2980b9;
    padding-bottom: 15px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2980b9;
    background: white;
    box-shadow: 0 0 0 4px rgba(41, 128, 185, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Questions */
.question-group {
    background: #f9fafb;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    border-left: 4px solid #2980b9;
}

.question-number {
    font-size: 12px;
    text-transform: uppercase;
    color: #2980b9;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.question-text {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: #2980b9;
    background: #f0f6ff;
}

.option input[type="radio"] {
    margin-top: 3px;
    cursor: pointer;
    accent-color: #2980b9;
}

.option span {
    font-size: 14px;
    color: #2c3e50;
    flex: 1;
}

.option input[type="radio"]:checked + span {
    color: #2980b9;
    font-weight: 600;
}

.option input[type="radio"]:checked {
    accent-color: #2980b9;
}

/* Review Box */
.review-container {
    background: #f9fafb;
    padding: 30px;
    border-radius: 8px;
}

.review-message {
    background: #e8f4f8;
    padding: 15px;
    border-left: 4px solid #2980b9;
    border-radius: 4px;
    margin-bottom: 25px;
    color: #2c3e50;
}

.review-box {
    max-height: 600px;
    overflow-y: auto;
}

.review-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    border-left: 3px solid #2980b9;
}

.review-item-q {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.review-item-a {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 40px;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #2980b9;
    color: white;
}

.btn-primary:hover {
    background: #2471a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.3);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.3);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.btn-success:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
}

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

.modal-content h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.modal-content p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.6;
}

.success-content h2 {
    color: #27ae60;
}

.error-content h2 {
    color: #e74c3c;
}

/* Disabled State */
.disabled {
    opacity: 0.6;
    pointer-events: none;
}

input:disabled,
textarea:disabled,
input:disabled + span {
    background: #ecf0f1;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-wrapper {
        padding: 40px 30px;
    }

    .quiz-header h1 {
        font-size: 24px;
    }

    .quiz-header p {
        font-size: 14px;
    }

    .step-container h2 {
        font-size: 20px;
    }

    .timer {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 30px;
        width: 100%;
        min-width: auto;
    }

    .quiz-container {
        margin: 20px auto;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

    .question-group {
        padding: 18px;
    }

    .option {
        padding: 10px 12px;
    }

    .option span {
        font-size: 13px;
    }

    .modal-content {
        margin: 20px;
        padding: 30px 20px;
    }

    .review-box {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .quiz-wrapper {
        padding: 25px 15px;
    }

    .quiz-header h1 {
        font-size: 20px;
    }

    .quiz-header p {
        font-size: 12px;
    }

    .step-container h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .progress-container {
        margin-bottom: 25px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea {
        padding: 10px 12px;
        font-size: 13px;
    }

    .question-group {
        padding: 15px;
        margin-bottom: 15px;
    }

    .question-number {
        font-size: 11px;
    }

    .question-text {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .option {
        padding: 8px 10px;
    }

    .option span {
        font-size: 12px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 13px;
    }

    .timer {
        padding: 12px 15px;
        min-width: auto;
    }

    .timer-value {
        font-size: 22px;
    }

    .timer-label {
        font-size: 10px;
    }

    .modal-content {
        padding: 25px 15px;
    }

    .modal-content h2 {
        font-size: 22px;
    }

    .modal-content p {
        font-size: 14px;
    }

    .review-box {
        max-height: 300px;
    }

    .review-item {
        padding: 12px;
        margin-bottom: 10px;
    }

    .review-item-q {
        font-size: 13px;
    }

    .review-item-a {
        font-size: 12px;
    }
}

/* Scrollbar Styling */
.review-box::-webkit-scrollbar {
    width: 6px;
}

.review-box::-webkit-scrollbar-track {
    background: #ecf0f1;
    border-radius: 10px;
}

.review-box::-webkit-scrollbar-thumb {
    background: #2980b9;
    border-radius: 10px;
}

.review-box::-webkit-scrollbar-thumb:hover {
    background: #2471a3;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .timer,
    .button-group,
    .modal {
        display: none !important;
    }

    .quiz-container {
        box-shadow: none;
        margin: 0;
    }

    .quiz-wrapper {
        padding: 0;
    }
}
