* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image:
        radial-gradient(#ffc078 1.2px, transparent 1.2px),
        radial-gradient(#ffd8a8 1.2px, rgba(255, 243, 222, 0.94) 1.2px);
        background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    background-color: rgba(255, 243, 222, 0.884);
    font-family: 'Roboto', sans-serif;
    padding: 20px 16px;
    color: #4a2c11;
}

.quiz-page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 520px;
    gap: 16px;
}

/* ==========================================
   TEST SEÇİM EKRANI (LİSTE MODU)
   ========================================== */
.test-selection-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.selection-header {
    text-align: center;
    margin-top: 4px;
}

.selection-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #d9480f;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.selection-subtitle {
    font-size: 1rem;
    color: #6c4b2d;
    font-weight: 500;
}

.tests-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Test Kartı Bloğu (Activity / Coloring tarzında) */
.test-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #ffffff;
    border: 3px solid #ff922b;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(255, 146, 43, 0.16);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: inherit;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.test-card:hover {
    transform: translateY(-3px);
    border-color: #ff5500;
    box-shadow: 0 10px 24px rgba(255, 85, 0, 0.25);
    background: #fffdfa;
}

.test-card:active {
    transform: translateY(0);
}

.test-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.test-icon-badge {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #ffd43b, #ffa94d);
    color: #7c2d12;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(255, 169, 77, 0.35);
    flex-shrink: 0;
}

.test-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.test-card-title {
    font-size: 1.40rem;
    font-weight: 800;
    color: #7c2d12;
}

.test-card-meta {
    font-size: 1.15rem;
    color: #8c6239;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.test-badge-tag {
    background-color: #fff4e6;
    color: #d9480f;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #ffd8a8;
}

.test-card-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #ff922b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.test-card:hover .test-card-arrow {
    background-color: #ff5500;
    transform: translateX(4px);
}

/* ==========================================
   AKTİF TEST OYUN EKRANI
   ========================================== */
.quiz-play-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ÜST BAR */
.quiz-top-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

a {
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}

.back-btn {
    background: #ff6600;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.25);
}

.back-btn:hover {
    background: #e65c00;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 102, 0, 0.35);
}

.score-badge {
    background: #ffffff;
    color: #d9480f;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 2px solid #fed7aa;
    box-shadow: 0 4px 12px rgba(230, 100, 0, 0.08);
}

.score-badge i {
    color: #f59f00;
}

/* ANA KART */
.quiz-main-container {
    width: 100%;
}

.quiz-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 32px 24px;
    box-shadow: 0 12px 32px rgba(180, 100, 30, 0.12);
    border: 3px solid rgba(255, 160, 60, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

/* SORU BAŞLIĞI */
.quiz-question-title {
    font-size: 1.65rem;
    font-weight: 900;
    color: #d9480f;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

/* ORTADAKİ SARI DAİRE GÖRSEL ALANI */
.visual-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.visual-circle {
    width: 130px;
    height: 130px;
    background: #ffd43b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.08), 0 8px 20px rgba(255, 212, 59, 0.4);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    padding: 8px;
}

.note-render {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #212529;
    font-size: 3.8rem;
    user-select: none;
}

.note-render img,
.quiz-note-img {
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.note-render svg {
    width: 75px;
    height: 75px;
    fill: #212529;
}

.visual-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #704828;
}

/* 3D ŞIKLAR GRID / SATIR (SAYI VE GÖRSEL ŞIKLARI) */
.options-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 440px;
}

/* GÖRSEL ŞIKLAR GRİDİ (2x2 Izgara) */
.options-grid.image-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    max-width: 480px;
    width: 100%;
}

.image-option-btn {
    position: relative;
    background-color: #fffdfa;
    border: 2px solid #e9cca4;
    border-bottom: 6px solid #c99a6b;
    border-radius: 20px;
    padding: 12px;
    height: 125px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    outline: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.image-option-btn:hover:not(:disabled) {
    background-color: #ffffff;
    border-color: #ff922b;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(255, 146, 43, 0.18);
}

.image-option-btn:active:not(:disabled) {
    transform: translateY(4px);
    border-bottom-width: 2px;
}

.image-option-btn img {
    max-width: 85px;
    max-height: 85px;
    object-fit: contain;
    display: block;
    user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
}

.image-option-btn .option-badge-label {
    position: absolute;
    top: 6px;
    left: 8px;
    background: #fed7aa;
    color: #9a3412;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.image-option-btn.correct {
    background-color: #ebfbee !important;
    border-color: #40c057 !important;
    border-bottom-color: #2f9e44 !important;
    transform: translateY(2px);
    animation: correctPulse 0.4s ease;
}

.image-option-btn.correct .option-badge-label {
    background: #40c057;
    color: #ffffff;
}

.image-option-btn.incorrect {
    background-color: #fff5f5 !important;
    border-color: #ff6b6b !important;
    border-bottom-color: #e03131 !important;
    transform: translateY(2px);
    animation: shakeAnim 0.4s ease;
}

.image-option-btn.incorrect .option-badge-label {
    background: #e03131;
    color: #ffffff;
}

.image-option-btn:disabled {
    cursor: default;
    opacity: 0.92;
}

.option-btn {
    flex: 1;
    min-width: 75px;
    max-width: 95px;
    height: 78px;
    background-color: #fffdfa;
    border: 2px solid #e9cca4;
    border-bottom: 6px solid #c99a6b;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    outline: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.option-btn:hover:not(:disabled) {
    background-color: #ffffff;
    border-color: #ff922b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 146, 43, 0.15);
}

.option-btn:active:not(:disabled) {
    transform: translateY(4px);
    border-bottom-width: 2px;
}

/* Butonun içindeki küçük kare ikon */
.option-box-icon {
    width: 22px;
    height: 22px;
    border: 2.5px solid #a37a53;
    border-radius: 6px;
    display: inline-block;
    background: transparent;
    transition: all 0.2s ease;
}

/* Butonun içindeki büyük sayı */
.option-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: #212529;
    font-family: inherit;
    line-height: 1;
}

