@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&display=swap');

/* Mobile Touch and Interaction Optimization */
.interaction-zone, .interaction-point, [data-type], .option-btn, .popup-option {
    touch-action: manipulation !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: pointer;
}

/* Interaction Overlay Styles */
#page-target-overlay, #drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none; /* Allow clicks to pass through to the book by default */
    z-index: 100;
}

#drawing-canvas {
    pointer-events: none; /* Only enabled dynamically when paint mode is explicitly active */
}

/* Interaction Points */
.interaction-point {
    position: absolute;
    transform: translate(-50%, -50%); /* Center the point on its coordinates */
    cursor: pointer;
    pointer-events: auto;
    z-index: 101;
}

/* Mobile Orientation Warning */
#orientation-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 29, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 2147483647 !important;
    color: #ffffff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 24px;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

.orientation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
}

.phone-anim-box {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.phone-device-frame {
    width: 54px;
    height: 94px;
    border: 3.5px solid #ffffff;
    border-radius: 14px;
    background: #1e293b;
    position: relative;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
    box-sizing: border-box;
    animation: phoneRotateAnim 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transform-origin: center center;
}

.phone-speaker {
    width: 16px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}

.phone-screen-inner {
    width: 100%;
    flex: 1;
    background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
    border-radius: 6px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.phone-book-icon {
    font-size: 20px;
    line-height: 1;
}

.phone-home-bar {
    width: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
}

.phone-arrow-circle {
    position: absolute;
    width: 110px;
    height: 110px;
    top: 10px;
    left: 10px;
    pointer-events: none;
    animation: arrowCircleAnim 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.rotate-svg-arrow {
    width: 100%;
    height: 100%;
}

@keyframes phoneRotateAnim {
    0%, 15% {
        transform: rotate(0deg);
        box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
    }
    40%, 75% {
        transform: rotate(-90deg);
        box-shadow: 0 0 35px rgba(56, 189, 248, 0.65);
    }
    90%, 100% {
        transform: rotate(0deg);
        box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
    }
}

@keyframes arrowCircleAnim {
    0%, 15% {
        opacity: 0.3;
        transform: rotate(0deg) scale(0.95);
    }
    35%, 65% {
        opacity: 1;
        transform: rotate(-35deg) scale(1.05);
    }
    85%, 100% {
        opacity: 0.3;
        transform: rotate(0deg) scale(0.95);
    }
}

.orientation-title {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.orientation-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.orientation-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
}

/* Helper to show warning in portrait on touch / mobile devices */
@media screen and (orientation: portrait) and (max-width: 900px) {
    #orientation-warning {
        display: flex;
    }
}

body.is-mobile-portrait #orientation-warning {
    display: flex !important;
}

/* Sürüklenebilir nesneler için gözü yormayan, yumuşak ve tatlı parıldama (nefes alma) animasyonu */
@keyframes draggable-soft-glow {
    0%, 100% {
        border-color: rgba(255, 193, 7, 0.75);
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 8px 2px rgba(255, 193, 7, 0.4);
        transform: scale(1);
    }
    50% {
        border-color: rgba(255, 152, 0, 0.95);
        box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.95), 0 0 14px 3px rgba(255, 179, 0, 0.65);
        transform: scale(1.04);
    }
}

.interaction-zone[data-type="drag"]:not([data-matched="true"]) {
    border: 2px solid rgba(255, 193, 7, 0.85) !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    animation: draggable-soft-glow 2.4s infinite ease-in-out !important;
    cursor: grab !important;
    overflow: visible !important;
    z-index: 2147483645 !important;
}

.interaction-zone[data-type="drag"][data-matched="true"] {
    animation: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
}

/* Video & Audio Interaction Elements - ALWAYS ON TOP of lines, canvases, and marks */
.interaction-zone[data-type="video"],
.interaction-zone[data-type="audio-modal"] {
    z-index: 2147483660 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
}

#video-modal,
#audio-modal {
    z-index: 2147483670 !important;
}

/* Match Activity (3.jpg Sayfa 4) Hitboxes & Interaction Isolation */
.interaction-zone[data-type="match"],
.interaction-zone[data-type="match_point"],
.interaction-zone[data-id^="p3_match_"] {
    touch-action: none !important;
    z-index: 2147483665 !important;
    pointer-events: auto !important;
}

.interaction-zone[data-type="match"][data-matched="true"],
.interaction-zone[data-type="match_point"][data-matched="true"],
.interaction-zone[data-id^="p3_match_"][data-matched="true"] {
    pointer-events: none !important;
    cursor: default !important;
}

