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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gold-gradient: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    --dark-bg: #0f0c29;
    --darker-bg: #050313;
    --card-bg: rgba(255, 255, 255, 0.03);
    --text-light: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.7);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, 
                 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", 
                 sans-serif;
    background: var(--darker-bg);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* 超级动态背景 */
.mega-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.gradient-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #0f0c29 0%, 
        #302b63 50%, 
        #24243e 100%);
}

.orbs-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: orbFloat 20s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4), transparent);
    top: -200px;
    left: -200px;
    animation-duration: 25s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 87, 108, 0.3), transparent);
    bottom: -150px;
    right: -150px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.3), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 35s;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, -100px) scale(1.1); }
    50% { transform: translate(-50px, 100px) scale(0.9); }
    75% { transform: translate(150px, 50px) scale(1.05); }
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Logo区域 - 超级炫酷 */
.logo-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: logoEntrance 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    opacity: 0;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateY(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    padding: 2rem;
}

.logo-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(102, 126, 234, 0.5),
        transparent,
        rgba(245, 87, 108, 0.5),
        transparent,
        rgba(0, 242, 254, 0.5),
        transparent
    );
    border-radius: 50%;
    filter: blur(30px);
    animation: logoRotate 8s linear infinite;
    opacity: 0.6;
}

@keyframes logoRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo-wrapper svg {
    position: relative;
    z-index: 1;
    max-width: 450px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 40px rgba(102, 126, 234, 0.6));
    transition: all 0.5s ease;
}

.logo-wrapper:hover svg {
    transform: scale(1.05);
    filter: drop-shadow(0 15px 60px rgba(245, 87, 108, 0.8));
}

/* 标题区域 - 震撼效果 */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
    animation: heroEntrance 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s forwards;
    opacity: 0;
}

@keyframes heroEntrance {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 25%,
        #f093fb 50%,
        #f5576c 75%,
        #4facfe 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.main-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(102, 126, 234, 0.8),
        transparent);
    animation: underlineGlow 3s ease-in-out infinite;
}

@keyframes underlineGlow {
    0%, 100% { opacity: 0.3; transform: scaleX(0.5); }
    50% { opacity: 1; transform: scaleX(1); }
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.8rem);
    color: var(--text-dim);
    font-weight: 300;
    letter-spacing: 0.3em;
    margin-top: 2rem;
}

/* 轮播卡片容器 - 3D效果 */
.carousel-container {
    width: 100%;
    max-width: 700px;
    perspective: 2000px;
    margin-bottom: 3rem;
    animation: carouselEntrance 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.6s forwards;
    opacity: 0;
}

@keyframes carouselEntrance {
    0% {
        opacity: 0;
        transform: translateZ(-500px) rotateX(20deg);
    }
    100% {
        opacity: 1;
        transform: translateZ(0) rotateX(0deg);
    }
}

.wisdom-carousel {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
}

.wisdom-carousel:active {
    cursor: grabbing;
}

.wisdom-card {
    position: absolute;
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 2rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: scale(0.9);
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}

.wisdom-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 70%
    );
    animation: cardShine 10s linear infinite;
}

@keyframes cardShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(360deg); }
}

.wisdom-card.active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 20px 80px rgba(102, 126, 234, 0.25);
}

.card-title {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #ffffff, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.card-content {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.8;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
    text-align: justify;
}