/* DOĞRU / YANLIŞ DURUM STİLLERİ */
.option-btn.correct {
    background-color: #ebfbee !important;
    border-color: #40c057 !important;
    border-bottom-color: #2f9e44 !important;
    transform: translateY(2px);
    animation: correctPulse 0.4s ease;
}

.option-btn.correct .option-box-icon {
    background-color: #40c057;
    border-color: #2f9e44;
}

.option-btn.correct .option-number {
    color: #2b8a3e;
}

.option-btn.incorrect {
    background-color: #fff5f5 !important;
    border-color: #ff6b6b !important;
    border-bottom-color: #e03131 !important;
    transform: translateY(2px);
    animation: shakeAnim 0.4s ease;
}

.option-btn.incorrect .option-box-icon {
    border-color: #e03131;
    background-color: #ffc9c9;
}

.option-btn.incorrect .option-number {
    color: #c92a2a;
}

.option-btn:disabled {
    cursor: default;
    opacity: 0.9;
}

/* ALT YÖNERGE METNİ */
.instruction-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: #704828;
    margin-top: 4px;
    min-height: 28px;
    transition: color 0.2s ease;
}

.instruction-text.feedback-correct {
    color: #2b8a3e;
}

.instruction-text.feedback-incorrect {
    color: #c92a2a;
}

/* KART ALTI (PROGRESS BAR & NEXT BUTTON) */
.quiz-card-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.progress-bar-container {
    width: 100%;
    max-width: 320px;
    height: 10px;
    background-color: #f1f3f5;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff922b, #ff6600);
    border-radius: 20px;
    transition: width 0.3s ease;
}

.action-buttons-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.next-question-btn {
    background: linear-gradient(135deg, #ff922b, #ff5500);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(255, 85, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    animation: fadeIn 0.3s ease;
}

.next-question-btn:hover {
    background: linear-gradient(135deg, #ff7a00, #e64500);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 85, 0, 0.4);
}

.retry-question-btn {
    background: #fff4e6;
    color: #d9480f;
    border: 2px solid #ffa94d;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(247, 103, 7, 0.15);
}

.retry-question-btn:hover {
    background: #ffe8cc;
    border-color: #ff922b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(247, 103, 7, 0.25);
}

/* SONUÇ EKRANI */
.quiz-result-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 36px 24px;
    box-shadow: 0 12px 36px rgba(180, 100, 30, 0.15);
    border: 3px solid rgba(255, 160, 60, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    animation: modalSlideUp 0.4s ease;
}

.result-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffd43b, #fcc419);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 8px 20px rgba(252, 196, 25, 0.4);
    animation: bounce 0.6s ease;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #d9480f;
}

.result-subtitle {
    font-size: 1.05rem;
    color: #6c4b2d;
    max-width: 320px;
    line-height: 1.4;
}

.stars-row {
    display: flex;
    gap: 8px;
    font-size: 2rem;
    color: #e9ecef;
}

.stars-row .star.active {
    color: #f59f00;
    animation: starPop 0.4s ease forwards;
}

.result-score-box {
    background-color: #fff9db;
    border: 2px dashed #f59f00;
    padding: 12px 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #704828;
}

.score-val {
    color: #e8590c;
    font-size: 1.35rem;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    margin-top: 8px;
}

.btn-retry {
    background: linear-gradient(135deg, #ff922b, #ff5500);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(255, 85, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 85, 0, 0.4);
}

.btn-home {
    background: #f1f3f5;
    color: #495057;
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-home:hover {
    background: #e9ecef;
}

/* ANİMASYONLAR */
@keyframes correctPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shakeAnim {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes starPop {
    0% {
        transform: scale(0.5);
    }

    70% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .quiz-card {
        padding: 24px 16px;
        border-radius: 24px;
    }

    .quiz-question-title {
        font-size: 1.45rem;
    }

    .visual-circle {
        width: 100px;
        height: 100px;
    }

    .note-render {
        font-size: 3.2rem;
    }

    .options-grid {
        gap: 8px;
    }

    .option-btn {
        min-width: 61px;
        height: 70px;
        border-radius: 16px;
    }

    .option-number {
        font-size: 1.55rem;
    }
}

/* ==========================================
   PATATES KONFETİ CANVAS
   ========================================== */
.potato-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
}