/* Platform korku efektleri — ana sayfa + blog */

/* ——— Gece modu (22:00–06:00) ——— */
body.horror-night-mode {
    --color-bg: #050505;
    --horror-accent: #e63950;
}

body.horror-night-mode.page-home,
body.horror-night-mode.page-blog {
    background: #030303 !important;
}

body.horror-night-mode .horror-vignette,
body.horror-night-mode.horror-night-mode .custom-navbar,
body.horror-night-mode .blog-hero {
    filter: saturate(1.15) contrast(1.05);
}

body.horror-night-mode .horror-scanlines {
    opacity: 0.08;
}

body.horror-night-mode::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(ellipse at 50% 0%, rgba(196, 30, 58, 0.08) 0%, transparent 50%);
}

/* ——— Ses toggle ——— */
.horror-sound-toggle {
    position: fixed;
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    left: max(1rem, env(safe-area-inset-left));
    z-index: 10050;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(196, 30, 58, 0.5);
    background: rgba(10, 10, 10, 0.92);
    color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, background 0.2s ease;
}

.horror-sound-toggle:hover {
    transform: scale(1.06);
    background: rgba(196, 30, 58, 0.25);
}

.horror-sound-toggle.is-muted {
    color: #888;
    border-color: rgba(255, 255, 255, 0.15);
}

.horror-sound-toggle.is-playing {
    animation: horrorSoundPulse 0.6s ease;
}

@keyframes horrorSoundPulse {
    50% { box-shadow: 0 0 24px rgba(196, 30, 58, 0.8); }
}

/* ——— Kontenjan aciliyeti ——— */
.horror-slot-urgency {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border: 1px solid rgba(196, 30, 58, 0.45);
    background: rgba(196, 30, 58, 0.12);
    color: #ffb4c0;
    animation: horrorSlotPulse 2s ease-in-out infinite;
}

.horror-slot-urgency.is-full {
    border-color: rgba(255, 80, 80, 0.6);
    background: rgba(80, 0, 0, 0.35);
    color: #ff8a8a;
    animation: none;
}

.horror-slot-urgency[hidden] {
    display: none !important;
}

.horror-slot-urgency .slot-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c41e3a;
    flex-shrink: 0;
    animation: horrorSlotBlink 1s ease-in-out infinite;
}

@keyframes horrorSlotPulse {
    0%, 100% { box-shadow: 0 0 0 transparent; }
    50% { box-shadow: 0 0 20px rgba(196, 30, 58, 0.35); }
}

@keyframes horrorSlotBlink {
    50% { opacity: 0.3; transform: scale(0.8); }
}

/* ——— Rezervasyon başarı modalı ——— */
#successModal.horror-success-active {
    background: rgba(0, 0, 0, 0.92);
}

#successModal.horror-success-active .success-modal-content {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(196, 30, 58, 0.5);
    box-shadow: 0 0 40px rgba(196, 30, 58, 0.4);
    animation: horrorSuccessPop 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
}

#successModal .horror-success-drip {
    position: absolute;
    top: -8px;
    width: 12px;
    height: 12px;
    background: #8b0000;
    border-radius: 50%;
    animation: horrorSuccessDrip 2.5s linear infinite;
    pointer-events: none;
}

#successModal .horror-success-title {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #f5f5f5;
    animation: horrorSuccessTitleGlow 2s ease-in-out infinite;
}

#successModal .horror-success-sub {
    color: #c41e3a;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

@keyframes horrorSuccessPop {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes horrorSuccessDrip {
    0% { top: -8px; opacity: 0; }
    10% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes horrorSuccessTitleGlow {
    50% { text-shadow: 0 0 20px rgba(196, 30, 58, 0.6); }
}

/* ——— Chat yeni mesaj sarsıntısı ——— */
#team-chat.horror-chat-shake .team-chat-container,
#team-chat.horror-chat-shake .horror-team-chat {
    animation: horrorChatShake 0.5s ease-out;
}

@keyframes horrorChatShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

#team-chat .message.horror-new-message {
    animation: horrorNewMsgFlash 0.8s ease;
}

@keyframes horrorNewMsgFlash {
    0% { background: rgba(196, 30, 58, 0.35); }
    100% { background: transparent; }
}

/* ——— Blog typewriter ——— */
.horror-typewriter-title {
    position: relative;
    min-height: 1.2em;
}

.horror-typewriter-title.is-typing::after {
    content: '|';
    margin-left: 2px;
    color: #c41e3a;
    animation: horrorCursorBlink 0.7s step-end infinite;
}

.horror-typewriter-title.horror-typewriter-glitch {
    animation: horrorTypeGlitch 0.15s steps(2) 2;
}

@keyframes horrorCursorBlink {
    50% { opacity: 0; }
}

@keyframes horrorTypeGlitch {
    0% { transform: translate(0); }
    50% { transform: translate(-3px, 1px); text-shadow: 2px 0 #ff0040; }
    100% { transform: translate(0); }
}

/* ——— Instagram / QR mobil karşılama ——— */
body.horror-mobile-social::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9995;
    pointer-events: none;
    border: 3px solid rgba(196, 30, 58, 0.6);
    animation: horrorSocialBorder 2.5s ease-out forwards;
}

.horror-mobile-welcome {
    position: fixed;
    top: max(5rem, calc(4rem + env(safe-area-inset-top)));
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 10040;
    max-width: 92%;
    padding: 1rem 1.25rem;
    background: rgba(10, 10, 10, 0.96);
    border: 1px solid rgba(196, 30, 58, 0.5);
    border-radius: 12px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    color: #f5f5f5;
    box-shadow: 0 8px 32px rgba(196, 30, 58, 0.35);
    transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
    pointer-events: none;
}

.horror-mobile-welcome.is-visible {
    transform: translateX(-50%) translateY(0);
}

.horror-mobile-welcome.is-instagram {
    border-color: rgba(225, 48, 108, 0.6);
}

@keyframes horrorSocialBorder {
    0% { opacity: 1; inset: 0; }
    100% { opacity: 0; inset: -8px; }
}

body.horror-shake {
    animation: horrorBodyShakeGlobal 0.45s ease-out !important;
}

@keyframes horrorBodyShakeGlobal {
    0%, 100% { transform: translate(0, 0); }
    15% { transform: translate(-3px, 2px); }
    30% { transform: translate(4px, -2px); }
    45% { transform: translate(-2px, -3px); }
    60% { transform: translate(3px, 1px); }
}

@media (prefers-reduced-motion: reduce) {
    .horror-slot-urgency,
    .horror-mobile-welcome,
    .horror-typewriter-title.is-typing::after,
    #successModal.horror-success-active .success-modal-content {
        animation: none !important;
    }

    body.horror-mobile-social::before {
        display: none;
    }
}