/* Page 42 (41.jpg): Listen and Tick Animations */
@keyframes p42CheckDraw {
    from {
        stroke-dashoffset: 100;
        transform: scale(0.6);
        opacity: 0;
    }
    to {
        stroke-dashoffset: 0;
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes p42PopIn {
    0% {
        transform: scale(0.75);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes p42PulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(236, 72, 153, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
    }
}

/* Page 44 (43.jpg): Look and Match Animations & Styles */
@keyframes p44PulseCard {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7); }
    50% { transform: scale(1.03); box-shadow: 0 0 16px 4px rgba(2, 132, 199, 0.85); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

@keyframes p44Shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-7px) rotate(-1deg); }
    40%, 80% { transform: translateX(7px) rotate(1deg); }
}

@keyframes p44PopIn {
    0% { transform: scale(0.75); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.p44-card-box {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border-radius: 14px;
    box-sizing: border-box;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
}

.p44-card-box:hover {
    transform: scale(1.02);
}

.p44-card-box.selected {
    animation: p44PulseCard 1.2s infinite ease-in-out !important;
    border: 3px dashed #f59e0b !important;
    background: rgba(245, 158, 11, 0.15) !important;
}

.p44-card-box.matched {
    border: 2.5px solid rgba(34, 197, 94, 0.75) !important;
    background: rgba(34, 197, 94, 0.08) !important;
}

.p44-card-box.shaking {
    animation: p44Shake 0.45s ease-in-out !important;
    border: 3px solid #ef4444 !important;
    background: rgba(239, 68, 68, 0.2) !important;
}

.p44-dot-btn {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
    z-index: 2147483652;
    background: transparent;
    transition: transform 0.2s ease;
}

.p44-dot-btn:hover {
    transform: translate(-50%, -50%) scale(1.3);
    background: rgba(239, 68, 68, 0.25);
}

/* Page 45 (44.jpg): Listen and Tick Animations & Styles */
@keyframes p45CheckPop {
    0% { transform: scale(0.2); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes p45PopIn {
    0% { transform: scale(0.75); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.p45-photo-half {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 14px;
    transition: transform 0.15s ease, background-color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.p45-photo-half:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.p45-check-box {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483652;
    transition: transform 0.15s ease;
}

.p45-check-box:hover {
    transform: scale(1.1);
}

/* Page 48 (47.jpg): VALUES Look, Choose and Tick */
@keyframes p48DrawStroke {
    from { stroke-dashoffset: 140; }
    to { stroke-dashoffset: 0; }
}

@keyframes p48Shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px) rotate(-1.5deg); }
    40%, 80% { transform: translateX(6px) rotate(1.5deg); }
}

@keyframes p48PopIn {
    0% { transform: scale(0.75); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.p48-shake {
    animation: p48Shake 0.4s ease !important;
}

.p48-box-tap {
    cursor: pointer;
    border-radius: 18px;
    transition: transform 0.12s ease, box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}

.p48-box-tap:hover {
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.6);
}

.p48-box-tap:active {
    transform: scale(0.95);
}

.p48-panel-tap {
    cursor: pointer;
    border-radius: 24px;
    transition: background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}

.p48-panel-tap:hover {
    background-color: rgba(56, 189, 248, 0.08) !important;
}

/* Page 48 (48.jpg): TRACE & ERASE */
@keyframes p48StarPop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes p48CardPulse {
    0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(2, 132, 199, 0); }
    100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

.p48-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.p48-swatch:hover {
    transform: scale(1.18);
}

.p48-swatch.active {
    transform: scale(1.25);
    box-shadow: 0 0 0 3px #1e293b, 0 3px 8px rgba(0, 0, 0, 0.3);
}

.p48-tool-btn {
    padding: 6px 12px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s, background-color 0.15s;
}

.p48-tool-btn:hover {
    transform: scale(1.06);
}

.p48-tool-btn:active {
    transform: scale(0.95);
}

/* Page 25 (25.jpg) Values Activity Clean Styling - No blue hover borders, halos or outlines */
.p26-box-tap,
.p26-box-tap:hover,
.p26-box-tap:focus,
.p26-box-tap:focus-visible,
.p26-box-tap:active {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

.p26-panel-tap,
.p26-panel-tap:hover,
.p26-keywords-tap,
.p26-keywords-tap:hover {
    box-shadow: none !important;
    outline: none !important;
    background-color: transparent !important;
}

/* Global suppression of completion and informational modal popups (Sadece alkış ve konfeti olsun) */
.celebration-overlay,
.celebration-card,
#celebration-modal,
[id*="-celeb-"],
[id*="-celebration-"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}


