/* ===== 基础 & 全局 ===== */
html {
    scroll-behavior: smooth;
}
body {
    color: #111827;
}

/* ===== 工具类（补全） ===== */
.text-readable {
    color: #4b5563 !important;
}
.card-description {
    color: #374151 !important;
    line-height: 1.5;
}
.btn-clear-fix {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* ===== Hero ===== */
.hero-section {
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 15, 31, 0.82) 0%, rgba(7, 15, 31, 0.58) 42%, rgba(7, 15, 31, 0.18) 100%),
        linear-gradient(180deg, rgba(7, 15, 31, 0.3) 0%, rgba(7, 15, 31, 0.78) 100%);
}
.hero-section > div {
    position: relative;
    z-index: 1;
}
.hero-copy {
    animation: heroIn 0.75s ease-out both;
}
.hero-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.55rem 0.85rem;
    backdrop-filter: blur(10px);
}
@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 卡片悬停 ===== */
.feature-card,
.team-member,
#faq .bg-white,
#rules .bg-white,
.status-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.feature-card:hover,
.team-member:hover,
#faq .bg-white:hover,
#rules .bg-white:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}
.join-section {
    background:
        radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.16), transparent 34rem),
        #eff6ff;
}
.status-card {
    transition: all 0.2s ease;
}

/* ===== 骨架屏 ===== */
.skeleton-pulse {
    background: linear-gradient(90deg, #e0e0e0 25%, #d0d0d0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}
@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== 音乐控制 ===== */
#musicControl {
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}
#musicControl:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.55);
}
#musicControl:active {
    transform: scale(0.94);
}
#musicControl.playing {
    animation: musicPulse 2s ease-in-out infinite;
}
@keyframes musicPulse {
    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 4px 40px rgba(37, 99, 235, 0.7), 0 0 60px rgba(37, 99, 235, 0.2);
    }
}
#musicControl .fa-music {
    transition: transform 0.3s ease;
}
#musicControl.playing .fa-music {
    animation: noteSpin 4s linear infinite;
}
@keyframes noteSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.music-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 50%;
    transform: translateX(50%);
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(4px);
}
#musicControl:hover .music-tooltip {
    opacity: 1;
}

/* ===== 移动端汉堡菜单 ===== */
#mobileMenu {
    position: fixed;
    inset: 0;
    z-index: 60;
    visibility: hidden;
    pointer-events: none;
}
#mobileMenu.menu-open {
    visibility: visible;
    pointer-events: auto;
}
#mobileMenu .menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.32s ease;
    pointer-events: none;
}
#mobileMenu.menu-open .menu-overlay {
    opacity: 1;
    pointer-events: auto;
}
#mobileMenu .menu-panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 280px;
    max-width: 85vw;
    background: #ffffff;
    box-shadow: -6px 0 40px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    overflow-y: auto;
}
#mobileMenu.menu-open .menu-panel {
    transform: translateX(0);
}
#mobileMenu .menu-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}
#mobileMenu .menu-close-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #4b5563;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}
#mobileMenu .menu-close-btn:hover {
    background: #f3f4f6;
    color: #111827;
}
#mobileMenu .menu-close-btn:active {
    transform: scale(0.92);
}
#mobileMenu .menu-links {
    flex: 1 1 auto;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
#mobileMenu .menu-links a {
    display: block;
    padding: 0.7rem 0.75rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: #1f2937;
    border-radius: 10px;
    transition: background 0.18s, color 0.18s, transform 0.15s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
#mobileMenu .menu-links a:hover {
    background: #eff6ff;
    color: #2563eb;
}
#mobileMenu .menu-links a:active {
    transform: scale(0.97);
    background: #dbeafe;
}
#mobileMenu .menu-footer {
    flex-shrink: 0;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}
#mobileMenu .menu-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem 0;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
#mobileMenu .menu-copy-btn:hover {
    background: #1d4ed8;
}
#mobileMenu .menu-copy-btn:active {
    transform: scale(0.97);
}
#mobileMenu .menu-copy-btn.copied {
    background: #16a34a;
}
body.menu-open-state {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    nav .h-16 {
        gap: 0.75rem;
    }
    .hero-section {
        min-height: 760px;
        background-position: 45% center !important;
    }
    .hero-section::before {
        background: linear-gradient(180deg, rgba(7, 15, 31, 0.72) 0%, rgba(7, 15, 31, 0.88) 100%);
    }
    .hero-meta span {
        width: 100%;
        justify-content: center;
    }
    #musicControl {
        width: 44px;
        height: 44px;
        font-size: 18px;
        bottom: 80px;
        right: 16px;
    }
    #backToTop {
        width: 44px;
        height: 44px;
        font-size: 18px;
        bottom: 16px;
        right: 16px;
    }
}
@media (max-width: 380px) {
    #mobileMenu .menu-panel {
        width: 260px;
        padding: 1.25rem 1.25rem;
    }
    #mobileMenu .menu-links a {
        font-size: 0.95rem;
        padding: 0.6rem 0.6rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    #mobileMenu .menu-overlay,
    #mobileMenu .menu-panel,
    #mobileMenu .menu-links a,
    #mobileMenu .menu-copy-btn {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    #mobileMenu .menu-panel {
        transition: none;
    }
    #mobileMenu.menu-open .menu-panel {
        transform: translateX(0);
    }
    #mobileMenu .menu-overlay {
        transition: none;
    }
    #mobileMenu.menu-open .menu-overlay {
        opacity: 1;
    }
    body.menu-open-state {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}