
:root {
    --y-color: #ff3333;
    --y-glow: rgba(255, 51, 51, 0.6);
}

body.dark-mode {
    --news-bg: #050510;
}

.home-hero-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 160px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(circle at center, #0a0b1e 0%, #050510 100%);
}

.home-hero-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, transparent, rgba(0, 102, 204, 0.05), transparent);
    animation: rotateBg 20s linear infinite;
    z-index: 0;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#game-bg-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.bg-stain {
    position: absolute;
    border-radius: 50%;
    filter: blur(15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    pointer-events: none;
}

.bg-stain.cleaning {
    transform: scale(2);
    opacity: 0 !important;
}

#tilo-cloth {
    position: fixed;
    width: 120px;
    height: 120px;
    background-image: url('tilo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
}

/* Y-Menu redesign with Glassmorphism, 3D & Liquid effects */
.y-menu {
    position: relative;
    width: 650px;
    height: 650px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    perspective: 1500px;
}

/* 5. Liquid Portal Center */
.y-center {
    position: absolute;
    width: 35px;
    height: 35px;
    background: radial-gradient(circle at center, #fff, var(--y-color), transparent);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--y-glow), 0 0 60px var(--y-glow);
    z-index: 25;
    animation: liquidNode 4s infinite alternate ease-in-out;
}

@keyframes liquidNode {
    0% { transform: scale(1) rotate(0deg); border-radius: 50%; box-shadow: 0 0 30px var(--y-glow); }
    33% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    66% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 60%; }
    100% { transform: scale(1.4) rotate(360deg); border-radius: 50%; box-shadow: 0 0 50px var(--y-glow), 0 0 100px var(--y-glow); }
}

/* Menu Item Base - 1. Glassmorphism & 8. Deep Shadows */
.menu-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 25px 40px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255,255,255,0.1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 20;
    overflow: hidden;
}

/* 10. Background Liquid Ripple (Decorative) */
.menu-item::after {
    content: '';
    position: absolute;
    inset: -100%;
    background: radial-gradient(circle at center, var(--hover-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: -1;
}

.menu-item:hover::after {
    opacity: 0.15;
    animation: liquidRipple 2s infinite linear;
}

@keyframes liquidRipple {
    0% { transform: translate(-10%, -10%) scale(1); }
    50% { transform: translate(10%, 10%) scale(1.1); }
    100% { transform: translate(-10%, -10%) scale(1); }
}

/* 4. Floating Icons */
.menu-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px var(--hover-color));
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

.menu-item .label {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 2px;
    transition: all 0.3s;
}

/* 2. 3D Tilt Hover */
.menu-item:hover {
    transform: scale(1.08) translateY(-10px) rotateX(10deg) rotateY(10deg);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--hover-color);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px var(--hover-color);
}

.menu-item.top { top: -20px; left: 50%; transform: translateX(-50%) rotateX(-15deg); }
.menu-item.left { bottom: 100px; left: -20px; transform: rotateY(15deg); }
.menu-item.right { bottom: 100px; right: -20px; transform: rotateY(-15deg); }

.menu-item:hover.top { transform: translateX(-50%) scale(1.1) translateY(-15px) rotateX(0deg); }
.menu-item:hover.left { transform: scale(1.1) translateY(-15px) rotateX(5deg) rotateY(5deg); }
.menu-item:hover.right { transform: scale(1.1) translateY(-15px) rotateX(5deg) rotateY(-5deg); }

.menu-item.top { --hover-color: #ffeb3b; }
.menu-item.left { --hover-color: #00e5ff; }
.menu-item.right { --hover-color: #ff3333; }

/* SVG lines drawing animation */
.y-shape-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.y-line {
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: lineDraw 2s ease-out forwards;
}

@keyframes lineDraw {
    to { stroke-dashoffset: 0; }
}

/* 10. Portal Background Distortion / Ripple */
.y-center::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, var(--y-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: portalRipple 2s infinite ease-out;
    z-index: -1;
}

@keyframes portalRipple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

/* Inverted Y-shape glow shifts on hover */
.y-menu:has(.menu-item.top:hover) .y-line {
    stroke: #ffeb3b;
    filter: drop-shadow(0 0 15px #ffeb3b);
    stroke-width: 6;
}

.y-menu:has(.menu-item.left:hover) .y-line {
    stroke: #00e5ff;
    filter: drop-shadow(0 0 15px #00e5ff);
    stroke-width: 6;
}

.y-menu:has(.menu-item.right:hover) .y-line {
    stroke: #ff3333;
    filter: drop-shadow(0 0 15px #ff3333);
    stroke-width: 6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .y-menu {
        width: 100%;
        height: 550px;
        perspective: none; /* Reduce complexity for performance */
    }
    
    .menu-item {
        padding: 15px 25px;
        border-radius: 20px;
        backdrop-filter: blur(10px);
    }
    
    .menu-item .label {
        font-size: 1.4rem;
    }
    
    .menu-icon {
        font-size: 1.8rem;
    }
    
    .menu-item.top { top: 0; }
    .menu-item.left { bottom: 80px; left: 10px; }
    .menu-item.right { bottom: 80px; right: 10px; }
}

@media (max-width: 480px) {
    .menu-item .label { font-size: 1.2rem; }
    .menu-item .sub-label { font-size: 0.8rem; }
    .menu-item { padding: 12px 20px; }
    .y-menu { height: 450px; }
}

/* Abuse Preview Cards */
.abuse-preview-container {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    width: max-content;
}

.abuse-preview-container.active {
    opacity: 1;
    pointer-events: auto;
    bottom: 110%;
}

.preview-card {
    width: 200px;
    background: rgba(20, 20, 35, 0.98);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0,0,0,0.8);
    transition: all 0.3s;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.preview-card:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: #00e5ff;
    box-shadow: 0 20px 60px rgba(0, 229, 255, 0.3);
}

.preview-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.preview-card-body {
    padding: 12px;
    text-align: center;
}

.preview-card-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2rem;
    line-height: 1.2;
}

.preview-card-timer {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    font-weight: 900;
    color: #ffd700;
    background: rgba(0,0,0,0.4);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: inline-block;
}

.preview-card-btn {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 900;
    width: 100%;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

