/* =========================================================
   SEARCH INPUT
========================================================= */

.search {
    width: 320px;
    background: #1a2a4a;
    backdrop-filter: blur(8px);
    padding: 7px 11px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    outline: none;
    color: #7aa7d8;
    border: 1px solid rgba(163,247,255,0.12);
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 18px;
    transition:
        background    0.4s cubic-bezier(0.4,0.2,0.2,1),
        box-shadow    0.4s cubic-bezier(0.4,0.2,0.2,1),
        border-color  0.4s cubic-bezier(0.4,0.2,0.2,1),
        transform     0.3s cubic-bezier(0.4,0.2,0.2,1);
}

.search::placeholder {
    color: #7aa7d8;
    opacity: 0.7;
    transition: color 0.4s;
}

.search:hover,
.search:focus {
    background: #244466;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border-color: rgba(163,247,255,0.16);
    transform: scale(1.06);
}

/* =========================================================
   SORT DROPDOWN
========================================================= */

#sortOptions {
    padding: 7px 11px;
    font-size: 1.5rem;
    background: #1a2a4a;
    color: #7aa7d8;
    border: 1px solid rgba(163,247,255,0.12);
    border-radius: 50px;
    outline: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
    transform: scale(1);
    margin-left: 12px;
    margin-bottom: 18px;
}

#sortOptions:hover,
#sortOptions:focus {
    background: #244466;
    color: #d9e8f7;
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    border-color: rgba(163,247,255,0.16);
}

#sortOptions option {
    padding: 7px 11px;
    font-size: 1.2rem;
    background: #0a0e1a;
    color: #7aa7d8;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    outline: none;
}

/* =========================================================
   BUTTON CONTAINER
========================================================= */

.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-left: 50px;
    margin-right: 60px;
}

/* =========================================================
   GAME CARD
========================================================= */

.menu-button {
    position: relative;
    width: 240px;
    height: 150px;
    border-radius: 22px;
    overflow: hidden;
    margin: 14px;
    border: 1px solid rgba(163,247,255,0.08);
    cursor: pointer;
    text-decoration: none;
    background: #1a2a4a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.menu-button:hover {
    border: 1px solid rgba(163,247,255,0.16);
    transform: scale(1.04);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Auto image quality enhancement */
.menu-button img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    transition: transform 0.35s ease, filter 0.35s ease;
    filter: contrast(1.07) saturate(1.15) brightness(1.03);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.menu-button:hover img {
    transform: scale(1.06);
    filter: contrast(1.12) saturate(1.22) brightness(1.06);
}

.overlay {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 6px black;
    z-index: 3;
    opacity: 0;
    transform: translate(-50%, 15px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.menu-button:hover .overlay {
    opacity: 1;
    transform: translate(-50%, 0);
}

.favorite-icon {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 5;
    font-size: 1.5rem;
    color: #a3f7ff;
    transition: transform 0.25s, opacity 0.25s;
}

.favorite-icon:hover {
    transform: scale(1.2);
    opacity: 1;
}

.popup {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: rgba(0,0,0,0.55);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #a3f7ff;
    z-index: 4;
    pointer-events: none;
}

/* =========================================================
   FOOTER
========================================================= */

.footer-inner {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 8px;
}
.footer-col { flex: 1; min-width: 140px; }
.footer-col h4 { color: var(--nebula-300); margin-bottom: 8px; }
.footer-col a { display: block; color: var(--text-100); margin: 6px 0; text-decoration: none; }
.footer-about p { max-width: 28ch; color: var(--text-100); font-size: 0.95rem; }

/* =========================================================
   HERO SLIDER
   Blue theme — accent: #3a8fd4 / glow: #a3f7ff
========================================================= */

#hs {
    position: relative;
    width: 100%;
    min-height: 460px;
    overflow: hidden;
    background: #080c18;
    margin-top: 0;
    padding-top: 0;
    border-bottom: 1px solid rgba(163,247,255,0.06);
}

/* ── Ambient blur bg (two divs A/B cross-fade) ── */
.hs-ambient {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    filter: blur(60px) saturate(1.4) brightness(0.28);
    z-index: 0;
    transform: scale(1.1);
    opacity: 0;
    transition: opacity 700ms ease;
}
.hs-ambient.hs-ambient-b {
    z-index: 0;
}

.hs-ambient-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 50%, rgba(8,12,24,0.25) 0%, rgba(8,12,24,0.92) 100%),
        linear-gradient(180deg, rgba(8,12,24,0.0) 0%, rgba(8,12,24,0.7) 85%, #080c18 100%);
    z-index: 1;
}

/* ── Scanlines ── */
.hs-scanlines {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.06) 3px,
        rgba(0,0,0,0.06) 4px
    );
    pointer-events: none;
}

