/* --- Base Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Body Setup --- */
body {
    background-color: #000000; 
    height: 100vh; 
    overflow: hidden; /* Prevents scrollbars */
}

/* --- Background Video Styling --- */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1; /* Pushes the video to the back */
    background-color: #000; 
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fills the screen without stretching */
    opacity: 0.5; /* Dims the video. Change this if it's too bright/dark */
}

/* --- Corner Logo Styling (The Enter Button) --- */
.corner-logo {
    position: fixed;
    bottom: 40px; 
    right: 40px; 
    width: 580px; 
    height: auto;
    z-index: 10; /* Keeps it above the video */
    cursor: pointer; 
    transition: transform 0.3s ease, opacity 0.3s ease; 
}

/* Hover effect for desktop */
.corner-logo:hover {
    transform: scale(1.05); 
    opacity: 0.8;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .corner-logo {
        bottom: 20px; 
        right: 20px;
        width: 580px; /* Shrinks logo for phones */
    }
}


/* --- Home / Hub Page Styling --- */
.home-body {
    background-color: #000000;
    color: #ffffff;
    font-family: sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 20px;
}

.logo-text {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 2px;
}

.home-nav a {
    color: #777;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.home-nav a.active, .home-nav a:hover {
    color: #fff;
}

/* --- Portal Hub Grid --- */
.portal-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portal-container h1 {
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 30px;
    font-weight: normal;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.portal-card {
    background-color: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 40px 30px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.portal-card:hover {
    transform: translateY(-4px);
    border-color: #555;
}

.portal-card h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: normal;
    letter-spacing: 1px;
}

.portal-card p {
    color: #666;
    font-size: 0.9rem;
}

.portal-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.portal-card.disabled:hover {
    transform: none;
    border-color: #1a1a1a;
}

/* --- Season / Episodes Page Styling --- */
.episodes-body {
    background-color: #000000;
    color: #ffffff;
    font-family: sans-serif;
    padding: 40px;
    height: auto; 
    overflow: auto; /* Enables scrolling for the archive page */
}

.episodes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 20px;
}

.back-home {
    color: #777;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.back-home:hover {
    color: #fff;
}

.episodes-header h1 {
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: normal;
    color: #ccc;
}

/* --- Episode Grid Layout --- */
.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Individual Episode Card --- */
.episode-card {
    background-color: #080808;
    border: 1px solid #161616;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.episode-card:hover {
    transform: translateY(-4px);
    border-color: #444;
}

.thumbnail-container {
    width: 100%;
    aspect-ratio: 16 / 9; /* Standard cinematic video ratio */
    overflow: hidden;
    background-color: #111;
}

.thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.episode-card:hover .thumbnail-container img {
    transform: scale(1.03); 
}

.episode-info {
    padding: 20px;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.ep-number {
    font-size: 0.85rem;
    color: #555;
    font-weight: bold;
}

.episode-info h2 {
    font-size: 1rem;
    font-weight: normal;
    letter-spacing: 0.5px;
    color: #ddd;
}


/* --- Embedded Playlist Styling --- */
.playlist-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}


/* --- Enhanced Portal Cards with Background Thumbnails --- */
.portal-card {
    background-size: cover;
    background-position: center;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 50px 30px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.portal-card:hover {
    transform: translateY(-4px);
    border-color: #555;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}

.portal-card h2, 
.portal-card p {
    position: relative;
    z-index: 2; /* Keeps text crisp and readable above the dark gradient overlay */
}

.portal-card h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: normal;
    letter-spacing: 1px;
}

.portal-card p {
    color: #aaa;
    font-size: 0.9rem;
}

/* --- Home Body Layout Fix for Video Background --- */
.home-body {
    background-color: #000000;
    color: #ffffff;
    font-family: sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    position: relative;
    overflow-x: hidden;
}

/* --- Portal Cards Styling --- */
.portal-card {
    background-size: cover;
    background-position: center;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 50px 30px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.portal-card:hover {
    transform: translateY(-4px);
    border-color: #555;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}

.portal-card h2, 
.portal-card p {
    position: relative;
    z-index: 2;
}

.portal-card h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: normal;
    letter-spacing: 1px;
}

.portal-card p {
    color: #aaa;
    font-size: 0.9rem;
}