/* style.css - Activity Page with Global 3D Canvas */
:root {
    --primary: #2ad4ff;
    --primary-dark: #1aa0c0;
    --secondary: #ffd966;
    --dark: #02121c;
    --dark-light: #0a2835;
    --text: #e6f3ff;
    --text-muted: #9bb7d4;
    --gradient: linear-gradient(135deg, #2ad4ff, #7b68ee);
    --card-bg: rgba(10, 40, 55, 0.7);
    --navbar-bg: rgba(2, 18, 28, 0.85);
    --border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================= */
/* 全局3D画布容器 */
/* ========================================= */
#global-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

#global-canvas canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ========================================= */
/* 导航栏切换按钮 */
/* ========================================= */
.nav-toggle-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

/* ========================================= */
/* 侧边导航栏 */
/* ========================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--navbar-bg);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border);
    padding: 80px 30px 30px 30px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateX(0);
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 50px;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo:hover {
    transform: scale(1.05) translateY(-2px);
    text-shadow: 0 4px 12px rgba(42, 212, 255, 0.4);
}

.logo-icon {
    font-size: 1.8rem;
    display: inline-block;
    animation: iconFloat 3.5s ease-in-out infinite;
}

.logo-highlight {
    color: var(--primary);
    margin-left: 4px;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-6px) rotate(5deg);
    }
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    transform: translateX(8px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 20px;
}

/* ========================================= */
/* 主要内容区域 */
/* ========================================= */
.activity-main {
    position: relative;
    margin-left: 280px;
    transition: margin-left 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    min-height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.sidebar.hidden ~ .activity-main {
    margin-left: 0;
}

/* 覆盖层内容 - 可选文字 */
.overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    pointer-events: auto;  /* 改为 auto，允许点击事件 */
}

.page-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: -2px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(42, 212, 255, 0.3);
    animation: titleGlow 3s ease-in-out infinite;
    cursor: pointer;  /* 确保鼠标显示为手型 */
    transition: transform 0.3s ease, opacity 0.5s ease;  /* 添加过渡效果 */
}

.page-title:hover {
    transform: scale(1.05);
    text-shadow: 0 0 50px rgba(42, 212, 255, 0.8);
}
@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(42, 212, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 40px rgba(42, 212, 255, 0.6);
    }
}

/* ========================================= */
/* 移动端响应式 */
/* ========================================= */
@media (max-width: 768px) {
    .nav-toggle-btn {
        top: 12px;
        left: auto;
        right: 16px;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 16px 60px 16px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        transform: translateY(0);
    }

    .sidebar.hidden {
        transform: translateY(-100%);
    }

    .logo {
        margin-bottom: 16px;
        font-size: 1.3rem;
    }

    .nav-links {
        flex-direction: row;
        overflow-x: auto;
        gap: 20px;
        padding-bottom: 8px;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        white-space: nowrap;
        font-size: 1rem;
    }

    .nav-link:hover,
    .nav-link.active {
        transform: translateX(0);
    }

    .activity-main {
        margin-left: 0;
    }
}

/* 在 style.css 中添加 */
@keyframes hoverGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(42, 212, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(42, 212, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(42, 212, 255, 0);
    }
}

#hover-activity-panel {
    animation: hoverGlow 1.5s ease-in-out infinite;
}