/* --- PORTAL LANDING SYSTEM --- */
:root {
    --bg-dark: #0f1013;
    --bg-card: #16181d;
    --bg-card-hover: #1e2129;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #818cf8;
    /* Indigo neon */
    --primary-glow: rgba(129, 140, 248, 0.4);
    --accent-red: #ef4444;
    /* YouTube red */
    --accent-red-glow: rgba(239, 68, 68, 0.4);
    --border-subtle: #242731;
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- BASICS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-primary);
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: rgba(15, 16, 19, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 1px;
}

.nav-logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--text-main);
}

/* --- HERO --- */
.hero {
    position: relative;
    padding: 140px 24px 80px 24px;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(rgba(15, 16, 19, 0.88), rgba(15, 16, 19, 0.96)), url('images/character_grid.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, rgba(15, 16, 19, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-container.centered {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.hero-mascot-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow: 0 0 24px var(--primary-glow);
    object-fit: cover;
    margin-bottom: 16px;
    background-color: var(--bg-dark);
}

.hero-handle {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-muted);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title .highlight {
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

.hero-description {
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition);
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
    box-shadow: 0 4px 14px var(--accent-red-glow);
}

.btn-primary:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border-subtle);
    background-color: transparent;
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

/* --- SECTIONS --- */
.section {
    padding: 80px 24px;
}

.alt-bg {
    background-color: #0b0c0e;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* --- VIDEOS GRID --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.video-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-red);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
}

.video-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.video-card:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: var(--accent-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: all var(--transition);
    box-shadow: 0 0 15px var(--accent-red-glow);
}

.video-card:hover .video-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
}

.video-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto;
}

/* Feed expansion controls */
.feed-controls {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.btn-control {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.btn-control:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: translateY(-2px);
}

/* --- RED SPECIAL REDIRECT CARDS --- */
.youtube-redirect-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: rgba(239, 68, 68, 0.03) !important;
    border: 2px dashed rgba(239, 68, 68, 0.3) !important;
    border-radius: 12px;
    padding: 24px;
    gap: 16px;
    transition: all var(--transition);
    cursor: pointer;
    min-height: 250px;
}

.youtube-redirect-card:hover {
    border-color: var(--accent-red) !important;
    background-color: rgba(239, 68, 68, 0.08) !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
    transform: translateY(-6px);
}

.redirect-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 14px var(--accent-red-glow);
}

.youtube-redirect-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.youtube-redirect-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- SHORTS GRID --- */
.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.short-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    aspect-ratio: 9 / 16;
    display: flex;
    flex-direction: column;
    position: relative;
}

.short-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(129, 140, 248, 0.2);
}

.short-thumbnail-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.short-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.short-card:hover .short-thumbnail {
    transform: scale(1.05);
}

.short-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px;
    background: linear-gradient(0deg, rgba(15, 16, 19, 0.95) 0%, rgba(15, 16, 19, 0.4) 75%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.short-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.short-icon-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- HORIZONTALLY SCROLLABLE CAST STRIP --- */
.cast-strip-section {
    padding: 60px 0;
    background-color: var(--bg-dark);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.cast-strip-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.cast-strip-header {
    margin-bottom: 24px;
}

.cast-strip-header h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
}

.cast-strip-header p {
    color: var(--text-muted);
    font-size: 15px;
}

.cast-strip {
    display: flex;
    gap: 32px;
    overflow-x: auto;
    padding: 16px 8px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbars */
.cast-strip::-webkit-scrollbar {
    height: 6px;
}

.cast-strip::-webkit-scrollbar-track {
    background: transparent;
}

.cast-strip::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 10px;
}

.cast-strip:hover::-webkit-scrollbar-thumb {
    background: var(--primary-glow);
}

.cast-strip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    cursor: pointer;
    flex-shrink: 0;
    scroll-snap-align: start;
    transition: transform var(--transition);
}

.cast-strip-avatar-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--border-subtle) 0%, rgba(255, 255, 255, 0.05) 100%);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.cast-strip-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-card);
}

.cast-strip-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    transition: color var(--transition);
}

/* Hover effects for cast items */
.cast-strip-item:hover {
    transform: translateY(-4px);
}

.cast-strip-item:hover .cast-strip-name {
    color: var(--primary);
}

.cast-strip-item:hover .cast-strip-avatar-wrapper {
    box-shadow: 0 4px 16px var(--primary-glow);
    transform: scale(1.05);
}

/* --- CAST MODAL OVERLAY (Details Popup) --- */
.cast-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    padding: 16px;
}

.cast-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--transition);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.cast-modal.open .modal-content {
    transform: scale(1);
}

.modal-header-banner {
    height: 100px;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background-color var(--transition);
}

.modal-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-avatar-wrapper {
    position: absolute;
    bottom: -40px;
    left: 24px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 6px solid var(--bg-card);
    background-color: var(--bg-dark);
}

.modal-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.modal-body {
    padding: 56px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-title-group {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.modal-char-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

.modal-char-role {
    font-size: 14px;
    color: var(--text-muted);
}

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-section-body {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.modal-bullets {
    padding-left: 18px;
}

.modal-bullets li {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* --- FOOTER --- */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 48px 24px;
    background-color: #0b0c0e;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.footer-brand h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 20px;
    font-size: 20px;
}

.footer-socials a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-socials a:hover {
    color: var(--text-main);
}

/* --- LOADING SPINNER --- */
.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 16px;
    padding: 60px 0;
}

/* --- VIDEO PLAYER MODAL --- */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.video-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.video-modal-content {
    width: 90%;
    max-width: 800px;
    position: relative;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 24px;
    color: white;
}

.video-ratio-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
}

.video-ratio-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 36px;
    }
}