/* ===== 全局样式（图集/历史/详情页通用，青蓝主色调） ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(145deg, #0a171e 0%, #142e38 100%);
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    padding: 1.5rem 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* ===== 卡片容器 ===== */
.card {
    max-width: 1200px;
    width: 100%;
    background: rgba(16, 34, 42, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 8px;
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(80, 180, 200, 0.12);
    padding: 2rem 2rem 1.5rem;
    border: 1px solid rgba(100, 190, 210, 0.08);
}

/* 详情页（cyd/bmc）使用更宽的卡片 */
.card.card-wide {
    max-width: 1300px;
}

/* ===== 头部 ===== */
.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid rgba(70, 160, 180, 0.2);
    padding-bottom: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    font-size: 2.2rem;
    color: #8acadc;
    filter: drop-shadow(0 0 5px #348ca5);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ccecf8, #78c0d6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(50, 170, 200, 0.15);
    line-height: 1.2;
}

.badge {
    background: rgba(40, 130, 160, 0.2);
    padding: 0.4rem 1.2rem;
    border-radius: 6px;
    border: 1px solid rgba(90, 180, 200, 0.25);
    color: #b6dce8;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(2px);
}
.badge i {
    color: #70c4da;
}

/* 返回按钮 */
.back-link {
    color: #b6dce8;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(90, 180, 200, 0.2);
    padding: 0.3rem 1rem;
    border-radius: 6px;
    transition: 0.15s;
}
.back-link:hover {
    background: rgba(40, 130, 160, 0.15);
    border-color: #4a9eb3;
}

/* 描述文字 */
.page-desc {
    color: #b7dce8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-desc i {
    color: #5ab4ca;
}

/* ===== 画廊网格 ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(60, 160, 180, 0.15);
    transition: transform 0.2s ease, border-color 0.2s;
    background: rgba(0, 0, 0, 0.25);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: #4a9eb3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.2s;
}

.gallery-item:hover img {
    filter: brightness(1.05);
}

/* 图片占位（无图片或加载失败时显示） */
.placeholder-img {
    color: #6f9faf;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.placeholder-img i {
    font-size: 2.5rem;
    color: #3a7f8f;
}

/* 详情页内嵌的小尺寸画廊 */
.gallery-grid.grid-sm {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
    margin: 0;
}

/* ===== 模态框（Lightbox） ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(100, 190, 210, 0.2);
    object-fit: contain;
    background: #0a171e;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: transform 0.2s;
    z-index: 1000;
    opacity: 0.7;
}
.modal-close:hover {
    transform: rotate(90deg);
    opacity: 1;
}

.modal-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #cde4ed;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(100, 190, 210, 0.15);
    white-space: nowrap;
}

/* ===== 视频占位区 ===== */
.video-placeholder {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(8, 26, 32, 0.5);
    border-radius: 6px;
    border: 1px dashed rgba(60, 160, 180, 0.25);
    text-align: center;
    color: #8fcbd8;
}
.video-placeholder iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 4px;
}

/* ===== 两栏布局（详情页 cyd/bmc） ===== */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    margin-top: 0.2rem;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.info-card {
    background: rgba(8, 26, 32, 0.6);
    border-radius: 6px;
    padding: 1.2rem 1.2rem;
    border: 1px solid rgba(60, 160, 180, 0.08);
    backdrop-filter: blur(4px);
}

.info-card h3 {
    color: #addcec;
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px dashed rgba(70, 160, 180, 0.15);
    padding-bottom: 0.4rem;
}
.info-card h3 i {
    color: #5cbad2;
    width: 1.6rem;
    font-size: 1.1rem;
}

.desc-text {
    color: #cde4ed;
    line-height: 1.7;
    font-size: 0.98rem;
}
.desc-text p {
    margin-bottom: 0.5rem;
}
.desc-text strong {
    color: #b0e4f0;
}
.desc-text .tag {
    display: inline-block;
    background: #12303b;
    padding: 0.1rem 0.7rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #95c8db;
    border: 1px solid #286a7a;
    font-weight: 400;
    margin-right: 4px;
}

