/* ===== 全局变量 ===== */
:root {
    --bg-primary: #0a0c14;
    --bg-secondary: #141822;
    --bg-card: #1e2430;
    --text-primary: #ffffff;
    --text-secondary: #a0a8b8;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --online: #10b981;
    --building: #f59e0b;
    --border: #2a3142;
}

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== Hero 区 ===== */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-radius: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border);
    animation: fadeIn 1s ease;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    display: block;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* ===== 模块网格 ===== */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* 卡片样式 */
.card {
    background: var(--bg-card);
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    animation: cardFadeIn 0.5s ease forwards;
    opacity: 0;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-name {
    font-size: 1.2rem;
    font-weight: 600;
    flex: 1;
}

.card-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    border-radius: 1rem;
    background: var(--bg-secondary);
}

.card-status.online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--online);
}

.card-status.building {
    background: rgba(245, 158, 11, 0.2);
    color: var(--building);
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.card-link:hover {
    text-decoration: underline;
}

/* 卡片动画延迟 */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 状态栏 ===== */
.status-bar {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: var(--online);
    box-shadow: 0 0 10px var(--online);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

.footer p {
    margin: 0.5rem 0;
}

/* ===== 响应式设计 ===== */
/* 桌面默认已经是3列 (min-width: 1024px) */

/* 平板 (768px - 1023px) 2列 */
@media (max-width: 1023px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

/* 手机 (小于 768px) 1列 */
@media (max-width: 767px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .app {
        padding: 1rem;
    }
}

/* ===== 全局淡入动画 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 公告轮播区样式 ===== */
.carousel-container {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 2rem;
    padding: 2rem;
    margin: 2rem 0 3rem;
    border: 1px solid var(--border);
    animation: fadeIn 0.5s ease;
}

.carousel {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.carousel-item {
    width: 100%;
}

.carousel-title {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.carousel-content {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.carousel-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.carousel-arrow.left {
    left: -20px;
}

.carousel-arrow.right {
    right: -20px;
}

/* ===== 卡片悬停效果增强 ===== */
.card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ===== 状态标签动态化 ===== */
.card-status.online {
    animation: pulse 2s infinite;
}

.card-status.building {
    animation: flicker 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes flicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    }
}

/* ===== 响应式调整 ===== */
@media (max-width: 767px) {
    .carousel-container {
        padding: 1.5rem;
    }
    
    .carousel-arrow.left {
        left: -10px;
    }
    
    .carousel-arrow.right {
        right: -10px;
    }
}

/* ===== 暴力增强版（确保生效）===== */
.card {
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card:hover {
    transform: translateY(-10px) scale(1.05) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 30px 50px rgba(59, 130, 246, 0.5) !important;
}

.card-status.online {
    animation: pulse 1.5s infinite !important;
}

.card-status.building {
    animation: flicker 1s infinite !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(16, 185, 129, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes flicker {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
    }
    50% {
        opacity: 0.5;
        text-shadow: 0 0 15px rgba(245, 158, 11, 0.8);
    }
}
/* ===== 强制高优先级样式 ===== */
.high-priority {
    border-left: 3px solid #ff9800 !important;
}
.high-priority h3 {
    color: #ffb74d !important;
}