body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #05050d;
    color: #ffffff;
    overflow-x: hidden;
}

.font-orbitron {
    font-family: 'Orbitron', sans-serif;
}

/* Hatsune Miku Visual Background Layer */
.miku-bg-hero {
    background-image: linear-gradient(to bottom, rgba(5, 5, 13, 0.70), rgba(5, 5, 13, 0.92)), 
                      url('miku-bg.png'); /* 확장자를 .png로 변경 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: saturate(135%) contrast(115%);
}

/* Neon Glow Effects */
.text-glow-cyan {
    text-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff, 0 0 40px #00f0ff;
}
.text-glow-pink {
    text-shadow: 0 0 10px #ff007f, 0 0 20px #ff007f, 0 0 40px #ff007f;
}

.border-glow {
    border: 1px solid rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2), inset 0 0 15px rgba(0, 240, 255, 0.1);
}

.border-glow-pink {
    border: 1px solid rgba(255, 0, 127, 0.5);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.2), inset 0 0 15px rgba(255, 0, 127, 0.1);
}

/* Glitch Animation */
.glitch-text {
    position: relative;
    display: inline-block;
}
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip: rect(0, 0, 0, 0);
}
.glitch-text::before {
    left: -2px;
    text-shadow: 2px 0 #ff007f;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: 2px;
    text-shadow: -2px 0 #00f0ff;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 15px, 0); }
    20% { clip: rect(50px, 9999px, 80px, 0); }
    40% { clip: rect(10px, 9999px, 35px, 0); }
    60% { clip: rect(70px, 9999px, 10px, 0); }
    80% { clip: rect(30px, 9999px, 60px, 0); }
    100% { clip: rect(85px, 9999px, 40px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(15px, 9999px, 65px, 0); }
    25% { clip: rect(75px, 9999px, 10px, 0); }
    50% { clip: rect(35px, 9999px, 90px, 0); }
    75% { clip: rect(90px, 9999px, 30px, 0); }
    100% { clip: rect(5px, 9999px, 50px, 0); }
}

/* Scanlines Effect */
.scanlines {
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.03),
        rgba(0, 255, 0, 0.01),
        rgba(0, 0, 255, 0.03)
    );
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
}

/* Ring Animations */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-slow {
    animation: spin-slow 25s linear infinite;
}
.animate-reverse-spin {
    animation: spin-slow 35s linear infinite reverse;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #05050d;
}
::-webkit-scrollbar-thumb {
    background: #ff007f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00f0ff;
}
/* Floating Contact Button */
.contact-fab {
    box-shadow:
        0 0 15px rgba(255, 0, 127, 0.6),
        0 0 30px rgba(0, 240, 255, 0.3);
    animation: fab-pulse 2.5s ease-in-out infinite;
}
.contact-fab:hover {
    animation-play-state: paused;
}

@keyframes fab-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 0, 127, 0.6), 0 0 30px rgba(0, 240, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 0, 127, 0.9), 0 0 50px rgba(0, 240, 255, 0.5);
    }
}
/* DUE PARTY — Mobile polish layer
   Paste this at the VERY END of style.css. */
:root {
    --mobile-gutter: clamp(16px, 4.5vw, 28px);
    --mobile-header-height: 68px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    overflow-x: clip;
    -webkit-tap-highlight-color: transparent;
}

img, canvas, video, svg {
    max-width: 100%;
}

button, a, input, select {
    touch-action: manipulation;
}

button, input, select {
    font: inherit;
}

#bg-canvas {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.miku-bg-hero {
    /* Keep the background fixed without creating a large mobile repaint area. */
    background-attachment: fixed;
    will-change: auto;
}

.contact-fab {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 32px);
    z-index: 60;
}

#ticket-modal {
    padding:
        max(12px, env(safe-area-inset-top))
        max(12px, env(safe-area-inset-right))
        max(12px, env(safe-area-inset-bottom))
        max(12px, env(safe-area-inset-left));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#modal-container {
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

#ticket-form input,
#ticket-form select,
#ticket-form button {
    min-height: 46px;
    font-size: 16px; /* Prevents iOS Safari from zooming on focus. */
}

