:root {
    --primary-color: #ffb7b2;
    --secondary-color: #b2e2f2;
    --bg-color: #fdfcf0;
    --text-color: #4a4a4a;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

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

@media print {
    body {
        background: white !important;
    }

    header,
    nav,
    footer,
    .pedagogical-info {
        display: none !important;
    }

    #app {
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        background: none !important;
        border: none !important;
    }

    .viewer-container {
        height: 210mm !important;
        width: 420mm !important;
        /* Double width for spread */
        margin: 0 auto !important;
        overflow: visible !important;
    }

    .image-wrapper {
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .text-overlay {
        bottom: 30mm !important;
    }
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    background: linear-gradient(135deg, #fdfcf0 0%, #fff5f5 100%);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    position: relative;
}

header,
footer {
    display: none;
}

.viewer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    min-height: 0;
    /* Flexbox fix for nested overflow */
}

.page-display {
    width: 100%;
    max-width: 1100px;
    aspect-ratio: 2 / 1;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

#spread-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: none;
    /* Only show when needed */
}

.image-wrapper {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
    z-index: 2;
}

/* Book spine effect */
.page-display::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.left-page {
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.text-overlay {
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    text-align: center;
    z-index: 20;
    pointer-events: none;
}

#page-text {
    font-size: 1.8rem;
    line-height: 1.3;
    font-weight: 700;
    color: #4a4a4a;
    text-shadow:
        2px 2px 0px #fff,
        -2px -2px 0px #fff,
        2px -2px 0px #fff,
        -2px 2px 0px #fff,
        0px 0px 10px rgba(255, 255, 255, 0.8);
    /* Yazının her zeminde okunması için beyaz bir 'hale' */
}

.pedagogical-info {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 250px;
    background: #fff;
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    border-left: 5px solid #ffb7b2;
    z-index: 100;
}

.pedagogical-info h4 {
    color: #ff9aa2;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.nav-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    background: #ffb7b2;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 183, 178, 0.3);
}

.nav-btn:hover {
    background: #ff9aa2;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 154, 162, 0.4);
}

.nav-btn:active {
    transform: translateY(0);
}

#page-indicator {
    font-size: 1.2rem;
    font-weight: 600;
    color: #888;
}

.hidden {
    display: none;
}

footer {
    margin-top: 2rem;
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
}