/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 页眉样式 */
.header {
    background: #fff;
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    color: #1e293b;
}

.logo-highlight {
    color: #10b981;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: #10b981;
}

.telegram-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #3b82f6 !important;
}

/* 主体内容 */
.main-content {
    padding: 3rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 类型切换 Tabs */
.type-tabs {
    display: flex;
    justify-content: center;
    background: #fff;
    width: fit-content;
    margin: 0 auto 2.5rem;
    border-radius: 99px;
    padding: 0.4rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.type-btn {
    border: none;
    background: transparent;
    padding: 0.6rem 2rem;
    border-radius: 99px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s;
}

.type-btn.active {
    background: #1e293b;
    color: #fff;
}

.product-panel.hidden {
    display: none;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* 产品卡片 */
.product-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.badge {
    background: #ecfdf5;
    color: #059669;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.specs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.spec-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.spec-item .icon {
    width: 1.5rem;
    margin-right: 0.75rem;
    display: flex;
    justify-content: center;
    opacity: 0.7;
}

.spec-item .label {
    color: #94a3b8;
    width: 4rem;
}

.spec-item .value {
    color: #334155;
    flex: 1;
    text-align: right;
    font-weight: 500;
}

.price-section {
    margin-top: auto;
    margin-bottom: 1.5rem;
}

.price-section .currency {
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 600;
}

.price-section .amount {
    font-size: 2rem;
    color: #1e293b;
    font-weight: 800;
}

.price-section .unit {
    font-size: 0.9rem;
    color: #94a3b8;
}

.order-btn {
    width: 100%;
    background: #1e293b;
    color: #fff;
    border: none;
    padding: 0.8rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.order-btn:hover {
    background: #334155;
}

/* 页脚样式 */
.footer {
    background: #0f172a;
    color: #f8fafc;
    padding: 5rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 4rem;
}

.footer-info {
    flex: 1;
    max-width: 400px;
}

.footer-info .logo {
    margin-bottom: 1.5rem;
}

.footer-info .logo-text {
    color: #fff;
}

.footer-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-group a {
    color: #94a3b8;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.link-group a:hover {
    color: #fff;
}

.link-group p {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    .nav {
        gap: 1rem;
    }
    .footer-container {
        flex-direction: column;
        gap: 3rem;
    }
    .footer-links {
        flex-wrap: wrap;
        gap: 2rem;
    }
}

/* 订购详情页样式 */
.order-main {
    padding: 3rem 0;
    background-color: #f8fafc;
}

.order-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.order-left {
    flex: 1;
}

.order-section {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

/* 付款周期网格 */
.cycle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.cycle-item {
    position: relative;
}

.cycle-item input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.cycle-item label {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cycle-item.active label {
    border-color: #3b82f6;
    background: #eff6ff;
}

.cycle-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cycle-price {
    font-size: 0.85rem;
    color: #64748b;
}

/* 配置列表 */
.config-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.image-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.image-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    transition: all 0.2s;
}

.image-card.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.image-card-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.25rem;
    cursor: pointer;
    text-align: left;
}

.image-version-dropdown {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dbeafe;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.9rem;
    outline: none;
}

.image-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.image-card-text strong {
    font-size: 0.95rem;
    color: #0f172a;
}

.image-card-text small {
    font-size: 0.8rem;
    color: #64748b;
}

.image-card-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.windows-icon {
    background: linear-gradient(135deg, #3b82f6 0 48%, #f59e0b 48% 52%, #10b981 52%);
}

.centos-icon {
    background: linear-gradient(135deg, #7c3aed, #84cc16);
}

.ubuntu-icon {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.debian-icon {
    background: linear-gradient(135deg, #e11d48, #f472b6);
}

.config-item {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.config-item label {
    width: 6rem;
    font-size: 0.95rem;
    color: #64748b;
}

.config-item select {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    font-size: 0.95rem;
    outline: none;
}

/* 订购总额卡片 */
.order-summary {
    width: 320px;
    position: sticky;
    top: 6rem;
}

.summary-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    font-size: 0.85rem;
}

.summary-item .item-name {
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.summary-item .item-price {
    font-weight: 700;
    color: #000;
}

.summary-item .item-label {
    color: #000;
}

.summary-item .item-value {
    color: #000;
    flex: 1;
    text-align: right;
    margin: 0 0.5rem;
}

.summary-item .item-status {
    color: #000;
}

.summary-total {
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.total-next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #000; /* 统一颜色 */
    margin-bottom: 1.5rem;
}

.total-next-price {
    font-weight: 600;
    color: #000;
}

.total-current {
    margin-bottom: 1.5rem;
}

.total-current span {
    font-size: 0.9rem;
    color: #94a3b8;
}

.total-amount {
    font-weight: 800;
    color: #000;
    font-size: 1.5rem; /* U 的大小 */
    display: flex;
    align-items: baseline;
    gap: 0.1rem;
}

.total-amount span {
    font-size: 4rem; /* 数字的大小 */
    line-height: 1;
    color: #000;
}

.continue-btn {
    width: 100%;
    background: #3b82f6;
    color: #fff;
    border: none;
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    cursor: pointer;
    transition: background 0.2s;
}

.continue-btn:hover {
    background: #2563eb;
}

@media (max-width: 1024px) {
    .order-container {
        flex-direction: column;
    }
    .order-summary {
        width: 100%;
        position: static;
    }
    .image-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .cycle-grid {
        grid-template-columns: 1fr 1fr;
    }
    .config-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .config-item label {
        width: 100%;
    }
    .image-selector {
        grid-template-columns: 1fr;
    }
}

.mobile-page .header {
    position: static;
}

.mobile-page .main-content,
.mobile-page .order-main {
    padding: 1.5rem 0;
}

.mobile-page .header-container,
.mobile-page .footer-container,
.mobile-page .order-container {
    flex-direction: column;
    gap: 1rem;
}

.mobile-page .nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.mobile-page .type-tabs {
    width: 100%;
    justify-content: stretch;
}

.mobile-page .type-btn {
    flex: 1;
    padding: 0.75rem 1rem;
}

.mobile-page .product-grid,
.mobile-page .image-selector,
.mobile-page .cycle-grid {
    grid-template-columns: 1fr;
}

.mobile-page .product-card,
.mobile-page .order-section,
.mobile-page .summary-card {
    padding: 1.25rem;
}

.mobile-page .config-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.mobile-page .config-item label {
    width: auto;
}

.mobile-page .config-item select,
.mobile-page .image-version-dropdown {
    width: 100%;
}

.mobile-page .order-summary {
    width: 100%;
    position: static;
}

