/* =========================
   FEATURED NEWS - MODERN DESIGN
   ========================= */

#featured-news {
    position: relative;
    overflow: visible;
}

.news-container-main {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

/* MODERN MONSTER PRESENTER - Seamlessly Integrated */
.news-presenter {
    position: absolute;
    left: -80px;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    max-width: 35vw;
    z-index: 15;
    pointer-events: none;
    animation: monsterBreath 6s ease-in-out infinite;
}

@keyframes monsterBreath {

    0%,
    100% {
        transform: translateY(-50%) scale(1);
    }

    50% {
        transform: translateY(-52%) scale(1.02);
    }
}

.monster-img {
    width: 100%;
    height: auto;
    display: block;
    filter:
        drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 46, 99, 0.3)) contrast(1.15) saturate(1.2);
    /* Radial mask for organic fade-out */
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%,
            black 30%,
            rgba(0, 0, 0, 0.9) 60%,
            rgba(0, 0, 0, 0.6) 80%,
            transparent 100%);
    mask-image: radial-gradient(ellipse 100% 100% at 50% 50%,
            black 30%,
            rgba(0, 0, 0, 0.9) 60%,
            rgba(0, 0, 0, 0.6) 80%,
            transparent 100%);
}

/* Mystical glow behind monster */
.presenter-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle,
            rgba(255, 46, 99, 0.4) 0%,
            rgba(255, 46, 99, 0.2) 40%,
            transparent 70%);
    z-index: -1;
    filter: blur(30px);
    animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Modern Featured Wrapper - Glassmorphism Card */
.featured-wrapper {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.85) 0%, rgba(5, 5, 10, 0.7) 100%);
    backdrop-filter: blur(30px) saturate(120%);
    -webkit-backdrop-filter: blur(30px) saturate(120%);
    border: 1px solid rgba(255, 46, 99, 0.3);
    border-radius: 32px;
    padding: 60px 60px 60px 140px;
    /* Extra left padding for monster */
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
    position: relative;
    z-index: 10;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.7),
        inset 0 0 40px rgba(255, 46, 99, 0.05);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: visible;
    /* Changed to visible for monster to peek through */
    margin-left: 100px;
    /* Space for monster on the left */
}

/* Animated Background Gradient on Hover */
.featured-wrapper::before {
    content: '';
    position: absolute;
    inset: -100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
            rgba(255, 46, 99, 0.15) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.featured-wrapper:hover::before {
    opacity: 1;
}

.featured-wrapper:hover {
    transform: translateY(-5px);
    box-shadow:
        0 35px 80px rgba(255, 46, 99, 0.25),
        inset 0 0 60px rgba(255, 46, 99, 0.08);
    border-color: rgba(255, 46, 99, 0.5);
}

/* Monster reacts to card hover */
.news-container-main:hover .news-presenter {
    animation-play-state: paused;
    transform: translateY(-50%) scale(1.05);
    filter: drop-shadow(0 0 30px rgba(255, 46, 99, 0.5));
}

/* Featured Text Styling */
.featured-text {
    position: relative;
    z-index: 2;
}

.featured-text h2 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin: 20px 0 15px;
    background: linear-gradient(135deg, #ffffff 0%, #ff2e63 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.featured-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

/* CTA Button Enhancement */
.news-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding: 14px 28px;
    background: rgba(255, 46, 99, 0.15);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 46, 99, 0.4);
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.news-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 46, 99, 0.3), rgba(255, 46, 99, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-cta:hover {
    transform: translateX(5px);
    background: rgba(255, 46, 99, 0.25);
    border-color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(255, 46, 99, 0.3);
}

.news-cta:hover::before {
    opacity: 1;
}

/* Featured Image Enhancement */
.featured-image {
    position: relative;
    display: block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 46, 99, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.featured-image:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 25px 60px rgba(255, 46, 99, 0.35);
}

.featured-image:hover::after {
    opacity: 1;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.featured-image:hover img {
    transform: scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .news-presenter {
        width: 280px;
        left: -50px;
    }

    .featured-wrapper {
        margin-left: 60px;
        padding-left: 100px;
    }
}

@media (max-width: 900px) {
    .news-container-main {
        flex-direction: column;
    }

    /* Monster moves to top on mobile */
    .news-presenter {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 250px;
        max-width: 60vw;
        margin: 0 auto -60px;
        z-index: 20;
    }

    .featured-wrapper {
        grid-template-columns: 1fr;
        padding: 80px 30px 40px;
        gap: 35px;
        text-align: center;
        margin-left: 0;
    }

    .featured-text {
        order: 2;
    }

    .featured-image {
        order: 1;
        width: 100%;
    }

    .featured-text h2 {
        font-size: 2.2rem;
    }
}

/* =========================
   MENU MASCOT (Legacy of the Void)
   ========================= */

#side-menu {
    /* Ensure we can position the mascot at the bottom */
    display: flex !important;
    flex-direction: column;
    padding-bottom: 0 !important;
    /* Remove padding to let image hit bottom */
}

.side-menu-nav {
    flex: 1;
    /* Push mascot to bottom */
}

.menu-mascot-container {
    position: relative;
    width: 100%;
    height: 250px;
    /* Taller to allow fading */
    margin-top: auto;
    cursor: pointer;
    /* Use mask to blend image top into nothingness so it doesn't look like a square */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
}

.mascot-img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Focus on the character */
    transition: opacity 0.4s ease, transform 0.5s ease;
    transform-origin: bottom center;
}