#ticket-form input[type="radio"] {
    min-height: 0;
}

#ticket-form label {
    overflow-wrap: anywhere;
}

#toast {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 76px));
    left: max(16px, env(safe-area-inset-left));
    width: auto;
    max-width: 520px;
    margin-left: auto;
}

@media (max-width: 767px) {
    html {
        scroll-padding-top: 74px;
    }

    body {
        font-size: 15px;
    }

    nav {
        padding-top: env(safe-area-inset-top);
        background-color: rgba(5, 5, 13, 0.94) !important;
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    nav > div > .flex {
        height: var(--mobile-header-height) !important;
        gap: 8px;
    }

    nav .w-10.h-10 {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    nav .font-orbitron.font-black.text-xl {
        font-size: clamp(15px, 4.3vw, 19px);
        letter-spacing: 0.04em;
        white-space: nowrap;
    }

    nav button,
    nav a.reserve-lookup {
        padding: 10px 12px !important;
        font-size: 11px !important;
        white-space: nowrap;
        line-height: 1;
        flex-shrink: 0;
    }

    .miku-bg-hero {
        background-attachment: scroll;
        background-position: center top;
        filter: saturate(115%) contrast(108%);
    }

    .scanlines {
        opacity: 0.16 !important;
        background-size: 100% 4px, 8px 100%;
    }

    /* Hero: compact, balanced and centered on phone screens. */
    section.min-h-screen {
        min-height: 100svh;
        min-height: 100dvh;
        padding-top: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 26px) !important;
        padding-bottom: 76px !important;
        justify-content: center;
    }

    section.min-h-screen > .relative.w-72 {
        width: min(78vw, 330px) !important;
        height: min(78vw, 330px) !important;
        margin-bottom: 26px !important;
        flex-shrink: 0;
    }

    section.min-h-screen h1 {
        font-size: clamp(48px, 15vw, 68px) !important;
        line-height: 0.98;
    }

    section.min-h-screen h2 {
        font-size: clamp(31px, 9.4vw, 44px) !important;
        line-height: 1.05;
        letter-spacing: 0.04em !important;
    }

    section.min-h-screen .relative.z-10.flex.flex-col {
        padding: 14px !important;
        max-width: 100%;
    }

    section.min-h-screen .relative.z-10.flex.flex-col > span:first-child {
        font-size: 9px;
        letter-spacing: 0.08em;
    }

    section.min-h-screen .max-w-xs {
        max-width: 260px;
        line-height: 1.7;
    }

    section.min-h-screen > .flex.flex-col {
        width: 100%;
        max-width: 420px;
        padding-left: 0;
        padding-right: 0;
        gap: 10px;
    }

    section.min-h-screen > .flex.flex-col a,
    section.min-h-screen > .flex.flex-col button {
        min-height: 50px;
        padding: 14px 16px !important;
        font-size: 13px !important;
    }

    section.min-h-screen > .absolute.bottom-6 {
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    /* Section spacing and cards. */
    #about, #dj, #faq {
        padding-top: 46px !important;
        padding-bottom: 46px !important;
        padding-left: var(--mobile-gutter) !important;
        padding-right: var(--mobile-gutter) !important;
        scroll-margin-top: 76px;
    }

    #about .rounded-2xl,
    #dj .rounded-2xl,
    #faq .rounded-2xl {
        border-radius: 18px;
    }

    #about .p-6,
    #dj .p-6,
    #faq .p-6 {
        padding: 18px !important;
    }

    #about h3 {
        font-size: clamp(19px, 5.2vw, 25px) !important;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    #about .grid.grid-cols-4 > div {
        min-width: 0;
        padding: 10px 4px !important;
    }

    #about #cd-days,
    #about #cd-hours,
    #about #cd-minutes,
    #about #cd-seconds {
        font-size: clamp(21px, 6.5vw, 30px) !important;
        font-variant-numeric: tabular-nums;
    }

    #about .pt-4.border-t {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        font-size: 12px;
        line-height: 1.6;
    }

    #about .pt-4.border-t > div {
        align-items: flex-start;
    }

    #visualizer-bars {
        height: 64px;
        gap: 3px;
    }

    #visualizer-bars > div {
        min-width: 2px;
        flex: 1 1 0;
    }

    #dj .dj-photo-frame {
        max-height: 420px;
        width: min(100%, 340px);
        margin-inline: auto;
    }

    #dj h3 {
        font-size: clamp(34px, 10vw, 46px) !important;
    }

    #dj p {
        overflow-wrap: anywhere;
    }

    #dj .grid.grid-cols-3 > div {
        padding: 10px 5px;
        min-width: 0;
    }

    #dj .grid.grid-cols-3 span {
        font-size: 9px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    #faq h2 {
        font-size: clamp(25px, 7vw, 34px) !important;
        line-height: 1.25;
    }

    #faq ul {
        padding-left: 0;
        line-height: 1.75;
    }

    #faq li {
        overflow-wrap: anywhere;
    }

    footer p:nth-child(2) {
        line-height: 1.8;
        overflow-wrap: anywhere;
    }

    /* Floating contact button shouldn't dominate the screen. */
    .contact-fab {
        gap: 8px !important;
        padding: 11px 14px !important;
        font-size: 12px !important;
    }

    .contact-fab i {
        font-size: 17px !important;
    }

    /* Full-height, scrollable reservation sheet. */
    #ticket-modal {
        align-items: flex-end;
        padding: 8px 8px max(8px, env(safe-area-inset-bottom));
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    #modal-container {
        width: 100%;
        max-width: 560px;
        max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        margin: 0 auto;
        padding: 22px 16px max(18px, env(safe-area-inset-bottom)) !important;
        border-radius: 20px 20px 14px 14px;
    }

    #modal-container h3 {
        padding-right: 28px;
        font-size: clamp(19px, 5.5vw, 24px);
        line-height: 1.25;
    }

    #modal-container #ticket-form {
        gap: 12px;
    }

    #ticket-form .grid.grid-cols-2 {
        gap: 8px;
    }

    #ticket-form .grid.grid-cols-2 label {
        min-height: 76px;
        padding: 11px !important;
    }

    #ticket-form .grid.grid-cols-2 label span:first-of-type {
        font-size: 12px;
        line-height: 1.4;
    }

    #total-price {
        font-size: 22px !important;
    }
}

