/* ============================================================
   SuccuKiss — Design System
   อ้างอิง Visual Language จาก index1.html / index2.html
   สี: Wine #1A0510 / Crimson #D6123C / Kiss #FF3D8B
   ============================================================ */

:root {
    --wine: #1A0510;
    --wine-900: #260716;
    --wine-800: #3A0A20;
    --wine-700: #5C0A22;
    --crimson: #D6123C;
    --crimson-600: #B50E32;
    --kiss: #FF3D8B;
    --kiss-300: #FF8FBB;
    --coral: #FF7A7A;
    --blush: #FFD9E2;
    --star: #FFC24A;
}

html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }

body {
    font-family: 'Noto Sans Thai', 'Nunito Sans', system-ui, sans-serif;
    background:
        radial-gradient(90% 60% at 80% 0%, #3A0A20 0%, transparent 60%),
        radial-gradient(70% 50% at 0% 100%, #2c0818 0%, transparent 60%),
        var(--wine);
    background-attachment: fixed;
    color: #fff;
}

.font-display { letter-spacing: .01em; }

/* ---- Colored scrollbars ---- */
html, .rail { scrollbar-width: thin; scrollbar-color: #FF3D8B #260716; }
::-webkit-scrollbar { width: 12px; height: 8px; }
::-webkit-scrollbar-track { background: #1A0510; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FF3D8B, #D6123C);
    border-radius: 999px; border: 2px solid #1A0510;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #FF8FBB, #FF3D8B); }
::-webkit-scrollbar-corner { background: #1A0510; }
.rail { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-track { background: #260716; border-radius: 999px; }
.rail::-webkit-scrollbar-thumb { border: 0; background: linear-gradient(90deg, #D6123C, #FF3D8B); }
.rail > * { scroll-snap-align: start; }
#mobileMenu { scrollbar-width: thin; scrollbar-color: #FF3D8B transparent; }

/* ---- Poster Card ---- */
.poster { position: relative; overflow: hidden; isolation: isolate; background: var(--bg, #3A0A20); }
.poster::before { content:''; position:absolute; inset:0; z-index:-1; background: var(--bg); }
.poster::after  { content:''; position:absolute; inset:0; background:
    radial-gradient(120% 80% at 50% 115%, rgba(26,5,16,.85) 15%, transparent 70%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
.poster .glyph { position:absolute; top:50%; left:50%; transform:translate(-50%,-58%); font-size: 4.25rem; opacity:.9; z-index:1; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }

.movie-card .poster { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.movie-card:hover .poster, .movie-card:focus-within .poster { transform: translateY(-6px); box-shadow: 0 0 0 2px var(--kiss), 0 22px 40px -14px rgba(214,18,60,.7); }
.movie-card .overlay { opacity:0; transition: opacity .25s; }
.movie-card:hover .overlay, .movie-card:focus-within .overlay { opacity:1; }

.chip { transition: all .2s; }
.chip[aria-pressed="true"] { background: linear-gradient(135deg, var(--crimson), var(--kiss)); color:#fff; border-color: transparent; box-shadow: 0 8px 22px -8px rgba(255,61,139,.7); }

mark { background: transparent; }

/* ---- หัวใจลอยพื้นหลัง ---- */
#hearts { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.heart-rise {
    position: absolute; top: 100%; left: var(--x);
    animation: heartRise var(--dur) linear var(--delay) infinite;
    will-change: transform, opacity;
}
.heart-sway {
    display: block; width: var(--size); height: var(--size);
    animation: heartSway var(--sway-dur) ease-in-out var(--delay) infinite alternate;
    will-change: transform;
}
.heart-sway svg { width: 100%; height: 100%; display: block; overflow: visible;
    filter: drop-shadow(0 0 10px rgba(255,61,139,.35)); }
@keyframes heartRise {
    0%   { transform: translate3d(0, 0, 0);             opacity: 0; }
    12%  { opacity: var(--alpha); }
    88%  { opacity: var(--alpha); }
    100% { transform: translate3d(0, calc(-100vh - 220px), 0); opacity: 0; }
}
@keyframes heartSway {
    from { transform: translate3d(calc(var(--sway) * -1), 0, 0) rotate(-10deg); }
    to   { transform: translate3d(var(--sway), 0, 0)         rotate(10deg); }
}

header, main, footer { position: relative; z-index: 1; }
header { z-index: 50; }

:focus-visible { outline: 3px solid var(--kiss); outline-offset: 3px; border-radius: 8px; }

.star { color: var(--star); }

/* ---- เมนูมือถือ ---- */
#mobileMenu { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
#mobileMenu[data-open="false"] { transform: translateX(100%); visibility: hidden; transition: transform .3s cubic-bezier(.2,.7,.2,1), visibility 0s .3s; }
#mobileMenu[data-open="true"]  { transform: translateX(0); visibility: visible; }

/* ---- Mega Dropdown ---- */
.dd { opacity:0; visibility:hidden; transform: translateY(8px); transition: all .2s; }
.group:hover .dd, .group:focus-within .dd { opacity:1; visibility:visible; transform: translateY(0); }

/* ---- เครื่องเล่นวิดีโอ (Fallback เมื่อไม่มี Embed URL) ---- */
.player-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 74vh;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(160deg,#3A0A20,#1A0510 70%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
}
.player-shell .player-bg {
    position: absolute; inset: 0; z-index: 0;
    background-image:
        radial-gradient(120% 100% at 50% 0%, rgba(214,18,60,.35), transparent 60%),
        repeating-linear-gradient(120deg, rgba(255,255,255,.05) 0 3px, transparent 3px 18px);
    background-color: var(--player-color, #3A0A20);
}
.player-shell .player-glyph {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-55%);
    font-size: 4.5rem; color: rgba(255,255,255,.9); z-index: 1;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,.4));
}
.player-shell .player-center {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center;
}
.player-shell .player-controls {
    position: relative; z-index: 3;
    padding: .75rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
}

/* ---- โฆษณา (แยก Container — ไม่ทำลาย Layout) ---- */
.promo-slot {
    /* ไร้กรอบ/พื้นหลัง — ไม่มีกล่องเปล่า ๆ รอบโฆษณา */
}
.promo-tag { letter-spacing:.08em; }
.promo-float { animation: promoPulse 3.5s ease-in-out infinite; }
@keyframes promoPulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(255,61,139,.0);} 50%{ box-shadow: 0 0 0 8px rgba(255,61,139,.08);} }

/* ---- ป๊อปอัปยืนยันอายุ ---- */
#ageGate { animation: none; }
#ageGate.show { display: block; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