/* Image Swap Logic */
.mascot-img.hover {
    opacity: 0;
    z-index: 2;
    filter: contrast(1.2) brightness(1.1);
    /* Pop a bit more */
}

.mascot-img.default {
    opacity: 1;
    z-index: 1;
    filter: sepia(0.3) saturate(0.8);
    /* Slightly darker/older look to blend */
}

.menu-mascot-container:hover .mascot-img.hover {
    opacity: 1;
    transform: scale(1.02);
    /* Subtle breathing */
}

.menu-mascot-container:hover .mascot-img.default {
    transform: scale(1.02);
}

/* Tooltip removed as per design simplification */

/* PORTAL CARDS - VERTICAL REDESIGN (Mobile Video Format) */
.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.portal-card {
    position: relative;
    overflow: hidden;
    height: 600px;
    /* TALL PORTRAIT FORMAT - FULL 9:16 */
    border-radius: 20px;
    border: 1px solid rgba(255, 46, 99, 0.2);
    transition: all 0.4s ease;
}

.portal-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Video Background Logic */
.card-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 1;
    /* FULL BRIGHTNESS */
    transition: opacity 0.3s ease;
}

.card-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill space without black bars */
    object-position: center 30%;
    /* Show upper-middle - keeps full character visible */
}

.portal-card:hover .card-video-bg {
    opacity: 1;
    /* Keep full brightness on hover */
}

.portal-content {
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    backdrop-filter: none;
    /* Removed blur for cleaner video view */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

/* Specific HH styling adjustments */
.portal-card.hh {
    border-top: 3px solid #ff9966;
    background: #000;
}

.portal-card.hh:hover {
    box-shadow: 0 0 40px rgba(255, 153, 102, 0.5);
    border-color: #ff9966;
}

.portal-card.hh h3 {
    color: #ff9966;
    text-shadow: 0 0 10px rgba(255, 153, 102, 0.8);
    font-size: 2rem;
}

/* YouTube portal - same golden effect */
.portal-card.youtube {
    border-top: 3px solid #ff9966;
    background: #000;
}

.portal-card.youtube:hover {
    box-shadow: 0 0 40px rgba(255, 153, 102, 0.5);
    border-color: #ff9966;
}

.portal-card.youtube h3 {
    color: #ff9966;
    text-shadow: 0 0 10px rgba(255, 153, 102, 0.8);
    font-size: 2rem;
}

/* AnimeFLV (Crunchyroll class) - same golden effect */
.portal-card.crunchyroll {
    border-top: 3px solid #ff9966;
    background: #000;
}

.portal-card.crunchyroll:hover {
    box-shadow: 0 0 40px rgba(255, 153, 102, 0.5);
    border-color: #ff9966;
}

.portal-card.crunchyroll h3 {
    color: #ff9966;
    text-shadow: 0 0 10px rgba(255, 153, 102, 0.8);
    font-size: 2rem;
}

/* =========================
   WALLPAPER CARDS - VERTICAL 9:16 FORMAT
   ========================= */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.wall-card {
    position: relative;
    overflow: hidden;
    height: 500px;
    border-radius: 20px;
    border: 1px solid rgba(255, 46, 99, 0.15);
    transition: all 0.4s ease;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.wall-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(255, 46, 99, 0.3);
    border-color: rgba(255, 46, 99, 0.4);
}

.wall-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
    transition: transform 0.6s ease, filter 0.4s ease;
    filter: brightness(0.5) saturate(1.2) contrast(1.1);
    /* Radial fade for organic integration */
    mask-image: radial-gradient(ellipse 110% 110% at center, black 50%, rgba(0, 0, 0, 0.8) 80%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 110% 110% at center, black 50%, rgba(0, 0, 0, 0.8) 80%, transparent 100%);
}

.wall-card:hover .wall-bg {
    transform: scale(1.08) rotate(1deg);
    filter: brightness(0.7) saturate(1.5) contrast(1.15);
}

.wall-overlay {
    position: relative;
    z-index: 2;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.6) 35%,
            rgba(0, 0, 0, 0.3) 60%,
            transparent 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

/* Specific positioning for each wallpaper to properly center subjects */
.wall-card.neon-anime .wall-bg {
    object-position: center center;
    /* Vertical neon character - already centered */
}

.wall-card.cyberpunk-city .wall-bg {
    object-position: 25% center;
    /* Character with car on left side */
}

.wall-card.rei-anime .wall-bg {
    object-position: 30% center;
    /* Rei character on left side */
}