/* IMPROVED: Import all navbar styles from startquiz.css with consistency */

/* Navbar container */
.nav-container {
    margin-top: 20px;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    border-radius: 10px;
    padding: 10px;
}

/* Remove bullets from lists */
.right-side, .left-side {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Inline list items */
.right-side li, .left-side li {
    display: inline-block;
}

.left-side {
    display: flex;
    align-items: center;
}

/* IMPROVED: Theme icon colors for SVG */
.my-light-mode .mode-toggle-button svg {
    color: #ebebeb;
}
.my-dark-mode .mode-toggle-button svg {
    color: #000000;
}

/* IMPROVED: LinkedIn icon colors */
.my-light-mode #Linkedin-icon { 
    filter: brightness(0) invert(1); 
}
.my-dark-mode #Linkedin-icon { 
    filter: brightness(0); 
}

/* IMPROVED: Icon sizing */
.nav-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

/* IMPROVED: Zimbabwe flag with water ripple effect */
#Zimflag {
    width: 30px;
    height: auto;
    max-height: 24px;
    object-fit: contain;
    animation: waterRipple 3s ease-in-out infinite;
    transform-origin: left center;
}

/* Water-like ripple animation */
@keyframes waterRipple {
    0% { transform: scaleX(1) scaleY(1) skewX(0deg); filter: hue-rotate(0deg) brightness(1); }
    16% { transform: scaleX(0.98) scaleY(1.02) skewX(1deg); filter: hue-rotate(2deg) brightness(1.05); }
    33% { transform: scaleX(1.02) scaleY(0.98) skewX(-1deg); filter: hue-rotate(-2deg) brightness(0.95); }
    50% { transform: scaleX(0.99) scaleY(1.01) skewX(2deg); filter: hue-rotate(3deg) brightness(1.1); }
    66% { transform: scaleX(1.01) scaleY(0.99) skewX(-1deg); filter: hue-rotate(-1deg) brightness(0.9); }
    83% { transform: scaleX(0.98) scaleY(1.02) skewX(1deg); filter: hue-rotate(1deg) brightness(1.05); }
    100% { transform: scaleX(1) scaleY(1) skewX(0deg); filter: hue-rotate(0deg) brightness(1); }
}

/* Mode toggle button */
.mode-toggle-button {
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.mode-toggle-button:hover {
    background-color: rgba(56, 161, 105, 0.1);
}

.mode-toggle-button a {
    color: transparent !important;
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Light and Dark mode */
.my-light-mode {
    color: #ebebeb;
    background-color: #292524;
}
.my-dark-mode {
    color: #000000;
    background-color: #e7e5e4;
}

body {
    font-family: 'Noto Serif', serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* IMPROVED: Consistent headings with main styles */
h1 { font-weight: 700 !important; line-height: 42px !important; font-size: 32px !important; }
h2 { font-weight: 700 !important; line-height: 36px !important; font-size: 28px !important; }
h3 { font-weight: 700 !important; line-height: 32px !important; font-size: 24px !important; }
h4 { font-weight: 550 !important; line-height: 28px !important; font-size: 20px !important; }
h5 { font-weight: 400 !important; line-height: 24px !important; font-size: 18px !important; }
h6 { font-weight: 400 !important; line-height: 20px !important; font-size: 16px !important; }

p { 
    font-weight: 400 !important; 
    font-size: 16px !important; 
    line-height: 24px !important; 
}

/* IMPROVED: Quiz game container */
.quiz-game-container {
    margin-top: 40px;
    max-width: 900px;
}

/* IMPROVED: Quiz progress section */
.quiz-progress-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(56, 161, 105, 0.05);
    border: 2px solid rgba(56, 161, 105, 0.2);
    border-radius: 15px;
}

.question-counter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.counter-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #38A169, #2F855A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-icon {
    width: 20px;
    height: 20px;
    color: white;
}

.counter-text {
    font-weight: 600;
    font-size: 18px;
    margin: 0;
    color: #38A169;
}

.timer-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 400px;
    margin-left: 40px;
}

.timer-bar {
    flex: 1;
    height: 12px;
    background-color: rgba(120, 113, 108, 0.2);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.timer-progress {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #38A169, #48BB78);
    border-radius: 6px;
    transition: width 1s linear;
    box-shadow: 0 2px 8px rgba(56, 161, 105, 0.3);
}

.countdown-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 161, 105, 0.1);
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid rgba(56, 161, 105, 0.3);
}

