/* Basic reset and background setup with St. Canard image */
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://files.catbox.moe/fpqe5s.WEBP');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    transition: background 0.8s ease;
}

/* Main wrapper box with semi-transparency to reveal backdrop art subtly */
.main-container {
    display: flex;
    width: 95%;
    max-width: 1100px;
    height: 650px;
    background-color: rgba(17, 17, 17, 0.85); 
    backdrop-filter: blur(5px); 
    border: 4px solid #333;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.9);
    z-index: 2;
    transition: border-color 0.5s ease, background-color 0.5s ease;
}

/* Left side content settings - scrollable dynamically */
.content-area {
    flex: 1;
    padding: 40px;
    background-color: rgba(11, 11, 11, 0.9);
    overflow-y: auto; 
    box-sizing: border-box;
    transition: background-color 0.5s ease;
}

.content-area h2 {
    font-size: 2.8rem;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #f4c20d;
    letter-spacing: 1px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    transition: color 0.5s ease, border-color 0.5s ease;
}

.content-area p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #eee;
    margin-bottom: 1.5rem;
}

/* Right side scrollable bar (The Reel) */
.filmstrip-sidebar {
    width: 220px;
    background-color: rgba(22, 15, 38, 0.95); 
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: scroll; 
    border-left: 3px solid #333;
    box-sizing: border-box;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

/* Custom Scrollbar Styles */
.filmstrip-sidebar::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
    width: 8px;
}
.filmstrip-sidebar::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track {
    background: #111;
}
.filmstrip-sidebar::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
.filmstrip-sidebar::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover {
    background: #f4c20d;
}

/* Thumbnail items container styling */
.film-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, opacity 0.2s, filter 0.5s ease;
    border: 3px solid #333;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0.5;
    background-color: #000;
    flex-shrink: 0;
}

/* Image styling */
.film-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

/* Sleek bottom title tag overlay */
.thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.85rem;
    text-align: center;
    padding: 6px 2px;
    font-weight: bold;
    text-transform: uppercase;
    border-top: 1px solid #222;
    transition: color 0.2s ease;
}

/* Active and Hover highlights */
.film-item:hover, .film-item.active {
    opacity: 1;
    transform: scale(1.04);
    border-color: #f4c20d;
}

.film-item.active .thumb-label {
    color: #f4c20d;
    background: rgba(0, 0, 0, 0.9);
}

/* Corner Floating GIF Layout (Enabled pointer events for clicking) */
.corner-gif-container {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 160px; 
    height: auto;
    z-index: 10;
    cursor: pointer;
    transition: filter 0.5s ease, transform 0.2s ease;
}

.corner-gif-container:hover {
    transform: scale(1.05);
}

.corner-gif-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Comic Book Style Speech Bubble */
.speech-bubble {
    position: absolute;
    bottom: 110%; /* Sits cleanly right above the GIF */
    right: 10px;
    width: 200px;
    background: #fff;
    color: #000;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 8px;
    border: 3px solid #000;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.3);
    text-align: center;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Arrow point for speech bubble */
.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: 40px;
    border-width: 12px 12px 0;
    border-style: solid;
    border-color: #fff transparent;
    display: block;
    width: 0;
}
.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -16px;
    right: 39px;
    border-width: 13px 13px 0;
    border-style: solid;
    border-color: #000 transparent;
    display: block;
    width: 0;
}

/* Class to visually animate the speech bubble into view */
.speech-bubble.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   NEGAVERSE MODE STYLES
   ========================================================================== */

body.negaverse-active {
    background-image: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('https://files.catbox.moe/fpqe5s.WEBP');
}

.main-container.negaverse-active {
    border-color: #b30000;
    background-color: rgba(10, 2, 2, 0.9);
    box-shadow: 0 15px 40px rgba(179, 0, 0, 0.3);
}

.main-container.negaverse-active .content-area {
    background-color: rgba(5, 1, 1, 0.95);
}

.main-container.negaverse-active #villain-title {
    color: #ff3333;
    border-bottom-color: #b30000;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.4);
}

.main-container.negaverse-active .filmstrip-sidebar {
    background-color: rgba(179, 0, 0, 0.95); 
    border-left-color: #ffcc00; 
}

.main-container.negaverse-active .film-item {
    border-color: #550000;
    filter: grayscale(80%) brightness(50%);
}

.main-container.negaverse-active .film-item:hover {
    border-color: #ffcc00;
    filter: grayscale(30%) brightness(80%);
}

.main-container.negaverse-active .film-item.active {
    border-color: #ffcc00 !important; 
    transform: scale(1.08);
    opacity: 1 !important;
    filter: none !important; 
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.6);
}

.main-container.negaverse-active .film-item.active .thumb-label {
    color: #ffcc00 !important;
    background: rgba(0, 0, 0, 0.95);
}

/* Visual corruption of the GIF and Speech Bubble in Negaverse */
body.negaverse-active .corner-gif-container img {
    filter: invert(100%) hue-rotate(180deg) brightness(80%);
}

body.negaverse-active .speech-bubble {
    background: #000;
    color: #ff3333;
    border-color: #ff3333;
    box-shadow: 5px 5px 0px rgba(179,0,0,0.5);
}
body.negaverse-active .speech-bubble::after { border-color: #000 transparent; }
body.negaverse-active .speech-bubble::before { border-color: #ff3333 transparent; }