:root {
    --bg-color: #050510;
    --text-color: #e0e0e0;
    --primary-color: #00f3ff;
    /* Neon Cyan */
    --accent-color: #ff9900;
    /* Maple Orange */
    --glass-bg: rgba(20, 20, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Noto Sans TC', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Background Effects --- */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    transform: perspective(500px) rotateX(20deg) scale(1.5);
    transform-origin: top center;
    animation: grid-move 20s linear infinite;
}

.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(255, 153, 0, 0.05), transparent 70%);
    z-index: -1;
}

@keyframes grid-move {
    0% {
        transform: perspective(500px) rotateX(20deg) scale(1.5) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(20deg) scale(1.5) translateY(50px);
    }
}

/* --- Typography --- */
h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    /* Ensures nav stays at the top */
    left: 0;
    /* Ensures nav stays at the left */
    width: 100%;
    z-index: 9999;
    /* Increased z-index */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-toggle {
    display: none;
    /* Hidden on desktop */
    font-size: 2rem;
    color: white;
    cursor: pointer;
    padding: 10px;
    /* Increase touch target */
}

.logo {
    font-family: 'Zen Maru Gothic', sans-serif;
    /* Cute font */
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.5);
}

.monster-img {
    height: 50px;
    /* Slightly larger */
    width: auto;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
    border-radius: 5px;
    /* Soften edges if square */
}

.nav-logo-img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.version {
    color: var(--accent-color);
    font-size: 0.8em;
    padding: 2px 6px;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    color: #aaa;
    position: relative;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Zen Maru Gothic', sans-serif;
    /* Cute font */
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 6px 18px;
    border-radius: 50px;
    /* Round pill shape */
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff00;
    animation: blink 1s infinite alternate;
}

.online-count {
    color: var(--primary-color);
    font-weight: bold;
}

/* --- Hero Section --- */
.hero {
    /* min-height: 100vh; Removed to allow content to stacking up */
    display: flex;
    align-items: flex-start;
    /* Changed from center to pull content up */
    justify-content: space-between;
    padding: 150px 10% 80px;
    /* Add some bottom padding back */
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.subtitle {
    font-size: 1.5rem;
    /* Larger subtitle */
    color: var(--primary-color);
    letter-spacing: 2px;
    margin-bottom: 20px;
    display: flex;
    /* Align text and logo */
    align-items: center;
    gap: 15px;
    font-family: 'Zen Maru Gothic', sans-serif;
}

.inline-logo {
    height: 60px;
    /* Adjust height */
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 105, 180, 0.6));
    /* Pink glow for the cute logo */
    animation: float 3s ease-in-out infinite;
}

.main-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent-color);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--primary-color);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.news-icon {
    height: 60px;
    /* Adjust based on preference */
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    transform: rotate(5deg);
    /* Slight tilt for fun */
}

.description {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 40px;
    max-width: 600px;
}

.highlight-text {
    color: var(--accent-color);
    font-weight: bold;
}

.cta-group {
    display: flex;
    gap: 20px;
}

.btn-primary,
.btn-secondary,
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #ff9900, #ff5500);
    color: white;
    border: none;
    box-shadow: 0 0 20px rgba(255, 153, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(255, 153, 0, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.btn-download {
    background: var(--accent-color);
    color: white;
    padding: 8px 18px;
    font-size: 0.9rem;
    border-radius: 4px;
    border: none;
}

/* --- Hero Visual (Video) --- */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    position: relative;
    perspective: 1000px;
}

.video-frame {
    width: 560px;
    height: 315px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: 0.5s;
    background: #000;
}

.video-frame:hover {
    transform: rotateY(0) rotateX(0) scale(1.02);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.4);
    border-color: var(--accent-color);
}

.frame-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.5);
    pointer-events: none;
    z-index: 2;
}

/* --- Reward Showcase Divider --- */
.reward-showcase {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px 5%;
    margin-top: -60px;
    /* Slight overlap */
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.reward-item {
    flex: 1;
    max-width: 350px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: 0.3s;
    border: 2px solid transparent;
}

.reward-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(255, 153, 0, 0.4);
}

.reward-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: 0.3s;
}

/* Responsive adjustment */
@media (max-width: 900px) {
    .reward-showcase {
        flex-direction: column;
        align-items: center;
    }

    .reward-item {
        width: 90%;
        max-width: none;
    }
}

/* --- News Section --- */
.news-section {
    padding: 80px 10%;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: white;
}

.section-header .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.news-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.tab {
    background: transparent;
    border: 1px solid transparent;
    color: #888;
    padding: 5px 15px;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: 0.3s;
}

.tab.active,
.tab:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2) inset;
}

.news-list {
    list-style: none;
}

.news-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.news-list li:hover {
    background: rgba(255, 255, 255, 0.02);
    padding-left: 10px;
}

.tag {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 2px;
    margin-right: 15px;
    color: white;
}

.tag.event {
    background: #ff4757;
}

.tag.update {
    background: var(--primary-color);
    color: black;
}

.tag.notice {
    background: #ffa502;
}

.news-list a {
    flex: 1;
    color: #e0e0e0;
}

.news-list .date {
    color: #666;
    font-size: 0.9rem;
}

/* --- Features Section --- */
.features-section {
    padding: 50px 10% 100px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 40px rgba(255, 153, 0, 0.1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: 0.3s;
}

.glass-card:hover::before {
    opacity: 1;
}

.icon-box ion-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.glass-card h3 {
    margin-bottom: 15px;
    color: white;
    font-size: 1.5rem;
}

.glass-card p {
    color: #aaa;
    font-size: 0.95rem;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 50px 10%;
    background: rgba(0, 0, 0, 0.8);
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links ion-icon {
    font-size: 1.5rem;
    color: #666;
    transition: 0.3s;
}

.social-links ion-icon:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* --- Animations --- */
@keyframes blink {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(60px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 40px, 0);
    }

    80% {
        clip: rect(30px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(70px, 9999px, 30px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(60px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(30px, 9999px, 70px, 0);
    }

    40% {
        clip: rect(90px, 9999px, 5px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    80% {
        clip: rect(50px, 9999px, 20px, 0);
    }

    100% {
        clip: rect(20px, 9999px, 90px, 0);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        /* Show hamburger on mobile */
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
        max-height: 80vh;
        /* Limit height */
        overflow-y: auto;
        /* Enable scrolling */
    }

    .nav-links.active {
        display: flex;
        /* Show menu when active */
    }

    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        /* Dropdowns flow naturally in mobile menu */
        background: transparent;
        border: none;
        padding-left: 0;
        box-shadow: none;
        display: block;
        /* Always show dropdown items or handle via JS if too long */
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .dropdown-menu li {
        margin: 10px 0;
    }

    .dropdown-menu a {
        font-size: 0.9rem;
        color: #aaa;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .cta-group {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }
}

.news-icon {
    height: 40px;
    width: auto;
    vertical-align: middle;
    margin-right: 15px;
    margin-left: 0;
}