/* Base styles */
body {
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 100%);
    min-height: 100vh;
    transition: background 0.5s ease;
}

/* Scrolling Animation for Breaking News */
@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.animate-scroll-left {
    animation: scroll-left 20s linear infinite;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: 2px solid #00f3ff;
    border-radius: 50%;
    background: rgba(0, 243, 255, 0.1);
    color: #00f3ff;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.theme-toggle-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
    transform: scale(1.1) rotate(20deg);
}

.theme-toggle-btn i {
    transition: transform 0.3s ease;
}

.theme-toggle-btn.day-mode {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.theme-toggle-btn.day-mode:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.theme-toggle-btn.day-mode i {
    transform: rotate(-20deg);
}

/* Night Mode Styles */
.hero-night {
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 100%);
}

.hero-bg-night {
    background: linear-gradient(to bottom, #0f1a2a 0%, #1a1a2e 50%, #0a0a0f 100%);
    opacity: 0.95;
}

.fog-night {
    opacity: 0.4;
}

.light-night {
    opacity: 0.3;
}

.holo-night {
    opacity: 0.5;
}

.ground-night {
    opacity: 0.4;
}

.overlay-night {
    background: linear-gradient(to bottom, rgba(15, 26, 42, 0.6), transparent, rgba(10, 10, 15, 0.7));
}

/* Day Mode Styles */
body.day-mode {
    background: linear-gradient(135deg, #87CEEB 0%, #E0F6FF 100%);
}

body.day-mode .hero-section {
    background: linear-gradient(135deg, #87CEEB 0%, #E0F6FF 100%);
}

body.day-mode .hero-night {
    background: linear-gradient(135deg, #87CEEB 0%, #E0F6FF 100%);
}

body.day-mode .hero-bg-night {
    background: linear-gradient(to bottom, #87CEEB 0%, #B0E0E6 50%, #E0F6FF 100%);
    opacity: 0.9;
}

body.day-mode .fog-night {
    opacity: 0.2;
}

body.day-mode .light-night {
    background-color: rgba(255, 215, 0, 0.2) !important;
    opacity: 0.25 !important;
}

body.day-mode .holo-night {
    background-color: rgba(255, 215, 0, 0.15) !important;
    opacity: 0.3 !important;
}

body.day-mode .ground-night {
    background: linear-gradient(to top, rgba(255, 215, 0, 0.1), transparent, transparent) !important;
    opacity: 0.3;
}

body.day-mode .overlay-night {
    background: linear-gradient(to bottom, rgba(135, 206, 235, 0.3), transparent, rgba(176, 224, 230, 0.4));
}

body.day-mode .neon-building-image {
    filter: brightness(1.2) contrast(1.1) saturate(1.15) !important;
}

/* Neon link styling */
.neon-link {
    position: relative;
    color: #fff;
    text-decoration: none;
    padding-bottom: 4px;
    transition: color 0.3s;
}

body.day-mode .neon-link {
    color: #333;
}

.neon-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f3ff, #9d4edd);
    transition: width 0.4s ease;
}

body.day-mode .neon-link::after {
    background: linear-gradient(90deg, #ffd700, #ff8c00);
}

.neon-link:hover {
    color: #00f3ff;
}

body.day-mode .neon-link:hover {
    color: #ffd700;
}

.neon-link:hover::after {
    width: 100%;
}

/* Neon button */
.neon-btn {
    background: rgba(20, 20, 30, 0.8);
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #00f3ff, #9d4edd) 1;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.neon-btn:hover {
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.7), 0 0 40px rgba(157, 78, 221, 0.5);
    transform: translateY(-3px);
}

.neon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.2), transparent);
    transition: left 0.6s;
}

.neon-btn:hover::before {
    left: 100%;
}

/* Category cards */
.category-card {
    background: rgba(30, 30, 40, 0.7);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.5s;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: #00f3ff;
    box-shadow: 0 15px 30px rgba(0, 243, 255, 0.2);
}

.category-icon {
    font-size: 3rem;
    color: #00f3ff;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #fff;
}

.category-desc {
    color: #a0a0c0;
    margin-bottom: 1.5rem;
}

.category-link {
    color: #9d4edd;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.category-link:hover {
    color: #00f3ff;
}

/* Countdown boxes */
.countdown-box {
    background: rgba(20, 20, 30, 0.9);
    border: 2px solid #00f3ff;
    border-radius: 15px;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5), inset 0 0 15px rgba(0, 243, 255, 0.1);
    backdrop-filter: blur(10px);
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #00f3ff;
    text-shadow: 0 0 15px #00f3ff, 0 0 30px rgba(0, 243, 255, 0.7), 0 0 45px rgba(157, 78, 221, 0.4);
}

.countdown-label {
    font-size: 0.85rem;
    color: #9d4edd;
    margin-top: 0.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.6);
}

/* Social icons */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 243, 255, 0.1);
    color: #00f3ff;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-icon:hover {
    background: #00f3ff;
    color: #0a0a0f;
    transform: scale(1.1);
}