/* 通知提示 */
.carousel-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.carousel-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 底部 */
.footer {
    text-align: center;
    padding: 3rem 0 2rem;
    color: var(--text-dim);
    font-size: 0.95rem;
    animation: fadeIn 2s ease 1s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.footer p {
    margin: 0.5rem 0;
    letter-spacing: 0.1em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .logo-wrapper {
        padding: 1rem;
    }

    .logo-wrapper svg {
        max-width: 280px;
    }

    .hero-section {
        margin-bottom: 2rem;
    }

    .subtitle {
        letter-spacing: 0.2em;
    }

    .carousel-container {
        margin-bottom: 2rem;
        max-width: 100%;
    }

    .wisdom-carousel {
        min-height: 300px;
    }

    .wisdom-card {
        padding: 1.8rem 1.5rem;
        border-radius: 20px;
    }

    .footer {
        padding: 2rem 0 1rem;
        font-size: 0.85rem;
    }

    .orb-1, .orb-2, .orb-3 {
        filter: blur(60px);
    }
}

@media (max-width: 480px) {
    .logo-wrapper svg {
        max-width: 220px;
    }

    .wisdom-card {
        padding: 1.5rem 1.2rem;
    }

    .card-content {
        line-height: 1.7;
    }
    
    .wisdom-carousel {
        min-height: 320px;
    }
}

/* 加载动画 */
.page-loader {
    /* 即使 JS 失效，也会在短时间内自动隐藏，避免卡在“加载中” */
    animation: loaderAutoHide 0.6s ease forwards;
    animation-delay: 2.6s;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-content p {
    color: rgba(255,255,255,0.7);
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}



/* ====== 2026 天文奇观卡片增强 ====== */
.event-meta{
    display:flex;
    gap: 12px;
    align-items:center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.event-date{
    font-size: 0.95rem;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

.event-countdown{
    font-size: 0.9rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
}

.wisdom-card.next-up .event-countdown{
    border-color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.10);
}

.card-tips{
    margin-top: 1rem;
    font-size: 0.98rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.88);
}

.card-src{
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
}

/* 系统“减少动效”时自动降级 */
@media (prefers-reduced-motion: reduce){
    .orb, .star, .logo-wrapper, .wisdom-card, .main-title{
        animation: none !important;
        transition: none !important;
    }
}


@keyframes loaderAutoHide {
    to { opacity: 0; visibility: hidden; }
}

/* 筛选/搜索 */
.controls-bar{
    /* 与轮播卡片同宽，避免“搜索框很宽、卡片很窄”的不协调 */
    width: 100%;
    max-width: 700px;
    margin: 0 auto 18px;
    display: grid;
    gap: 10px;
}
.search-wrap{ width: 100%; }

.search-input{
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    outline: none;
    backdrop-filter: blur(10px);
}
.search-input::placeholder{ color: rgba(255,255,255,0.55); }
.toggle-wrap{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.toggle-btn{
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.86);
    cursor: pointer;
}
.toggle-btn.active{
    border-color: rgba(255,255,255,0.32);
    background: rgba(255,255,255,0.12);
}
.controls-hint{
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255,255,255,0.62);
}

/* 筛选隐藏 */
.wisdom-card.is-filter-hidden{ display:none !important; }

/* 悬浮倒计时条 */
.next-event-bar{
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
    width: min(980px, 92vw);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(10, 12, 28, 0.55);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 50;
}
.neb-left{ display:flex; gap:8px; align-items:center; min-width: 0; }
.neb-label{ color: rgba(255,255,255,0.65); font-size: 12px; }
.neb-title{
    color: rgba(255,255,255,0.92);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52vw;
}
.neb-right{ display:flex; gap:10px; align-items:center; }
.neb-countdown{ color: rgba(255,255,255,0.92); font-size: 12px; }
.neb-jump{
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    cursor: pointer;
}
.neb-jump:active{ transform: translateY(1px); }

@media (prefers-reduced-motion: reduce){
    .page-loader{ animation: none; }
}


/* ====== Next Up 主推荐区 ====== */
.nextup-section{
    width: 100%;
    max-width: 700px;
    margin: 0 auto 18px;
}
.nextup-card{
    border-radius: 26px;
    padding: 18px 18px 16px;
    background: rgba(20, 24, 64, 0.40);
    border: 1px solid rgba(120, 170, 255, 0.22);
    box-shadow: 0 20px 70px rgba(0,0,0,.25);
    backdrop-filter: blur(10px);
}
.nextup-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.nextup-meta{
    display:flex;
    align-items:center;
    gap: 10px;
    flex-wrap: wrap;
}
.nextup-badge{
    font-size: 12px;
    letter-spacing: .08em;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.14);
}
.nextup-date{
    opacity: .85;
    font-size: 13px;
}
.nextup-countdown{
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.14);
    white-space: nowrap;
}
.nextup-title{
    font-size: 26px;
    line-height: 1.15;
    margin: 2px 0 8px;
}
.nextup-desc{
    opacity: .92;
    margin: 0 0 8px;
    line-height: 1.65;
}
.nextup-tips{
    opacity: .82;
    margin: 0 0 12px;
    line-height: 1.65;
}
.nextup-actions{
    display:flex;
    justify-content:flex-end;
}
.nextup-btn{
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: inherit;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
}
.nextup-btn:hover{
    background: rgba(255,255,255,.12);
}

/* ====== 控件区升级（对齐卡片宽度） ====== */
.controls-bar{
    width: 100%;
    max-width: 700px;
    margin: 0 auto 18px;
}
.filters-grid{
    display: grid;
    gap: 10px;
}
.type-tabs{
    display:flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tab-btn{
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.06);
    color: inherit;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
}
.tab-btn.active{
    background: rgba(120, 170, 255, 0.22);
    border-color: rgba(120, 170, 255, 0.38);
}
.right-filters{
    display:flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
.select{
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.06);
    color: inherit;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
}

.select{
    -webkit-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.8) 50%),
                      linear-gradient(135deg, rgba(255,255,255,.8) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}
.select:focus{
    border-color: rgba(255,255,255,.28);
    box-shadow: 0 0 0 3px rgba(79,172,254,.18);
}
.select option, .select optgroup{
    background: #0b1230;
    color: #ffffff;
}

.range-tabs{
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
}
.range-btn{
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.06);
    color: inherit;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
}
.range-btn.active{
    background: rgba(120, 170, 255, 0.22);
    border-color: rgba(120, 170, 255, 0.38);
}
.sr-only{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}
@media (max-width: 520px){
    .nextup-title{ font-size: 22px; }
    .right-filters{ justify-content:flex-start; }
}
