:root {
    --text-color: #2c3e50;
    --accent-color: #00d2d3; 
    --primary-color: #0984e3;
    --title-color: #ff9f43; 
    --book-color: #ff9f43; 
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Nunito', sans-serif;
    height: 100vh;
    color: var(--text-color);
    background: #dfe6e9;
    overflow-x: hidden;
}

/* --- ANA SAYFA --- */
body.landing-page {
    overflow-y: auto;
    background: url('assets/Anasayfa.svg') no-repeat center bottom fixed;
    background-size: cover; 
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center; 
    justify-content: center;
}

.landing-container {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 20px;
}

.content-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end; 
    text-align: right; 
    padding-right: 2%; 
    gap: 20px; 
}

.about-text-floating h1 {
    font-family: 'Titan One', cursive; 
    font-size: 5rem;
    color: white;
    text-shadow: 
        4px 4px 0px #0984e3, 
        -2px -2px 0 #000, 
        2px -2px 0 #000, 
        -2px 2px 0 #000, 
        2px 2px 0 #000;
    margin-bottom: 5px;
    line-height: 1;
    transform: rotate(-2deg);
}

.badge {
    background: var(--title-color);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'Fredoka', sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
    display: inline-block;
    margin-bottom: 25px;
}

.mini-bio {
    max-width: 600px;
    margin-left: auto;
}

.mini-bio p {
    font-family: 'Nunito', sans-serif;
    font-weight: 900; 
    font-size: 1.3rem; 
    color: #ffffff; 
    margin-bottom: 12px;
    text-shadow: 
        2px 2px 0 #000,  
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    line-height: 1.4;
}

.mini-bio strong {
    color: #ffdd59; 
}

.books-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    gap: 0px; 
    margin-top: 10px;
}

.ribbon-title {
    background: var(--accent-color);
    color: white;
    font-family: 'Fredoka', sans-serif; 
    font-weight: 700;
    font-size: 1.8rem;
    padding: 10px 35px;
    border-radius: 50px;
    box-shadow: 0 5px 0 #00b894;
    transform: rotate(2deg);
    margin-right: 20px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
    letter-spacing: 1px;
    margin-bottom: -20px; 
    z-index: 10;
    position: relative;
}

.book-shape-card {
    position: relative;
    width: 300px;
    background: var(--book-color); 
    border-radius: 5px 20px 20px 5px; 
    padding: 40px 25px 25px 25px; 
    text-align: center;
    box-shadow: 15px 15px 30px rgba(0,0,0,0.4), inset -5px 0 10px rgba(0,0,0,0.1);
    border: 3px solid #e67e22;
    transition: transform 0.3s;
    display: flex;
    z-index: 5;
}

.book-spine {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 25px;
    background: #d35400; 
    border-radius: 5px 0 0 5px;
    border-right: 2px solid rgba(0,0,0,0.1);
}

.book-cover-content {
    margin-left: 20px; 
    width: 100%;
}

.book-shape-card:hover {
    transform: scale(1.05) rotate(-2deg);
}

.book-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.2));
}

.book-shape-card h3 {
    font-family: 'Titan One', cursive;
    color: white;
    font-size: 1.4rem;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    margin-bottom: 8px;
}

.book-shape-card p {
    color: #fff3cd;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
}

