/* Common styles shared across all quiz pages */

html, body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 10px;
    box-sizing: border-box; 
}

.container {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 4px 24px 40px;
    box-sizing: border-box;
    background: #f0ede6;
    border-radius: 32px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.1);
}

.quiz-header {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    padding: 4px 2px 0px;
    box-sizing: border-box;
}

.quiz-body {
    width: 100%;
    margin-top: 0px;
    padding-top: 5px;
    border-top: 1px solid #d9dde5;
    box-sizing: border-box;
}

h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1b1d21;
}

.quiz-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1b1d21;
}

.meta-chip .chip-label {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    background-color: #c3242c;
    color: #fff;
    letter-spacing: 0.03em;
}

.score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #1b1d21;
}

.map-container {
    position: relative; 
    z-index: 5;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#turkey-map {
    width: 100%;
    height: 400px;
}

#turkey-map svg {
    height: 100%;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    box-sizing: border-box;
    border-radius: 20px;
    border: 10px solid rgba(255, 255, 255, 0.9);
}

#turkey-map path {
    fill: #6f9c76;
    stroke: #ffffff;
    stroke-width: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

#turkey-map path:hover {
    fill: #5a8063;
}

#turkey-map path.selected {
    fill: #e74c3c !important;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.question {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
    display: none;
}

/* Option buttons styles for multiple choice quizzes */

.options {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-top: 11px;
}

.option {
    display: flex;
    align-items: center;
    width: calc(50% - 6px);
    max-width: none;
    background-color: #ffffff;
    border: 1px solid #eee;
    border-radius: 50px 15px 15px 50px;
    border-bottom: 5px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 6px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}

.option:hover {
    transform: translateY(-2px);
    border-bottom-color: rgba(0, 0, 0, 0.15);
}

.option:active {
    transform: translateY(1px);
    border-bottom-width: 4px;
}

.option-letter {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #E61C40;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 36px;
    flex-shrink: 0;
}

.option.correct .option-letter {
    background-color: #27ae60;
}

.option-text {
    color: #333;
    font-size: 18px;
    font-weight: bold;
    margin-left: 15px;
}

.option.correct .option-text {
    color: #27ae60;
}

.option-check {
    margin-left: auto;
    padding-right: 15px;
    font-size: 20px;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.option-check::before {
    content: "";
}

.option.correct .option-check::before {
    content: "✓";
    color: #27ae60;
}

.option.wrong .option-check::before {
    content: "✕";
    color: #e74c3c;
}

.option.correct .option-check,
.option.wrong .option-check {
    opacity: 1;
    transform: scale(1);
}

@keyframes option-shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
    100% { transform: translateX(0); }
}

.option.wrong {
    animation: option-shake 0.35s ease;
}

.next-row {
    min-height: 52px;
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.next-btn {
    display: none;
    margin: 0;
    padding: 10px 24px;
    border-radius: 999px;
    border: none;
    background-color: #0e3f70;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.next-btn:hover {
    background-color: #0b3156;
}

.result {
    text-align: center;
    font-size: 1.3em;
    margin-top: 15px;
    font-weight: 600;
    display: none;
}

.result.correct {
    color: #28a745;
}

.result.wrong {
    color: #dc3545;
}

.results-layout {
    width: 100%;
    margin-top: 18px;
    display: flex;
}

.results-left,
.results-right {
    flex: 1;
}

.results-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-card {
    text-align: center;
    max-width: 260px;
}

.results-title {
    font-size: 20px;
    font-weight: 700;
    color: #1b1d21;
    margin-bottom: 16px;
}

.results-circle {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 12px solid rgba(14, 63, 112, 0.12);
    background: #f7fbff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.results-badge {
    position: absolute;
    top: 16px;
    padding: 6px 18px;
    border-radius: 999px;
    background-color: #0e3f70;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.results-score-text {
    font-size: 32px;
    font-weight: 700;
    color: #0e3f70;
}

.results-points {
    margin-top: 4px;
    font-size: 14px;
    color: #4d5661;
}

.restart-btn {
    margin-top: 12px;
    padding: 10px 24px;
    border-radius: 999px;
    border: 1px solid #d0e2ff;
    background-color: #ffffff;
    color: #0e3f70;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(15, 76, 129, 0.15);
}

.restart-btn:hover {
    background-color: #f3f7ff;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .container {
        padding: 4px 16px 30px;
        gap: 1px;
        border-radius: 24px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    }

    .quiz-header {
        flex-direction: column;
        gap: 8px;
    }

    .quiz-meta {
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px;
    }

    h1 {
        display: none;
    }

    .quiz-meta .meta-chip {
        justify-self: start;
    }

    .score {
        justify-self: end;
    }

    .meta-chip .chip-label {
        display: none;
    }

    .map-container {
        height: 180px;
    }

    #turkey-map {
        height: 180px;
    }

    #turkey-map svg {
        border-width: 5px; 
        border-radius: 10px; 
    }

    .options {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .option {
        padding: 0;
        margin-bottom: 6px;
        border-bottom-width: 3px;
        width: 100%;
        max-width: 100%;
    }

    .option-letter {
        width: 44px;
        height: 44px;
        font-size: 30px;
    }

    .option-text {
        font-size: 15px;
        margin-left: 12px;
    }

    .option:active {
        transform: translateY(1px);
        border-bottom-width: 2px;
    }

    .results-layout {
        flex-direction: column;
    }

    .results-right {
        display: none;
    }
}