@media (max-width: 380px) {
    nav .font-orbitron.font-black.text-xl {
        font-size: 14px;
    }

    nav button,
    nav a.reserve-lookup {
        padding: 9px 9px !important;
        font-size: 10px !important;
    }

    nav .w-10.h-10 {
        display: none;
    }

    section.min-h-screen > .relative.w-72 {
        width: min(76vw, 290px) !important;
        height: min(76vw, 290px) !important;
    }

    #ticket-form .grid.grid-cols-2 label {
        padding: 9px !important;
    }
}

/* Touch devices have no reliable hover; avoid jumpy hover transforms. */
@media (hover: none) and (pointer: coarse) {
    .contact-fab:hover,
    nav button:hover,
    section.min-h-screen a:hover,
    section.min-h-screen button:hover {
        transform: none;
        filter: none;
    }

    .contact-fab {
        animation-duration: 3.5s;
    }
}

/* Respect accessibility settings and reduce animation load when requested. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
@media (max-width: 480px) {
    nav .w-10.h-10 {
        display: none;
    }

    nav .font-orbitron.font-black.text-xl {
        font-size: 14px;
    }

    nav a.reserve-lookup,
    nav a.reserve-lookup span {
        white-space: nowrap !important;
        word-break: keep-all !important;
        writing-mode: horizontal-tb !important;
    }

    nav a.reserve-lookup i {
        display: none;
    }
}
/* 좁은 폰: 상단바 정리 */
@media (max-width: 480px) {
    nav .w-10.h-10 {
        display: none;
    }

    nav .font-orbitron.font-black.text-xl {
        font-size: 14px;
    }

    nav a.reserve-lookup {
        min-width: 84px;
        padding: 10px 14px !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        writing-mode: horizontal-tb !important;
    }

    nav a.reserve-lookup span {
        white-space: nowrap !important;
        word-break: keep-all !important;
    }
}