.download-btn {
    background: #1a5968;
    border: none;
    color: white;
    padding: 0.6rem 1.4rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.12s;
    border: 1px solid #36869b;
    text-decoration: none;
    margin-top: 0.8rem;
}
.download-btn:hover {
    background: #297a8d;
    border-color: #5bb0c7;
}
.download-btn:active {
    transform: scale(0.96);
}
.download-btn i {
    font-size: 1rem;
}

/* 右栏：图集容器 */
.gallery-section {
    background: rgba(8, 26, 32, 0.6);
    border-radius: 6px;
    padding: 1.2rem 1.2rem;
    border: 1px solid rgba(60, 160, 180, 0.08);
}

.gallery-section h3 {
    color: #addcec;
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px dashed rgba(70, 160, 180, 0.15);
    padding-bottom: 0.4rem;
}
.gallery-section h3 i {
    color: #5cbad2;
    width: 1.6rem;
    font-size: 1.1rem;
}

/* ===== 历史服务器入口卡片（hist/index） ===== */
.history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 0.5rem 0 1rem;
}

.history-card {
    background: rgba(8, 26, 32, 0.6);
    border-radius: 6px;
    padding: 1.5rem 1.5rem 1.2rem;
    border: 1px solid rgba(60, 160, 180, 0.1);
    transition: border-color 0.2s, transform 0.15s;
    display: flex;
    flex-direction: column;
}

.history-card:hover {
    border-color: rgba(90, 180, 200, 0.35);
    transform: translateY(-3px);
}

.history-card .server-icon {
    font-size: 2.2rem;
    color: #68c4da;
    margin-bottom: 0.4rem;
}

.history-card h3 {
    color: #d4ecf5;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.history-card .version-tag {
    display: inline-block;
    background: #12303b;
    padding: 0.1rem 0.7rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #95c8db;
    border: 1px solid #286a7a;
    font-weight: 400;
    margin-bottom: 0.6rem;
    align-self: flex-start;
}

.history-card .desc {
    color: #c8dfe8;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}
.history-card .desc strong {
    color: #b0e4f0;
}

.history-card .btn-visit {
    background: #1a5968;
    border: none;
    color: white;
    padding: 0.45rem 1.2rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.12s;
    border: 1px solid #36869b;
    text-decoration: none;
    align-self: flex-start;
    margin-top: 0.2rem;
}
.history-card .btn-visit:hover {
    background: #297a8d;
    border-color: #5bb0c7;
}
.history-card .btn-visit:active {
    transform: scale(0.96);
}
.history-card .btn-visit i {
    font-size: 0.85rem;
}

/* ===== 页脚 ===== */
.footnote {
    margin-top: 2rem;
    color: #6f9faf;
    font-size: 0.75rem;
    text-align: center;
    border-top: 1px solid rgba(60, 140, 160, 0.12);
    padding-top: 1.2rem;
    letter-spacing: 0.3px;
}
.footnote i {
    margin: 0 3px;
    color: #55acc0;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .grid-2col {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .card {
        padding: 1.2rem 0.9rem;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .gallery-grid.grid-sm {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 860px) {
    .history-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .history-card {
        padding: 1.2rem;
    }
    .history-card h3 {
        font-size: 1.2rem;
    }
    .badge {
        font-size: 0.75rem;
        padding: 0.2rem 1rem;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    .modal-close {
        top: 1rem;
        right: 1.2rem;
        font-size: 2rem;
    }
    .modal-caption {
        font-size: 0.8rem;
        padding: 0.2rem 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.3rem;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.6rem;
    }
    .gallery-grid.grid-sm {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.6rem;
    }
    .history-card .desc {
        font-size: 0.85rem;
    }
    .history-card .btn-visit {
        font-size: 0.8rem;
        padding: 0.35rem 1rem;
    }
}
