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

body {
    font-family: 'Patrick Hand', 'Caveat', cursive;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ffeaa7 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Dekoratif Elementler */
.floating-fish {
    position: fixed;
    font-size: 40px;
    animation: swim 20s infinite ease-in-out;
    z-index: 1;
    opacity: 0.6;
}

@keyframes swim {
    0%, 100% { 
        left: -50px; 
        top: 20%; 
    }
    50% { 
        left: calc(100% + 50px); 
        top: 70%; 
    }
}

.floating-heart {
    position: fixed;
    font-size: 30px;
    animation: float 6s infinite ease-in-out;
    right: 5%;
    top: 10%;
    z-index: 1;
    opacity: 0.7;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    50% { 
        transform: translateY(-30px) rotate(10deg); 
    }
}

/* Kitap Container */
.book-container {
    max-width: 900px;
    width: 100%;
    min-height: 600px;
    position: relative;
    perspective: 1500px;
    z-index: 10;
}

/* Sayfa Tasarımı */
.page {
    position: absolute;
    width: 100%;
    min-height: 600px;
    background: #fffef9;
    border-radius: 15px;
    box-shadow: 
        0 10px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(252, 228, 194, 0.3);
    padding: 50px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.6s ease;
    pointer-events: none;
    border: 3px solid #ffd89b;
    background-image: 
        linear-gradient(90deg, rgba(255, 216, 155, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(255, 216, 155, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.page.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    z-index: 100;
}

.page.prev {
    transform: translateX(-100px);
}

/* Kapak Sayfası */
.cover-page {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 50%, #fd79a8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 5px solid #fff;
    box-shadow: 
        0 15px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
}

.cover-content {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.title {
    font-family: 'Caveat', cursive;
    font-size: 4rem;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    font-weight: 700;
}

.subtitle {
    font-family: 'Indie Flower', cursive;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.cover-illustration {
    font-size: 5rem;
    margin: 30px 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-20px); 
    }
}

.author {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.3rem;
    color: #fff;
    margin-top: 30px;
    font-style: italic;
}

.start-btn {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    padding: 15px 40px;
    margin-top: 40px;
    background: #fff;
    color: #fd79a8;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-weight: 700;
}

.start-btn:hover {
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background: #ffeaa7;
}

/* Hikaye Sayfası */
.story-page {
    background: #fffef9;
}

.page-number {
    position: absolute;
    top: 20px;
    right: 30px;
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: #fab1a0;
    font-weight: 700;
}

.story-content {
    max-width: 100%;
}

.chapter-title {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    color: #fd79a8;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

.story-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 15px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 4px solid #ffeaa7;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.story-image:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.story-image.highlight {
    border-color: #fd79a8;
    border-width: 6px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 5px 20px rgba(253, 121, 168, 0.5); 
    }
    50% { 
        box-shadow: 0 5px 40px rgba(253, 121, 168, 0.8); 
    }
}

.story-text {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.3rem;
    line-height: 1.8;
    color: #2d3436;
    margin: 15px 0;
    text-align: justify;
    padding: 0 10px;
}

.victory-text {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: #fd79a8;
    text-align: center;
    font-weight: 700;
    margin: 20px 0;
    animation: rainbow 3s infinite;
}

@keyframes rainbow {
    0%, 100% { color: #fd79a8; }
    33% { color: #ffeaa7; }
    66% { color: #fab1a0; }
}

.fun-fact {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
    font-family: 'Indie Flower', cursive;
    font-size: 1.2rem;
    color: #fff;
    border-left: 5px solid #fd79a8;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.fun-fact.special {
    background: linear-gradient(135deg, #fd79a8, #fab1a0);
    border-left: 5px solid #ffeaa7;
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 3px 15px rgba(253, 121, 168, 0.3); 
    }
    50% { 
        box-shadow: 0 3px 30px rgba(253, 121, 168, 0.6); 
    }
}

/* Sayfa Navigasyonu */
.page-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.nav-btn {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    padding: 12px 25px;
    background: #ffeaa7;
    color: #2d3436;
    border: 2px solid #fab1a0;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background: #fab1a0;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.nav-btn.prev {
    background: #e8f0f7;
}

.nav-btn.next {
    background: #fd79a8;
    color: #fff;
}

/* Son Sayfa */
.ending-page {
    background: linear-gradient(135deg, #fab1a0 0%, #fd79a8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 5px solid #fff;
}

.ending-content {
    color: #fff;
    animation: fadeIn 1s ease;
}

.ending-title {
    font-family: 'Caveat', cursive;
    font-size: 3rem;
    margin-bottom: 30px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.ending-text {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.4rem;
    line-height: 1.8;
}

.ending-text p {
    margin: 20px 0;
}

.big-text {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 30px 0 !important;
}

.hearts {
    font-size: 3rem;
    margin: 30px 0;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { 
        transform: scale(1); 
    }
    25% { 
        transform: scale(1.2); 
    }
    50% { 
        transform: scale(1); 
    }
}

.dedication {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    font-size: 1.3rem;
    line-height: 2;
    backdrop-filter: blur(10px);
}

.restart-btn {
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    padding: 15px 40px;
    margin-top: 30px;
    background: #fff;
    color: #fd79a8;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-weight: 700;
}

.restart-btn:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .page {
        padding: 30px 20px 100px;
        min-height: 500px;
    }

    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .chapter-title {
        font-size: 2rem;
    }

    .story-text {
        font-size: 1.1rem;
    }

    .cover-illustration {
        font-size: 3rem;
    }

    .page-nav {
        flex-direction: row;
        bottom: 15px;
        width: 90%;
        justify-content: space-between;
        gap: 10px;
    }

    .nav-btn {
        flex: 1;
        padding: 10px 15px;
        font-size: 1.2rem;
        min-width: 0;
    }

    .fun-fact {
        font-size: 1.1rem;
        padding: 15px;
    }

    .ending-content {
        padding: 20px 10px;
    }

    .dedication {
        padding: 20px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .page {
        padding: 20px 15px 90px;
    }

    .story-text {
        font-size: 1rem;
    }

    .page-nav {
        width: 95%;
        gap: 8px;
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 1.1rem;
    }

    .chapter-title {
        font-size: 1.8rem;
    }

    .story-image {
        margin: 15px auto;
    }
}

/* Yükleme Animasyonu */
@keyframes pageFlip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(-180deg);
    }
}

/* Ek Dekoratif Efektler */
.page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.5) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
    pointer-events: none;
    border-radius: 15px;
}

/* Image Modal / Lightbox */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border: 5px solid #ffeaa7;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 234, 167, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid #ffeaa7;
}

.modal-close:hover {
    background: #ffeaa7;
    color: #2d3436;
    transform: rotate(90deg);
}

.modal-caption {
    text-align: center;
    color: #fff;
    font-family: 'Patrick Hand', cursive;
    font-size: 1.5rem;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.modal-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Indie Flower', cursive;
    font-size: 1.1rem;
    text-align: center;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.3; }
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .modal-caption {
        font-size: 1.2rem;
    }
    
    .modal-hint {
        font-size: 0.9rem;
        bottom: 20px;
    }
    
    .modal-image {
        border-width: 3px;
    }
}