.read-btn {
    display: block;
    background: white;
    color: var(--book-color);
    text-decoration: none;
    padding: 10px 0;
    border-radius: 25px;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 5px 0 rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.read-btn:active {
    transform: translateY(3px);
    box-shadow: none;
}

@media (max-width: 768px) {
    body.landing-page {
        height: auto;
        min-height: 100vh;
        background-position: center center; 
        background-attachment: scroll; 
        background-size: cover; 
        align-items: flex-start;
        padding-top: 30px;
        padding-bottom: 50px;
    }

    .landing-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 15px;
    }

    .spacer-col { display: none; }

    .content-col {
        align-items: center; 
        text-align: center;
        padding-right: 0;
        width: 100%;
        gap: 15px;
    }

    .about-text-floating h1 {
        font-size: 2.8rem; 
        text-shadow: 2px 2px 0 #0984e3, -1px -1px 0 #000;
        margin-bottom: 5px;
    }

    .badge {
        font-size: 0.9rem;
        margin-bottom: 15px;
        padding: 5px 15px;
    }

    .mini-bio { margin: 0 auto; width: 100%; }
    
    .mini-bio p {
        font-size: 1rem; 
        margin-bottom: 8px;
        text-shadow: 1px 1px 0 #000;
    }

    .books-section {
        align-items: flex-end; 
        width: 100%;
        margin-top: 20px;
        padding-right: 10px; 
    }

    .ribbon-title {
        margin-right: 10px; 
        font-size: 1.1rem; 
        padding: 8px 20px;
        margin-bottom: -15px;
    }

    .book-shape-card {
        width: 100%;
        max-width: 200px; 
        padding: 25px 10px 10px 10px;
    }

    .book-icon {
        font-size: 2rem; 
        margin-bottom: 5px;
    }

    .book-shape-card h3 {
        font-size: 1rem; 
        margin-bottom: 5px;
    }

    .book-shape-card p {
        font-size: 0.8rem; 
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .read-btn {
        padding: 6px 0;
        font-size: 0.8rem;
        border-radius: 15px;
    }
    
    .book-spine { width: 12px; }
    .book-cover-content { margin-left: 8px; }
}

@media (max-width: 400px) {
    .about-text-floating h1 { font-size: 2.2rem; }
    .book-shape-card { max-width: 180px; } 
}

/* --- KİTAP OKUMA SAYFASI --- */
#loader { position: fixed; inset: 0; background: #ff9f43; z-index: 9999; display: flex; justify-content: center; align-items: center; font-family: 'Fredoka', sans-serif; font-size: 2rem; color: white; text-shadow: 2px 2px 0 rgba(0,0,0,0.1); }
.bg-layer { position: absolute; inset: 0; background: linear-gradient(180deg, #dff9fb 0%, #c7ecee 100%); z-index: 0; transition: background 1.5s ease; }
.particles { position: absolute; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.particle { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.4); animation: floatUp 10s infinite linear; }
.p1 { width: 100px; height: 100px; left: 10%; bottom: -100px; animation-duration: 12s; }
.p2 { width: 150px; height: 150px; left: 60%; bottom: -150px; animation-duration: 15s; animation-delay: 2s; }
.p3 { width: 50px; height: 50px; left: 80%; bottom: -50px; animation-duration: 8s; animation-delay: 4s; }
@keyframes floatUp { 0% { transform: translateY(0); } 100% { transform: translateY(-120vh); } }
.story-container { position: relative; width: 100%; height: 100%; z-index: 1; display: flex; justify-content: center; }
.slide { position: absolute; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; opacity: 0; visibility: hidden; padding-bottom: 70px; }
.slide.active { opacity: 1; visibility: visible; }
.cover-layout { height: 100%; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; overflow-y: auto; padding: 20px; }
.main-title { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 5rem; color: var(--title-color); -webkit-text-stroke: 3px white; text-shadow: 4px 4px 0px rgba(0,0,0,0.15); line-height: 1.1; margin-bottom: 10px; animation: bounceIn 1s; letter-spacing: 1px; }
.author { color: #2d3436; font-family: 'Nunito', sans-serif; font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; background: rgba(255,255,255,0.6); padding: 8px 25px; border-radius: 50px; backdrop-filter: blur(5px); }
.hero-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 20px; max-width: 800px; width: 100%; }
.char-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform 0.3s; min-width: 80px; }
.char-item:hover { transform: scale(1.1); }
.char-item img { width: 80px; height: 80px; border-radius: 50%; border: 4px solid white; box-shadow: 0 5px 15px rgba(0,0,0,0.1); background: #fff; object-fit: cover; }
.char-item span { font-weight: 800; margin-top: 5px; color: #2d3436; font-size: 0.9rem; }
.visual-area { flex: 0 0 45%; width: 100%; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 10px; position: relative; }
.story-img { max-height: 95%; max-width: 90%; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2)); transform-origin: bottom center; animation: breathe 4s ease-in-out infinite; }
.text-area { flex: 1; width: 100%; max-width: 700px; padding: 0 20px; text-align: center; overflow-y: auto; background: transparent; border: none; font-size: 1.3rem; line-height: 1.5; font-weight: 800; color: #2d3436; display: flex; flex-direction: column; justify-content: flex-start; mask-image: linear-gradient(to bottom, black 90%, transparent 100%); }
.text-area p { margin-bottom: 20px; }
.end-text { color: var(--accent-color); font-family: 'Fredoka', sans-serif; font-size: 2.5rem; margin-top: 10px; }
.start-btn, .restart-btn { background: var(--accent-color); color: white; border: none; padding: 15px 50px; border-radius: 50px; font-family: 'Fredoka', sans-serif; font-size: 1.5rem; cursor: pointer; box-shadow: 0 5px 0px #00b894; transition: transform 0.1s; margin-top: 10px; }
.start-btn:active, .restart-btn:active { transform: translateY(5px); box-shadow: none; }
#soundToggle { position: absolute; top: 20px; right: 20px; z-index: 100; background: rgba(255,255,255,0.5); width: 45px; height: 45px; border-radius: 50%; border: none; cursor: pointer; font-size: 1.2rem; backdrop-filter: blur(5px); }
.nav-ui { position: absolute; bottom: 10px; left: 0; width: 100%; display: flex; justify-content: center; align-items: center; gap: 20px; z-index: 100; }
.nav-btn { background: white; width: 50px; height: 50px; border-radius: 50%; border: none; font-size: 1.2rem; color: var(--primary-color); box-shadow: 0 5px 15px rgba(0,0,0,0.1); cursor: pointer; font-weight: bold; }
.page-indicator { background: rgba(255,255,255,0.6); padding: 5px 15px; border-radius: 20px; font-weight: 800; color: var(--text-color); backdrop-filter: blur(5px); }
.home-btn { position: absolute; top: 20px; left: 20px; background: white; padding: 10px 20px; border-radius: 30px; text-decoration: none; font-weight: bold; color: var(--text-color); z-index: 200; box-shadow: 0 5px 15px rgba(0,0,0,0.2); font-family: 'Fredoka', sans-serif; }

/* --- YENİ EKLENEN AKTİVİTE VE MODAL STİLLERİ --- */

.activity-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.act-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 15px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}

.act-btn:active { transform: translateY(4px); box-shadow: none; }
.test-btn { background-color: #9b59b6; } /* Mor */
.game-btn { background-color: #e67e22; } /* Turuncu */

/* MODAL YAPISI */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-content {
    background: white;
    width: 90%;
    max-width: 450px;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    border: 5px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 10px; right: 15px;
    background: #ff7675;
    border: none;
    color: white;
    font-weight: bold;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

/* QUIZ STİLLERİ */
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.q-opt {
    background: #74b9ff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
}
.q-opt:hover { background: #0984e3; }
.result-icon { font-size: 4rem; margin-bottom: 10px; }

/* LABİRENT OYUNU STİLLERİ */
#mazeCanvas {
    background: #ecf0f1;
    border-radius: 10px;
    border: 3px solid #2c3e50;
    margin: 0 auto;
    display: block;
    max-width: 100%;
}

.maze-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
    width: 150px;
    margin: 15px auto 0;
}
.maze-controls button {
    background: #fab1a0;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #e17055;
}
.maze-controls button:active { transform: translateY(3px); box-shadow: none; }