.timer-icon {
    width: 18px;
    height: 18px;
    color: #38A169;
}

.countdown {
    font-weight: 700;
    font-size: 16px;
    color: #38A169;
    min-width: 30px;
}

/* IMPROVED: Question container */
.question-container {
    margin-bottom: 40px;
    text-align: center;
}

.question-badge {
    background: linear-gradient(135deg, #38A169, #2F855A);
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
}

.badge-text {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.question-text {
    background: rgba(56, 161, 105, 0.05);
    border: 2px solid rgba(56, 161, 105, 0.2);
    border-radius: 15px;
    padding: 30px;
    margin: 0;
    line-height: 1.4 !important;
}

/* IMPROVED: Answers grid */
.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.answer-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(192, 86, 33, 0.05);
    border: 2px solid rgba(192, 86, 33, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option:hover {
    background: rgba(192, 86, 33, 0.1);
    border-color: rgba(192, 86, 33, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 86, 33, 0.2);
}

.option.selected {
    background: rgba(56, 161, 105, 0.1);
    border-color: #38A169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2);
}

.option-letter {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #C05621, #9C4221);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

/* IMPROVED: Popup overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #e7e5e4;
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(56, 161, 105, 0.2);
}

.feedback-title {
    margin: 0;
    color: #2D3748;
}

.feedback-result {
    padding: 10px 20px;
    border-radius: 25px;
    background: linear-gradient(135deg, #38A169, #2F855A);
}

.feedback-text {
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.timeout-header {
    text-align: center;
    border-bottom: 2px solid rgba(239, 68, 68, 0.2);
}

.timeout-title {
    margin: 0;
    color: #DC2626;
}

.timeout-content {
    border: 3px solid rgba(239, 68, 68, 0.3);
}

/* IMPROVED: Popup details */
.popup-details {
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(56, 161, 105, 0.1);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    color: #4A5568;
}

.detail-icon {
    width: 20px;
    height: 20px;
    color: #38A169;
}

.detail-value {
    font-weight: 700;
    font-size: 18px;
    color: #38A169;
}

.answer-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.user-answer {
    background-color: #FED7D7;
    color: #C53030;
}

.correct-answer {
    background-color: #C6F6D5;
    color: #2F855A;
}

/* IMPROVED: Popup actions */
.popup-actions {
    text-align: center;
}

.next-btn {
    background: linear-gradient(135deg, #38A169, #2F855A);
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.3);
}

.next-btn:hover {
    background: linear-gradient(135deg, #2F855A, #276749);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.4);
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Footer styles */
.footer { 
    margin-top: 100px; 
    color: #F6AD55; 
}

.footer-top { 
    background-color: #c7c5c5; 
    padding: 1px; 
    margin-bottom: 10px; 
}

.footer-item {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-item a:hover {
    color: #38A169;
}

/* IMPROVED: Dark mode support */
.my-dark-mode .popup-content,
.my-dark-mode .timeout-content {
    background: #292524;
    color: #ebebeb;
}

.my-dark-mode .feedback-title,
.my-dark-mode .detail-label {
    color: #ebebeb;
}

.my-dark-mode .question-text {
    background: rgba(56, 161, 105, 0.1);
    border-color: rgba(56, 161, 105, 0.3);
}

/* IMPROVED: Mobile responsiveness */
@media (max-width: 768px) {
    .nav-icon { width: 20px; height: 20px; }
    #Zimflag { width: 26px; max-height: 20px; }
    .nav-container { padding: 8px; }
    
    .quiz-progress-section {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .timer-section {
        margin-left: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .answers-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .question-text {
        padding: 20px;
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
    
    .option {
        padding: 15px;
    }
    
    .option-letter {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .popup-content {
        padding: 25px;
        width: 95%;
    }
    
    .popup-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-icon { width: 18px; height: 18px; }
    #Zimflag { width: 24px; max-height: 18px; }
    
    .quiz-game-container {
        margin-top: 20px;
    }
    
    .question-text {
        font-size: 20px !important;
        line-height: 1.2 !important;
        padding: 15px;
    }
    
    .option {
        padding: 12px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .counter-text {
        font-size: 16px;
    }
    
    .countdown {
        font-size: 14px;
    }
}

/* Theme transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}