/* ── Body layout ── */
.hs-body {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px clamp(24px, 5vw, 72px) 24px;
    gap: 40px;
    min-height: 400px;
}

/* ── LEFT panel ── */
.hs-left {
    flex: 1;
    min-width: 0;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Eyebrow / tag row */
.hs-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #a3f7ff;
    text-transform: uppercase;
}

/* Pulsing live dot — blue glow */
.hs-dot-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3a8fd4;
    box-shadow: 0 0 8px #3a8fd4, 0 0 16px rgba(58,143,212,0.5);
    animation: hs-pulse 1.8s ease-in-out infinite;
}

@keyframes hs-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.45; transform: scale(0.72); }
}

/* Title */
.hs-title {
    margin: 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 0.95;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    text-shadow:
        0 0 40px rgba(58,143,212,0.3),
        0 4px 20px rgba(0,0,0,0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}
.hs-title.hs-text-in  { opacity: 1; transform: translateY(0); }
.hs-title.hs-text-out { opacity: 0; transform: translateY(-14px); }

/* Subtitle */
.hs-sub {
    margin: 0;
    font-family: 'Barlow', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(163,247,255,0.45);
    line-height: 1.5;
    max-width: 340px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 720ms ease 90ms, transform 720ms ease 90ms;
}
.hs-sub.hs-text-in  { opacity: 1; transform: translateY(0); }
.hs-sub.hs-text-out { opacity: 0; transform: translateY(-10px); }

/* ── Action buttons ── */
.hs-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Primary play button — blue */
.hs-btn-play {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 28px;
    background: #3a8fd4;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(58,143,212,0.45);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.hs-btn-play::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.2s;
}
.hs-btn-play:hover {
    background: #4da3e8;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 0 3px rgba(58,143,212,0.3), 0 10px 30px rgba(58,143,212,0.55);
}
.hs-btn-play:hover::before { opacity: 1; }
.hs-btn-play:active { transform: translateY(0) scale(0.98); }

/* Ghost button */
.hs-btn-ghost {
    padding: 12px 22px;
    background: rgba(163,247,255,0.07);
    color: rgba(163,247,255,0.7);
    border: 1px solid rgba(163,247,255,0.18);
    border-radius: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}
.hs-btn-ghost:hover {
    background: rgba(163,247,255,0.14);
    border-color: rgba(163,247,255,0.35);
    color: #a3f7ff;
    transform: translateY(-2px);
}

/* ── Progress bar ── */
.hs-progress-track {
    width: 200px;
    height: 2px;
    background: rgba(163,247,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}
.hs-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3a8fd4, #a3f7ff);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(58,143,212,0.7);
}

/* ── Dot navigation ── */
.hs-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.hs-nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(163,247,255,0.2);
    cursor: pointer;
    transition: all 0.25s ease;
}
.hs-nav-dot.hs-nav-dot-active {
    width: 22px;
    border-radius: 3px;
    background: #3a8fd4;
    box-shadow: 0 0 8px rgba(58,143,212,0.6);
}

/* ── RIGHT: featured card ── */
.hs-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card wrapper — 480×300 */
.hs-card-wrap {
    position: relative;
    width: 480px;
    height: 300px;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: opacity 600ms ease, transform 600ms ease;
}
.hs-card-wrap.hs-wrap-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hs-card {
    width: 100%;
    height: 100%;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    background: #1a2a4a;
    box-shadow:
        0 0 0 1px rgba(163,247,255,0.08),
        0 24px 60px rgba(0,0,0,0.7),
        0 0 80px rgba(58,143,212,0.08);
    /* Directional slide + standard transitions */
    transition: opacity 600ms ease, transform 600ms ease, box-shadow 600ms ease;
}
.hs-card-wrap:hover .hs-card {
    transform: scale(1.025) translateY(-4px);
    box-shadow:
        0 0 0 1px rgba(163,247,255,0.18),
        0 30px 70px rgba(0,0,0,0.8),
        0 0 100px rgba(58,143,212,0.18);
}

/* ── Directional slide states ── */
.hs-card-out        { opacity: 0; transform: scale(0.95); }
.hs-card-in         { opacity: 1; transform: scale(1); }

/* Slide left (forward) */
.hs-card-out-left   { opacity: 0; transform: translateX(-52px) scale(0.94); }
.hs-card-in-left    { opacity: 1; transform: translateX(0)     scale(1);    }

/* Slide right (backward) */
.hs-card-out-right  { opacity: 0; transform: translateX(52px)  scale(0.94); }
.hs-card-in-right   { opacity: 1; transform: translateX(0)     scale(1);    }

/* ── Card image — auto-enhanced ── */
.hs-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 600ms ease, filter 600ms ease;
    filter: contrast(1.08) saturate(1.18) brightness(1.04);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
.hs-card-wrap:hover .hs-card-img {
    transform: scale(1.04);
    filter: contrast(1.13) saturate(1.26) brightness(1.07);
}

