/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8edf3 100%);
    min-height: 100vh;
    padding-bottom: 70px;
}

/* ========== 全局标题 ========== */
.global-header {
    text-align: center;
    padding: 2rem 1rem 2rem 1rem;
    margin-bottom: 1.5rem;
}
.global-header h1 {
    font-size: 2.5rem;
    color: #1a2c3e;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1a2c3e 0%, #2c4c6e 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.global-header p {
    color: #5b7a9a;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* 左右布局容器 */
.app {
    display: flex;
    align-items: flex-start;
    max-width: 1600px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

/* ========== 左侧筛选栏 ========== */
.filters-sidebar {
    width: 260px;
    background: #ffffff;
    border-radius: 1rem;
    margin-left: 1rem;
    padding: 1.2rem 1rem;
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(203, 213, 225, 0.4);
}
.sidebar-header {
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #eef2f8;
}
.sidebar-header h3 {
    font-size: 1rem;
    color: #1e3a5f;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.filter-group {
    margin-bottom: 1rem;
}
.filter-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a627a;
    margin-bottom: 0.3rem;
    letter-spacing: 0.3px;
}
.filter-group select {
    width: 100%;
    background: #f9fbfd;
    border: 1px solid #dce5ec;
    border-radius: 0.6rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
    color: #1e2a3e;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}
.filter-group select:hover {
    border-color: #80b5e0;
    background: #ffffff;
}
.filter-group select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
.reset-btn {
    width: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e9eef3 100%);
    border: 1px solid #d0dae5;
    border-radius: 0.6rem;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c4c6e;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}
.reset-btn:hover {
    background: linear-gradient(135deg, #e9eef3 0%, #e0e7ef 100%);
    border-color: #a0b4c8;
    transform: translateY(-1px);
}

/* ========== 右侧主内容区 ========== */
.main-content {
    flex: 1;
    padding: 0 1.5rem 1.5rem 1.5rem;
    min-width: 0;
}

/* 卡片网格 */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

/* 卡片 */
.server-card {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #eef2f8;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.server-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.15);
    border-color: #d9e2ef;
}
.card-header {
    background: #fafdff;
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid #eff3f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.room-name {
    font-size: 0.95rem;
    font-weight: 700;
    background: #eef3ff;
    padding: 0.2rem 0.8rem;
    border-radius: 2rem;
    color: #1e4a76;
}

/* ========== 库存颜色样式 ========== */
.stock {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-weight: 500;
}
/* 充足 - 绿色 */
.stock.sufficient {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}
/* 售罄 - 红色 */
.stock.soldout {
    background: #ffebee;
    color: #c62828;
}
/* 上架中 - 橙色 */
.stock.coming {
    background: #fff8e1;
    color: #f57c00;
}
/* 低库存（≤2台）- 红色 */
.stock.low {
    background: #ffebee;
    color: #c62828;
}
/* 正常库存 - 蓝色 */
.stock.normal {
    background: #e3f2fd;
    color: #1565c0;
}
/* 中等库存 - 橙色 */
.stock.medium {
    background: #fff3e0;
    color: #ef6c00;
}

.card-body {
    padding: 0.55rem 0.9rem;
}
.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px dashed #f0f4fa;
    font-size: 0.85rem;
}
.spec-label {
    color: #6b7f96;
    font-weight: 450;
}
.spec-value {
    font-weight: 500;
    color: #1e2f3e;
    text-align: right;
}
.price-row {
    margin-top: 0.55rem;
    display: flex;
    justify-content: space-between;
    background: #f8fbfe;
    padding: 0.4rem 0.7rem;
    border-radius: 0.7rem;
    border: 1px solid #ecf3f9;
}
.price-month, .price-year {
    font-weight: 700;
    font-size: 0.85rem;
}
.price-month span:first-child, .price-year span:first-child {
    font-size: 0.65rem;
    font-weight: normal;
    color: #6b7f96;
}
.price-month span:last-child {
    color: #1e5a8a;
    font-size: 0.95rem;
}
.price-year span:last-child {
    color: #2c6e2c;
    font-size: 0.9rem;
}

/* ========== 联系方式固定在底部 ========== */
.contact-bar-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    padding: 0.7rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    font-size: 0.85rem;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.contact-bar-fixed span {
    color: #4a627a;
}
.contact-bar-fixed strong {
    background: #eef3ff;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    color: #1e4a76;
}

.no-result {
    text-align: center;
    padding: 2rem;
    background: #ffffff;
    border-radius: 1rem;
    color: #6b7f96;
    grid-column: 1 / -1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* ========== 手机端 ========== */
@media (max-width: 768px) {
    body {
        padding-bottom: 100px;
    }
    .global-header {
        padding: 1.2rem 1rem 1.2rem 1rem;
        margin-bottom: 1rem;
    }
    .global-header h1 {
        font-size: 1.8rem;
    }
    .global-header p {
        font-size: 0.85rem;
    }
    .app {
        flex-direction: column;
        min-height: auto;
    }
    .filters-sidebar {
        width: 100%;
        margin-left: 0;
        margin-bottom: 1rem;
        position: static;
        border-radius: 1rem;
    }
    .main-content {
        padding: 0 0.5rem 1rem 0.5rem;
    }
    .servers-grid {
        gap: 0.8rem;
    }
    .spec-item {
        font-size: 0.8rem;
        padding: 0.25rem 0;
    }
    .contact-bar-fixed {
        font-size: 0.7rem;
        gap: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
}