/* 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: auto; /* Enable drawing on the canvas */
}

/* 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: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    color: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: Arial, sans-serif;
}

#orientation-warning .icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: rotate-phone 2s infinite ease-in-out;
}

#orientation-warning .message {
    font-size: 18px;
    padding: 0 20px;
}

@keyframes rotate-phone {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}

/* Helper to show warning only on mobile portrait */
@media screen and (orientation: portrait) and (max-width: 768px) {
    body.is-mobile #orientation-warning {
        display: flex;
    }
}

/* 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;
}