/* Breaking News Mobile Responsiveness */
@media (max-width: 768px) {
    .breaking-news-container {
        padding: 0.25rem 0.5rem;
    }

    .breaking-news-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .breaking-news-container {
        padding: 0.2rem 0.4rem;
    }

    .breaking-news-text {
        font-size: 0.7rem;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {

    /* Countdown Timer Mobile Fix */
    #countdown {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        max-width: 95%;
    }

    .countdown-box {
        padding: 1rem;
        min-width: 0;
    }

    .countdown-number {
        font-size: 1.75rem !important;
        padding: 0.25rem;
    }

    .countdown-label {
        font-size: 0.8rem !important;
    }

    /* Hero Title */
    h1.text-5xl.md\\:text-8xl {
        font-size: 2.5rem !important;
    }

    /* Hero Subtitle */
    .text-xl.md\\:text-3xl {
        font-size: 1.125rem !important;
    }

    /* Category Grid */
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    /* CTA Buttons */
    .neon-btn.px-8.py-4.text-xl {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Mobile Menu Improvements */
    #mobile-menu {
        max-height: 80vh;
        overflow-y: auto;
        right: 1rem;
        width: 280px;
        max-width: calc(100vw - 2rem);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 243, 255, 0.2);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(0, 243, 255, 0.3);
        animation: slideInRight 0.3s ease-out;
    }

    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateX(100%);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Mobile menu button animation */
    #mobile-menu-btn span:nth-child(1) {
        transition: all 0.3s ease;
    }

    #mobile-menu-btn span:nth-child(2) {
        transition: all 0.3s ease;
    }

    #mobile-menu-btn span:nth-child(3) {
        transition: all 0.3s ease;
    }

    /* Hamburger to X animation */
    #mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    #mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    #mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Mobile menu items */
    #mobile-menu a,
    #mobile-menu button {
        transition: all 0.2s ease;
        border-radius: 8px;
        margin: 2px 4px;
    }

    #mobile-menu a:hover,
    #mobile-menu button:hover {
        background: rgba(0, 243, 255, 0.1);
        transform: translateX(4px);
    }

    /* Mobile events dropdown */
    #mobile-events-dropdown {
        background: rgba(40, 40, 50, 0.9);
        border-radius: 6px;
        margin-top: 4px;
        border: 1px solid rgba(0, 243, 255, 0.2);
    }

    #mobile-events-dropdown a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-left: 3px solid transparent;
        transition: all 0.2s ease;
    }

    #mobile-events-dropdown a:hover {
        border-left-color: #00f3ff;
        background: rgba(0, 243, 255, 0.05);
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .countdown-number {
        font-size: 1.25rem !important;
        padding: 0.375rem;
    }

    .countdown-label {
        font-size: 0.625rem !important;
    }

    h1.text-5xl.md\\:text-8xl {
        font-size: 2rem !important;
    }
}

/* Progress bar width classes */
.progress-fill.w-41 {
    width: 41%;
}

.progress-fill.w-48 {
    width: 48%;
}

.progress-fill.w-50 {
    width: 50%;
}

.progress-fill.w-65 {
    width: 65%;
}

/* Sponsor logo height */
.sponsor-logo {
    max-height: 60px;
}

/* 3D Canvas Mobile Responsiveness */
#hero-canvas {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

/* Mobile optimizations for 3D scene */
@media (max-width: 768px) {
    #hero-canvas {
        opacity: 0.7;
        /* Reduce opacity on mobile for better text readability */
    }
}

/* 3D Buffer Loader Styles */
#loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#loader-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-wrapper {
    perspective: 1000px;
}

.buffer-loader {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3D Animated Rings */
.buffer-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin3d 2s linear infinite;
}

.buffer-ring:nth-child(1) {
    border-top-color: #00f3ff;
    border-right-color: #00f3ff;
    animation-duration: 2s;
    animation-delay: 0s;
    width: 100px;
    height: 100px;
}

.buffer-ring:nth-child(2) {
    border-bottom-color: #9d4edd;
    border-left-color: #9d4edd;
    animation-duration: 1.5s;
    animation-delay: 0.3s;
    animation-direction: reverse;
    width: 70px;
    height: 70px;
}

.buffer-ring:nth-child(3) {
    border-top-color: #00ffff;
    border-bottom-color: #00ffff;
    animation-duration: 1s;
    animation-delay: 0.6s;
    width: 40px;
    height: 40px;
}

@keyframes spin3d {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.5), inset 0 0 20px rgba(0, 243, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(157, 78, 221, 0.7), inset 0 0 20px rgba(157, 78, 221, 0.3);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.5), inset 0 0 20px rgba(0, 243, 255, 0.2);
    }
}

.loader-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #00f3ff;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.8), 0 0 20px rgba(157, 78, 221, 0.5);
    font-family: 'Orbitron', sans-serif;
    z-index: 10;
    min-width: 60px;
    text-align: center;
}

.loader-percent {
    display: inline-block;
    min-width: 35px;
    text-align: right;
}