/* Shine sweep — blend mode prevents blocking square */
.hs-card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 30%,
        rgba(163,247,255,0.04) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0s;
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 2;
}
.hs-card-wrap:hover .hs-card-shine {
    transform: translateX(100%);
    transition: transform 0.55s ease;
}

/* Glowing border on hover — blue */
.hs-card-border-glow {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    border: 1px solid transparent;
    background:
        linear-gradient(#080c18, #080c18) padding-box,
        linear-gradient(135deg,
            rgba(58,143,212,0.6),
            rgba(163,247,255,0.25),
            rgba(58,143,212,0.15)
        ) border-box;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s;
}
.hs-card-wrap:hover .hs-card-border-glow { opacity: 1; }

/* Corner bracket decorations — blue */
.hs-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    z-index: 5;
    pointer-events: none;
}
.hs-corner::before,
.hs-corner::after {
    content: '';
    position: absolute;
    background: #3a8fd4;
    border-radius: 1px;
}
.hs-corner-tl { top: -2px;    left: -2px;  }
.hs-corner-tr { top: -2px;    right: -2px; }
.hs-corner-bl { bottom: -2px; left: -2px;  }
.hs-corner-br { bottom: -2px; right: -2px; }

.hs-corner-tl::before { width: 2px;  height: 16px; top: 0;    left: 0;  }
.hs-corner-tl::after  { width: 16px; height: 2px;  top: 0;    left: 0;  }
.hs-corner-tr::before { width: 2px;  height: 16px; top: 0;    right: 0; }
.hs-corner-tr::after  { width: 16px; height: 2px;  top: 0;    right: 0; }
.hs-corner-bl::before { width: 2px;  height: 16px; bottom: 0; left: 0;  }
.hs-corner-bl::after  { width: 16px; height: 2px;  bottom: 0; left: 0;  }
.hs-corner-br::before { width: 2px;  height: 16px; bottom: 0; right: 0; }
.hs-corner-br::after  { width: 16px; height: 2px;  bottom: 0; right: 0; }

/* ── Filmstrip thumbnails ── */
.hs-strip-wrap {
    position: relative;
    z-index: 10;
    padding: 0 clamp(24px, 5vw, 72px) 28px;
    mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}
.hs-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 8px 4px;
}
.hs-strip::-webkit-scrollbar { display: none; }

/* Thumbnail */
.hs-thumb {
    flex-shrink: 0;
    width: 144px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #1a2a4a;
    border: 1px solid rgba(163,247,255,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
    opacity: 0.45;
}

/* Thumbnail image — auto-enhanced */
.hs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: contrast(1.06) saturate(1.15) brightness(1.03);
}

.hs-thumb-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.82));
    color: #a3f7ff;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 12px 6px 5px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.hs-thumb-active-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3a8fd4, #a3f7ff);
    box-shadow: 0 0 8px rgba(58,143,212,0.9);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.hs-thumb:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border-color: rgba(163,247,255,0.22);
    opacity: 1;
}
.hs-thumb:hover img {
    transform: scale(1.06);
    filter: contrast(1.1) saturate(1.22) brightness(1.06);
}
.hs-thumb:hover .hs-thumb-label { opacity: 1; }

.hs-thumb.hs-thumb-active {
    opacity: 1;
    border-color: rgba(58,143,212,0.7);
    box-shadow: 0 0 0 1px rgba(58,143,212,0.35), 0 8px 24px rgba(0,0,0,0.5);
    transform: translateY(-3px);
}
.hs-thumb.hs-thumb-active img {
    filter: contrast(1.1) saturate(1.2) brightness(1.05);
}
.hs-thumb.hs-thumb-active .hs-thumb-active-bar { transform: scaleX(1); }
.hs-thumb.hs-thumb-active .hs-thumb-label      { opacity: 1; }

/* ── Arrows ── */
.hs-arrow {
    position: absolute;
    top: calc(50% - 40px);
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(8,12,24,0.7);
    border: 1px solid rgba(163,247,255,0.14);
    color: rgba(163,247,255,0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}
.hs-arrow:hover {
    background: #3a8fd4;
    border-color: transparent;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(58,143,212,0.5);
}
.hs-prev { left: 16px; }
.hs-next { right: 16px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .hs-right   { display: none; }
    #hs         { min-height: 320px; }
    .hs-body    { padding: 36px 24px 16px; }
}
@media (max-width: 600px) {
    .hs-title      { font-size: 2rem; }
    .hs-actions    { gap: 8px; }
    .hs-btn-play   { padding: 11px 20px; font-size: 0.9rem; }
    .hs-btn-ghost  { display: none; }
    .hs-strip-wrap { padding: 0 16px 20px; }
    .hs-thumb      { width: 112px; height: 70px; }
}