/* ============================================================
   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 { font-family: 'Kanit', 'Noto Sans Thai', system-ui, sans-serif; font-weight: 600; 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);
}

/* ---- เครื่องเล่นวิดีโอ (Custom Player — ธีมเว็บ) ---- */
.sk-player { position: relative; background: #0b0207; user-select: none; -webkit-tap-highlight-color: transparent; }
.sk-player .sk-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; outline: none; object-fit: contain; }
.sk-player.sk-hide { cursor: none; }
.sk-player .sk-off { display: none !important; }

.sk-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 4;
    display: flex; align-items: center; gap: 9px;
    padding: 14px 18px 42px; font-weight: 600; font-size: .95rem;
    background: linear-gradient(to bottom, rgba(11,2,7,.85), transparent);
    transition: opacity .25s, transform .25s;
    pointer-events: none;
}
.sk-top i { color: #FF3D8B; font-size: 1.25rem; flex: none; }
.sk-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-player.sk-hide .sk-top { opacity: 0; transform: translateY(-8px); pointer-events: none; }

.sk-center { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.sk-big-play {
    position: relative;
    pointer-events: auto; width: 96px; height: 96px; border-radius: 999px;
    display: grid; place-items: center; font-size: 2.8rem; color: #fff; line-height: 1;
    background: linear-gradient(135deg, rgba(214,18,60,.94), rgba(255,61,139,.94));
    box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 0 70px rgba(214,18,60,.65);
    transition: transform .2s, box-shadow .2s, opacity .25s;
}
.sk-big-play::after {
    content: ''; position: absolute; inset: -10px; border-radius: 999px;
    border: 2px solid rgba(255,61,139,.5);
    animation: skHalo 2.2s ease-out infinite;
}
@keyframes skHalo {
    0%   { transform: scale(.82); opacity: .9; }
    100% { transform: scale(1.22); opacity: 0; }
}
.sk-big-play i { transform: translateX(3px); }
.sk-player.sk-ended .sk-big-play i { transform: none; }
.sk-big-play:hover { transform: scale(1.07); box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 0 90px rgba(255,61,139,.8); }

.sk-loading {
    position: absolute; display: flex; gap: 7px; padding: 12px 16px; border-radius: 999px;
    background: rgba(26,5,16,.6); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px);
}
.sk-loading span { width: 8px; height: 8px; border-radius: 50%; background: #FF3D8B; animation: skPulse 1s ease-in-out infinite; }
.sk-loading span:nth-child(2) { background: #FF7AA6; animation-delay: .15s; }
.sk-loading span:nth-child(3) { background: #D6123C; animation-delay: .3s; }
@keyframes skPulse { 0%,100% { transform: scale(.55); opacity: .4; } 50% { transform: scale(1); opacity: 1; } }

.sk-error {
    position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px;
    background: rgba(11,2,7,.88); backdrop-filter: blur(4px);
}
.sk-error i { font-size: 2.6rem; color: #FF3D8B; }
.sk-error p { font-weight: 600; }
.sk-retry {
    height: 42px; padding: 0 24px; border-radius: 999px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #D6123C, #FF3D8B);
    box-shadow: 0 10px 26px -10px rgba(255,61,139,.85);
    transition: filter .2s, transform .2s;
}
.sk-retry:hover { filter: brightness(1.12); transform: translateY(-1px); }

.sk-controls {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
    padding: 58px 16px 14px;
    background: linear-gradient(to top, rgba(11,2,7,.96), rgba(11,2,7,.6) 55%, transparent);
    transition: opacity .25s, transform .25s;
}
.sk-player.sk-hide .sk-controls { opacity: 0; transform: translateY(10px); pointer-events: none; }

.sk-progress { position: relative; height: 20px; display: flex; align-items: center; margin-bottom: 6px; }
.sk-progress::before { content: ''; position: absolute; left: 0; right: 0; height: 6px; border-radius: 999px; background: rgba(255,255,255,.16); z-index: 0; }
.sk-buffer { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 6px; width: 0; border-radius: 999px; background: rgba(255,255,255,.3); z-index: 1; }
.sk-fill {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    height: 6px; width: 0; border-radius: 999px; z-index: 2; pointer-events: none;
    background: linear-gradient(90deg, #FF3D8B, #D6123C);
    box-shadow: 0 0 12px rgba(255,61,139,.55);
}
.sk-seek {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 3;
    -webkit-appearance: none; appearance: none; background: transparent;
}
.sk-seek::-webkit-slider-runnable-track {
    height: 6px; margin-top: 7px; border-radius: 999px; background: transparent;
}
.sk-seek::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -5px;
    border-radius: 50%; background: #fff; border: 4px solid #FF3D8B;
    box-shadow: 0 0 14px rgba(255,61,139,.95); transition: transform .15s;
}
.sk-seek:hover::-webkit-slider-thumb { transform: scale(1.25); }
.sk-seek::-moz-range-track { height: 6px; border-radius: 999px; background: transparent; }
.sk-seek::-moz-range-progress { height: 6px; border-radius: 999px; background: transparent; }
.sk-seek::-moz-range-thumb {
    width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid #FF3D8B;
    box-shadow: 0 0 14px rgba(255,61,139,.95);
}

.sk-bar { display: flex; align-items: center; gap: 8px; }
.sk-btn {
    height: 42px; min-width: 42px; padding: 0 10px; border-radius: 14px; color: #fff;
    display: inline-grid; place-items: center; font-size: 1.3rem; line-height: 1;
    transition: background .2s, color .2s, transform .15s;
}
.sk-btn:hover { background: rgba(255,255,255,.14); color: #FF8FBB; }
.sk-btn:active { transform: scale(.94); }
.sk-btn-main { font-size: 1.7rem; }
.sk-time {
    display: flex; align-items: center; gap: 6px;
    font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.9);
    font-variant-numeric: tabular-nums;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08);
    padding: 7px 13px; border-radius: 999px;
}
.sk-time em { font-style: normal; opacity: .4; }
.sk-volume { display: flex; align-items: center; gap: 4px; }
.sk-vol { width: 90px; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,.2); border-radius: 999px; cursor: pointer; accent-color: #FF3D8B; }
.sk-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #FF3D8B; box-shadow: 0 0 10px rgba(255,61,139,.85); }
.sk-vol::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #FF3D8B; }
.sk-right { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.sk-speed {
    font-weight: 700; font-size: .78rem; letter-spacing: .02em;
    min-width: 0; height: 34px; padding: 0 13px; border-radius: 999px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1);
}
.sk-speed:hover { background: rgba(255,61,139,.28); color: #fff; }

.sk-player:fullscreen { border-radius: 0; max-height: none; width: 100%; height: 100%; }
.sk-player:-webkit-full-screen { border-radius: 0; max-height: none; width: 100%; height: 100%; }

@media (max-width: 640px) {
    .sk-big-play { width: 70px; height: 70px; font-size: 2rem; }
    .sk-vol { display: none; }
    .sk-time { font-size: .72rem; padding: 6px 10px; }
    .sk-controls { padding: 42px 10px 10px; }
    .sk-top { padding: 10px 12px 32px; font-size: .82rem; }
    .sk-btn { height: 38px; min-width: 38px; font-size: 1.15rem; }
    .sk-btn-main { font-size: 1.5rem; }
}

/* ---- โฆษณา (แยก 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; }
}
