body {
    font-family: Arial, sans-serif;
    margin:0;
    padding:0;
    background: var(--bg);
    color: var(--text);
    transition: 0.3s;
    overflow-x: hidden;
    position: relative;
}

:root { --bg:#0b0b0f; --text:#ffffff; }
/* dark theme */
.dark { --bg:#0b0b0f; --text:#ffffff; }
header {
    padding:20px;
    display:flex;
    gap:10px;
    align-items:center;
    /* translucent surface so background shows through */
    background: rgba(20,22,26,0.45);
    backdrop-filter: blur(6px);
    position:sticky;
    top:0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    z-index: 30;
} 

header button {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

#sectionNav {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

#sectionNav button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease;
}

#sectionNav button:hover {
    background: rgba(255,255,255,0.08);
}

#sectionNav button.section-active {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

#search {
    flex:1;
    padding:10px;
    font-size:16px;
}
#gameList, #movieList, #itemList {
    list-style: none;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 15;
}

/* list enter/exit animations */
@keyframes listFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}

@keyframes listFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.list-section.anim-out {
    animation: listFadeOut 200ms cubic-bezier(.2,.9,.2,1) forwards;
}

.list-section.anim-in {
    animation: listFadeIn 260ms cubic-bezier(.2,.9,.2,1) both;
}

.list-section.hidden {
    display: none;
}


.list-section li {
    display: block;
    width: 100%;
    max-width: 640px;
    padding: 10px 16px;
    margin: 0;
    border-radius: 8px;
    background: rgba(22,24,28,0.40);
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}


#itemList li:focus,
.list-section li:focus,
.list-section li:focus-visible {
    outline: none;
    box-shadow: none;
}

.dark .list-section li {
    background: rgba(255,255,255,0.08);
}

/* keep interactions but visually plain */
#itemList li:hover,
.list-section li:hover {
    transform: translateY(-3px);
    background: rgba(0,0,0,0.10);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.itemList li:active,
.list-section li:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.10);
}

#gameList li:focus,
#gameList li:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Background canvas */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* behind content */
    pointer-events: none; /* don't block clicks */
    display: block;
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

/* slightly reduce particles opacity on small screens */
@media (max-width: 600px) {
    #bgCanvas { opacity: 0.7; }
}

/* Respect user's reduced motion preference: disable background animation */
@media (prefers-reduced-motion: reduce) {
    #bgCanvas { display: none !important; }
    .list-section.anim-out,
    .list-section.anim-in {
        animation: none !important;
    }
}

/* Page banner shown below the header (placeholder) */
.banner,
#pageBanner {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
    margin: 8px 0 0 0;
    text-align: center;
    border-radius: 8px;
    color: var(--text);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(4px);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    z-index: 25;
}

/* Preview modal removed — movies open in a new tab */

.banner,
#pageBanner {
    background: rgba(255,255,255,0.04);
}

/* Movie credit text */
.movie-credit {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.movie-credit.show {
    opacity: 1;
}