/* 服务器购买页面样式 - 腾讯云风格 */

/* 全局变量定义 */
:root {
    --primary-color: #006EFF;
    --primary-hover: #0056CC;
    --secondary-color: #F5F7FA;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #E5E6EB;
    --success-color: #52C41A;
    --warning-color: #FAAD14;
    --error-color: #FF4D4F;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --mobile-touch-target: 44px;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: #F4F5F6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 辅助类 */
.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;
}

/* 服务器购买页面特有样式 */
.ecs-buy-page {
    background-color: #F4F5F6;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* 顶部标题区域 */
.ecs-buy-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    padding: 42px 0 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 100;
}

.ecs-buy-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

.ecs-header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.ecs-buy-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.6s ease-out;
}

.ecs-buy-subtitle {
    font-size: 16px;
    color: #fff;
    opacity: 0.9;
    margin-bottom: 16px;
    animation: slideInUp 0.6s ease-out 0.2s both;
}

.ecs-header-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    animation: slideInUp 0.6s ease-out 0.4s both;
    padding: 4px;
    margin: -4px;
}

.ecs-header-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    padding: 7px 14px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.ecs-header-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.ecs-header-link:hover::before {
    left: 100%;
}

.ecs-header-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 主内容区域 */
.ecs-buy-content {
    padding: 28px 0;
}

@media (max-width: 768px) {
    .ecs-buy-content {
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    .ecs-buy-content {
        padding: 16px 0;
    }
}

.ecs-buy-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* 确认订单模式：隐藏购买界面的配置和价格区域 */
.ecs-buy-layout.is-confirm-mode .ecs-config-area,
.ecs-buy-layout.is-confirm-mode .ecs-price-area {
    display: none !important;
}

.ecs-buy-layout.is-confirm-mode .ecs-confirm-page {
    display: block !important;
}

@media (max-width: 768px) {
    .ecs-buy-layout {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .ecs-buy-layout {
        gap: 12px;
    }
}

/* 左侧配置区域 */
.ecs-config-area {
    flex: 1;
    min-width: 320px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .ecs-config-area {
        padding: 24px;
    }
}

@media (max-width: 576px) {
    .ecs-config-area {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .ecs-config-area {
        padding: 16px;
    }
}

/* 配置步骤导航 */
.ecs-config-steps {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    padding: 4px 12px 12px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    z-index: 10;
}

.ecs-config-steps::-webkit-scrollbar {
    display: none;
}

.ecs-config-steps-global {
    margin-bottom: 28px;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 768px) {
    .ecs-config-steps {
        margin-bottom: 24px;
        padding: 8px 12px 12px 12px;
    }
    
    .ecs-step {
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .ecs-config-steps {
        margin-bottom: 20px;
        padding: 8px 12px 10px 12px;
    }
    
    .ecs-step {
        padding: 0 8px;
        gap: 8px;
    }
    
    .ecs-step-line {
        width: 40px;
    }
}

.ecs-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    overflow: hidden;
}

.ecs-step:first-child {
    padding-left: 0;
}

.ecs-step:last-child {
    padding-right: 0;
}

.ecs-step:last-child .ecs-step-line {
    display: none;
}

.ecs-step-line {
    width: 44px;
    height: 2px;
    background-color: var(--border-color);
    margin-left: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.ecs-step-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    transition: left 0.3s ease;
}

.ecs-step.active .ecs-step-line::before {
    left: 0;
}

.ecs-step.active .ecs-step-line {
    background-color: var(--primary-color);
}

.ecs-step.completed .ecs-step-line,
.ecs-step.completed .ecs-step-line::before {
    background-color: var(--primary-color);
    left: 0;
}

.ecs-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    z-index: 1;
    position: relative;
    overflow: hidden;
}

.ecs-step-number::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: var(--transition);
}

.ecs-step.active .ecs-step-number::before {
    border-color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

.ecs-step-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    z-index: 1;
}

.ecs-step.active {
    color: var(--primary-color);
}

.ecs-step.active .ecs-step-number {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 110, 255, 0.1);
}

.ecs-step.completed .ecs-step-number {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 110, 255, 0.08);
}

.ecs-step.completed .ecs-step-number::before {
    border-color: rgba(0, 110, 255, 0.18);
}

.ecs-step.completed .ecs-step-text {
    color: var(--primary-color);
}

.ecs-step.active .ecs-step-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* 配置面板 */
.ecs-config-panel {
    padding: 16px;
    background-color: #fff;
    border-radius: 8px;
}

.ecs-config-section {
    margin-bottom: 24px;
    position: relative;
}

.ecs-config-grid {
    display: grid;
    gap: 16px;
}

.ecs-config-grid-double {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.ecs-config-grid-tencent {
    grid-template-columns: 1fr;
    gap: 14px;
}

.ecs-config-section::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.ecs-config-section:last-child::after {
    display: none;
}

.ecs-config-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ecs-config-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.ecs-config-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.45;
}

/* 配置选项 */
.ecs-config-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    padding: 4px;
    margin: -4px;
}

.ecs-config-option {
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background-color: #fff;
    position: relative;
    overflow: hidden;
    flex: 1 1 calc(25% - 9px);
    min-width: 140px;
    max-width: calc(25% - 9px);
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.ecs-config-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 110, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.ecs-config-option:hover::before {
    left: 100%;
}

.ecs-config-option:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 110, 255, 0.15);
}

.ecs-config-option.active {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 110, 255, 0.25);
}

.ecs-config-option.active::after {
    content: '✓';
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 12px;
    font-weight: 600;
    animation: checkmark 0.3s ease;
    z-index: 1;
}

.ecs-config-section-compact {
    margin-bottom: 22px;
}

.ecs-config-section-compact::after {
    bottom: -11px;
}

.ecs-config-section-compact .ecs-config-title {
    margin-bottom: 6px;
}

.ecs-config-section-compact .ecs-config-desc {
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.ecs-config-section-compact .ecs-config-options {
    gap: 8px;
    padding: 2px;
    margin: -2px;
}

.ecs-config-section-compact .ecs-config-option {
    min-width: 120px;
    max-width: calc(25% - 6px);
    padding: 10px 14px;
    gap: 4px;
    border-radius: 7px;
}

.ecs-config-section-compact .ecs-option-text {
    font-size: 13px;
    line-height: 1.35;
}

.ecs-config-section-compact .ecs-option-status {
    font-size: 11px;
    line-height: 1.2;
    opacity: 0.82;
}

.ecs-config-section-inline {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 0;
}

.ecs-config-section-inline::after {
    display: none;
}

.ecs-config-side {
    padding-top: 6px;
}

.ecs-config-main {
    min-width: 0;
}

.ecs-config-section-inline .ecs-config-title {
    margin-bottom: 4px;
    font-size: 14px;
    gap: 6px;
}

.ecs-config-section-inline .ecs-config-title::before {
    width: 3px;
    height: 14px;
}

.ecs-config-hint {
    display: inline-block;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.ecs-config-section-inline .ecs-config-options {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.ecs-config-section-inline .ecs-config-option {
    flex: 0 1 auto;
    min-width: 104px;
    max-width: none;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 6px;
    gap: 2px;
    font-size: 13px;
}

.ecs-config-section-inline .ecs-config-option::before,
.ecs-config-section-inline .ecs-config-option.active::after {
    display: none;
}

.ecs-config-section-inline .ecs-config-option:hover {
    color: var(--primary-color);
    background: rgba(0, 110, 255, 0.04);
    box-shadow: none;
}

.ecs-config-section-inline .ecs-config-option.active {
    color: var(--primary-color);
    background: rgba(0, 110, 255, 0.08);
    box-shadow: none;
}

.ecs-config-section-inline .ecs-option-text {
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
}

.ecs-config-section-inline .ecs-option-status {
    font-size: 10px;
    line-height: 1.1;
}

.ecs-option-status.available {
    color: #52c41a;
    font-weight: 500;
}

.ecs-option-status.unavailable {
    color: #ff4d4f;
    font-weight: 500;
}

.ecs-zone-sold-out {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
    border: 1px dashed #ffcccc;
    border-radius: 8px;
    width: 100%;
    min-height: 80px;
}

.ecs-zone-sold-out .ecs-sold-out-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.ecs-zone-sold-out .ecs-sold-out-text {
    font-size: 15px;
    font-weight: 600;
    color: #ff4d4f;
    margin-bottom: 4px;
}

.ecs-zone-sold-out .ecs-sold-out-hint {
    font-size: 13px;
    color: #999;
}

.config-content-section.hidden,
#flexibleConfigSection.hidden,
.ecs-price-area.hidden {
    display: none !important;
}

@media (max-width: 992px) {
    .ecs-config-grid-double {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ecs-config-section-inline {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ecs-config-side {
        padding-top: 0;
    }
}

/* 机型信息样式 */
.ecs-instance-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.ecs-instance-name {
    font-size: 15px;
    font-weight: 600;
    color: inherit;
}

.ecs-instance-spec {
    font-size: 13px;
    color: inherit;
    opacity: 0.85;
    font-weight: 500;
}

.ecs-instance-desc {
    font-size: 12px;
    color: inherit;
    opacity: 0.7;
    line-height: 1.4;
}

/* 购买时长信息样式 */
.ecs-duration-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.ecs-duration-name {
    font-size: 15px;
    font-weight: 600;
    color: inherit;
}

.ecs-duration-select {
    position: relative;
    width: 100%;
    max-width: 360px;
}

.ecs-duration-trigger {
    width: 100%;
    min-height: 56px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.ecs-duration-trigger:hover,
.ecs-duration-select.is-open .ecs-duration-trigger {
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(0, 110, 255, 0.12);
}

.ecs-duration-trigger-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.ecs-duration-trigger-label {
    font-size: 12px;
    color: var(--text-light);
}

.ecs-duration-trigger-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.ecs-duration-trigger-arrow {
    font-size: 14px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.ecs-duration-select.is-open .ecs-duration-trigger-arrow {
    transform: rotate(180deg);
}

.ecs-duration-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(0, 110, 255, 0.16);
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 14px 36px rgba(17, 37, 75, 0.14);
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 30;
    max-height: 280px;
    overflow-y: auto;
}

.ecs-duration-select.is-open .ecs-duration-dropdown {
    display: flex;
}

.ecs-duration-select.is-drop-down .ecs-duration-dropdown {
    top: calc(100% + 8px);
    bottom: auto;
}

.ecs-duration-select.is-drop-up .ecs-duration-dropdown {
    top: auto;
    bottom: calc(100% + 8px);
}

.ecs-duration-dropdown .ecs-config-option {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
    padding: 14px 16px;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    border-radius: 10px;
}

.ecs-duration-dropdown .ecs-config-option.active {
    border-color: rgba(0, 110, 255, 0.28);
    background-color: rgba(0, 110, 255, 0.06);
    color: var(--primary-color);
    box-shadow: none;
}

.ecs-duration-dropdown .ecs-config-option.active::after {
    top: 14px;
    right: 14px;
}

.ecs-duration-dropdown .ecs-duration-info {
    align-items: flex-start;
    gap: 8px;
    padding-right: 52px;
}

.ecs-quantity-stepper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #dce7ff;
    border-radius: 10px;
    background-color: #f8fbff;
}

.ecs-quantity-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.ecs-quantity-input {
    width: 72px;
    min-width: 72px;
    text-align: center;
    padding: 0 12px;
}

.ecs-quantity-input::-webkit-outer-spin-button,
.ecs-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ecs-quantity-input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.ecs-quantity-unit {
    min-width: 18px;
}

/* 通用Tag样式 */
.ecs-option-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
    z-index: 2;
}

/* 推荐Tag样式 */
.ecs-option-tag-recommended {
    background-color: var(--primary-color);
    color: #fff;
}

/* 折扣Tag样式 */
.ecs-option-tag-discount {
    background-color: var(--error-color);
    color: #fff;
    animation: badgePulse 2s infinite;
}

/* 价格显示样式 */
.ecs-price-original {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-bottom: 2px;
}

.ecs-price-discounted {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--error-color);
}

/* 配置标签页 */
.ecs-config-tabs {
    display: flex;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ecs-config-tabs::-webkit-scrollbar {
    display: none;
}

.ecs-config-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.ecs-tab {
    padding: 10px 18px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    text-align: center;
    overflow: hidden;
}

.ecs-tab:hover {
    color: var(--primary-color);
}

.ecs-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.ecs-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
    animation: tabSlide 0.3s ease;
}

/* 镜像选择器 */
.ecs-image-selector {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #e6eefc;
    border-radius: 10px;
    background: linear-gradient(180deg, #fafcff 0%, #ffffff 100%);
}

.ecs-config-item-image .ecs-config-item-header,
.ecs-config-item-login .ecs-config-item-header {
    margin-bottom: 4px;
}

.ecs-config-item-image .ecs-config-hint,
.ecs-config-item-login .ecs-config-hint {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0, 110, 255, 0.06);
    color: #0052d9;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

/* 镜像标签页 */
.ecs-image-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    background-color: transparent;
    padding: 0;
    border-bottom: none;
    flex-wrap: wrap;
}

.ecs-image-tab {
    padding: 6px 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid #d6e2f3;
    border-radius: 999px;
    margin-bottom: 0;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    background: #fff;
}

.ecs-image-tab:hover {
    color: var(--primary-color);
    border-color: #0052d9;
    background: rgba(0, 82, 217, 0.04);
}

.ecs-image-tab.active {
    color: var(--primary-color);
    border-color: #0052d9;
    font-weight: 600;
    background: rgba(0, 82, 217, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 82, 217, 0.08);
}

/* 镜像内容 */
.ecs-image-content {
    display: none;
}

.ecs-image-content.active {
    display: block;
}

/* 操作系统类型 */
.ecs-os-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
    padding: 2px 0;
    margin-left: 0;
    margin-right: 0;
}

.ecs-os-types.collapsed {
    max-height: 200px;
    overflow: hidden;
}

.ecs-os-types.expanded {
    max-height: none;
    overflow: hidden;
}

.ecs-os-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px 8px;
    border: 1px solid #dfe7f5;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: #fff;
    min-height: 72px;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

.ecs-os-type.hidden {
    display: none;
}

.ecs-os-type:hover {
    border-color: var(--primary-color);
    background: rgba(0, 110, 255, 0.03);
}

/* 推荐系统样式 - 只在非激活状态下应用 */
.ecs-os-type.recommended {
    border-color: var(--primary-color);
}

/* 激活状态样式 - 最高优先级 */
.ecs-os-type.active {
    border-color: var(--primary-color);
    background: rgba(0, 110, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(0, 110, 255, 0.1);
}

@keyframes osTypeActive {
    0% {
        transform: scale(0.98);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.ecs-os-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background-color: #f5f7fa;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.ecs-os-type:hover .ecs-os-icon {
    background-color: #fff;
}

.ecs-os-type.active .ecs-os-icon {
    background-color: #fff;
    border: 1px solid var(--primary-color);
}

.ecs-os-logo {
    max-width: 24px;
    max-height: 24px;
    width: 24px;
    height: 24px;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease;
    object-fit: contain;
}

.ecs-os-type:hover .ecs-os-logo {
    filter: grayscale(70%);
}

.ecs-os-type.active .ecs-os-logo {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.ecs-os-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1.2;
}

.ecs-os-type.active .ecs-os-name {
    color: var(--primary-color);
    font-weight: 600;
}

.ecs-os-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 110, 255, 0.2);
}

/* 操作系统类型展开按钮 */
.ecs-os-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    margin-top: 8px;
    background-color: #fff;
    border: 1px solid #d6e2f3;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.ecs-os-expand-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.ecs-os-expand-btn .ecs-expand-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.ecs-os-expand-btn.expanded .ecs-expand-icon {
    transform: rotate(180deg);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ecs-os-types {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .ecs-os-type {
        padding: 14px 10px;
        min-height: 90px;
    }
    
    .ecs-os-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    
    .ecs-os-logo {
        max-width: 20px;
        max-height: 20px;
    }
    
    .ecs-os-name {
        font-size: 12px;
    }

    .ecs-image-selector,
    .ecs-password-setting {
        padding: 12px;
    }
    
    
    .ecs-os-expand-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .ecs-os-types {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .ecs-os-type {
        padding: 12px 8px;
        min-height: 80px;
    }
    
    .ecs-os-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }
    
    .ecs-os-logo {
        max-width: 18px;
        max-height: 18px;
    }
    
    .ecs-os-name {
        font-size: 11px;
    }
    
    .ecs-os-badge {
        font-size: 9px;
        padding: 1px 6px;
        top: -4px;
        right: -4px;
    }
}

.ecs-os-logo.tencentos {
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), #00a1ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.opencloudos {
    color: #333;
    background: linear-gradient(135deg, #333, #666);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.centos {
    color: #2766b1;
    background: linear-gradient(135deg, #2766b1, #3a86ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.windows {
    color: #0078d4;
    background: linear-gradient(135deg, #0078d4, #00bfff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.ubuntu {
    color: #e95420;
    background: linear-gradient(135deg, #e95420, #ff6b35);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.debian {
    color: #d70a53;
    background: linear-gradient(135deg, #d70a53, #ff6b9d);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.more {
    color: var(--text-secondary);
    background: linear-gradient(135deg, var(--text-secondary), var(--text-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.expand {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.ecs-os-type.expand-btn:hover .ecs-os-logo.expand {
    color: var(--primary-color);
    transform: rotate(180deg);
}

.ecs-os-logo.centos-stream {
    color: #2766b1;
    background: linear-gradient(135deg, #2766b1, #3a86ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.almalinux {
    color: #0078d4;
    background: linear-gradient(135deg, #0078d4, #00bfff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.coreos {
    color: #607d8b;
    background: linear-gradient(135deg, #607d8b, #90a4ae);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.opensuse {
    color: #73ba25;
    background: linear-gradient(135deg, #73ba25, #9ccc65);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.rocky {
    color: #1e40af;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ecs-os-logo.fedora {
    color: #294172;
    background: linear-gradient(135deg, #294172, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 更多操作系统类型 */
.ecs-os-types-more {
    margin-top: 16px;
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ecs-os-types-more.expanded {
    max-height: 300px;
}

.ecs-os-types-more .ecs-os-types {
    margin-bottom: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ecs-os-type.active .ecs-os-logo {
    -webkit-text-fill-color: #fff;
    background: none;
}

.ecs-os-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    text-align: center;
    line-height: 1.3;
}

.ecs-os-type.active .ecs-os-name {
    color: var(--primary-color);
    font-weight: 600;
}

.ecs-os-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--warning-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(250, 173, 20, 0.3);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(250, 173, 20, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(250, 173, 20, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(250, 173, 20, 0);
    }
}

/* 镜像选择下拉框 */
.ecs-image-select {
    margin-bottom: 12px;
    position: relative;
}

.ecs-image-select-input {
    width: 100%;
    min-height: 40px;
    padding: 10px 40px 10px 14px;
    border: 1px solid #d6e2f3;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    background-color: #f8fbff;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'><path fill='%23666' d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.ecs-image-select-input:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 110, 255, 0.05);
}

.ecs-image-select-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 110, 255, 0.1);
}

.ecs-image-select-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f7fa;
}

.ecs-image-select-input.value-changed {
    animation: valueChange 0.3s ease;
}

/* 镜像信息 */
.ecs-image-info {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fbff;
    border: 1px solid #e6eefc;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.ecs-info-link {
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 0;
    transition: var(--transition);
}

.ecs-info-link:hover {
    text-decoration: underline;
}

.ecs-info-icon {
    font-style: normal;
    margin-left: 4px;
    color: var(--text-light);
}

/* 加载状态 */
.data-loading {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.data-loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.data-loading::after {
    content: '正在加载...';
    color: var(--text-secondary);
}

.ecs-inline-empty {
    padding: 32px 24px;
    min-height: 156px;
    border: 1px dashed rgba(0, 110, 255, 0.24);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(0, 110, 255, 0.04) 0%, rgba(245, 247, 250, 0.72) 100%);
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}

.ecs-inline-empty::before {
    content: '☁';
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 110, 255, 0.1);
    color: var(--primary-color);
    font-size: 26px;
    line-height: 1;
}

.ecs-inline-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.ecs-inline-empty-hint {
    max-width: 360px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-hint);
}

/* 空状态 */
.ecs-image-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ecs-image-empty[style*="display: flex"] {
    display: flex !important;
}

.ecs-image-empty::before {
    content: '📦';
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 8px;
}

.ecs-image-empty p {
    margin: 0;
    color: var(--text-secondary);
}

.ecs-image-empty .empty-hint {
    font-size: 12px;
    color: var(--text-hint);
    margin-top: 4px;
}

/* 配置项 */
.ecs-config-item {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.ecs-config-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ecs-config-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.ecs-config-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.ecs-config-hint {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
    background-color: var(--secondary-color);
    padding: 2px 8px;
    border-radius: 4px;
}

.ecs-config-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 4px;
    margin: -4px;
}

.ecs-config-item-bandwidth .ecs-config-item-header {
    margin-bottom: 4px;
}

.ecs-config-item-bandwidth .ecs-config-hint {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0, 110, 255, 0.06);
    color: #0052d9;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.ecs-config-controls-bandwidth {
    width: 100%;
    padding: 14px 16px;
    margin: 0;
    border: 1px solid #e6eefc;
    border-radius: 10px;
    background: linear-gradient(180deg, #fafcff 0%, #ffffff 100%);
}

.ecs-btn-minus,
.ecs-btn-plus {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-width: 36px;
}

.ecs-btn-minus:disabled,
.ecs-btn-plus:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ecs-btn-minus:hover:not(:disabled),
.ecs-btn-plus:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 110, 255, 0.15);
}

.ecs-btn-minus:active:not(:disabled),
.ecs-btn-plus:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 110, 255, 0.2);
}

.ecs-btn-minus::before,
.ecs-btn-plus::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(0, 110, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.ecs-btn-minus:active:not(:disabled)::before,
.ecs-btn-plus:active:not(:disabled)::before {
    width: 30px;
    height: 30px;
}

.ecs-config-input {
    width: 100px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-width: 80px;
}

.ecs-config-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 110, 255, 0.1);
}

.ecs-config-input.value-changed {
    animation: valueChange 0.3s ease;
}

.ecs-config-unit {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 右侧价格和购买区域 */
.ecs-price-area {
    width: 360px;
    min-width: 320px;
    position: sticky;
    top: 24px;
}

.ecs-price-panel {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    padding: 20px;
    position: relative;
    overflow: visible;
}

/* 响应式价格面板 */
@media (max-width: 768px) {
    .ecs-price-area {
        position: static;
    }
    
    .ecs-price-panel {
        padding: 20px;
    }

    .ecs-duration-select {
        max-width: 100%;
    }

    .ecs-quantity-stepper {
        width: 100%;
        justify-content: center;
    }

    .ecs-price-tip-content {
        left: auto;
        right: 0;
        transform: translateY(4px);
        min-width: 200px;
        max-width: min(260px, calc(100vw - 48px));
    }

    .ecs-price-tip-content::after {
        left: auto;
        right: 10px;
        transform: none;
    }

    .ecs-price-tip:hover .ecs-price-tip-content,
    .ecs-price-tip:focus-within .ecs-price-tip-content {
        transform: translateY(0);
    }

    .ecs-price-selection-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .ecs-price-panel {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .ecs-price-panel {
        padding: 16px;
    }
}

.ecs-price-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ecs-price-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-color), transparent);
    min-width: 100px;
}

/* 配置概览 */
.ecs-config-overview {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.ecs-overview-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.ecs-overview-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-height: 160px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ecs-overview-content.expanded {
    max-height: 500px;
}

.ecs-overview-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.ecs-overview-item:hover {
    padding-left: 8px;
    border-radius: 4px;
}

.ecs-overview-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.ecs-overview-toggle {
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.ecs-overview-toggle::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.3s ease;
}

.ecs-overview-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* 价格计算 */
.ecs-settlement-main {
    width: 100%;
}

.ecs-price-calculation {
    margin-bottom: 18px;
}

.ecs-calculation-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.ecs-price-selection {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #e6eefc;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.ecs-price-selection-row + .ecs-price-selection-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eef3fb;
}

.ecs-price-selection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ecs-price-selection-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.ecs-price-selection-hint {
    font-size: 12px;
    color: var(--text-light);
}

.ecs-price-selection .ecs-duration-select {
    max-width: 100%;
}

.ecs-price-selection .ecs-quantity-stepper {
    width: 100%;
    justify-content: flex-start;
}

.ecs-price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    padding: 4px 0;
    transition: var(--transition);
    flex-wrap: wrap;
    gap: 8px;
}

.ecs-price-item:hover {
    padding-left: 8px;
    border-radius: 4px;
}

.ecs-price-label {
    color: var(--text-secondary);
}

.ecs-price-label-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ecs-price-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ecs-price-tip-trigger {
    width: 18px;
    height: 18px;
    border: 1px solid #bfd3f5;
    border-radius: 50%;
    background-color: #f5f8ff;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.ecs-price-tip-trigger:hover,
.ecs-price-tip-trigger:focus {
    border-color: var(--primary-color);
    background-color: #eaf2ff;
    outline: none;
}

.ecs-price-tip-content {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    min-width: 220px;
    max-width: 280px;
    padding: 10px 12px;
    border-radius: 8px;
    background-color: rgba(17, 37, 75, 0.96);
    color: #fff;
    font-size: 12px;
    line-height: 1.6;
    box-shadow: 0 10px 30px rgba(17, 37, 75, 0.24);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.ecs-price-tip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(17, 37, 75, 0.96) transparent transparent transparent;
}

.ecs-price-tip:hover .ecs-price-tip-content,
.ecs-price-tip:focus-within .ecs-price-tip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.ecs-price-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* 活动折扣 */
.ecs-discount-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 10px 12px;
    background-color: #FFF9E6;
    border: 1px solid #FFD591;
    border-radius: 6px;
    font-size: 13px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.3s ease;
}

.ecs-discount-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ecs-discount-label {
    color: #FA8C16;
    font-weight: 500;
}

.ecs-discount-name {
    color: #FA541C;
    font-size: 12px;
    font-weight: 600;
    background-color: #FFE7BA;
    padding: 2px 8px;
    border-radius: 4px;
    animation: pulse 2s infinite;
}

.ecs-discount-value {
    color: #FA541C;
    font-weight: 600;
}

/* 总计区域 */
.ecs-price-total-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.ecs-price-total-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

/* 总计 */
.ecs-price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    position: relative;
}

.ecs-price-total::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.ecs-total-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.ecs-total-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ecs-total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--error-color);
    animation: priceChange 0.3s ease;
}

.ecs-total-period {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 原价对比 */
.ecs-original-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 13px;
    animation: fadeIn 0.3s ease;
}

.ecs-original-label {
    color: var(--text-secondary);
}

.ecs-original-value {
    color: var(--text-light);
    text-decoration: line-through;
}

/* 实名限制提示 */
.ecs-realname-tip {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background-color: #FFF1F0;
    border: 1px solid #FFCCC7;
    border-radius: 8px;
    animation: pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.ecs-tip-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--error-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    animation: pulse 1.5s infinite;
}

.ecs-tip-content {
    flex: 1;
}

.ecs-tip-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--error-color);
}

.ecs-tip-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.ecs-tip-btn {
    padding: 8px 16px;
    background-color: var(--error-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ecs-tip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.ecs-tip-btn:hover::before {
    left: 100%;
}

.ecs-tip-btn:hover {
    background-color: #CF1322;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

/* 购买按钮 */
.ecs-buy-actions {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
    padding: 4px;
    margin-left: -4px;
    margin-right: -4px;
}

.ecs-buy-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.ecs-buy-btn::before {
    display: none;
}

.ecs-buy-btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(0, 110, 255, 0.4);
}

.ecs-buy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ecs-buy-btn-text,
.ecs-buy-btn-loading {
    position: relative;
    z-index: 1;
}

.ecs-add-cart-btn {
    width: 100%;
    padding: 12px;
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
}

.ecs-add-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 110, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.ecs-add-cart-btn:hover::before {
    left: 100%;
}

.ecs-add-cart-btn:hover {
    background-color: #F0F7FF;
    box-shadow: 0 2px 8px rgba(0, 110, 255, 0.15);
}

.ecs-add-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ecs-add-cart-btn-text,
.ecs-add-cart-btn-loading {
    position: relative;
    z-index: 1;
}

/* 服务保障 */
.ecs-service-guarantee {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.ecs-guarantee-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.ecs-guarantee-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ecs-guarantee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ecs-guarantee-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--success-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.ecs-guarantee-item:hover::before {
    transform: scaleY(1);
}

.ecs-guarantee-item:hover {
    background-color: rgba(82, 196, 26, 0.05);
    padding-left: 12px;
    border-radius: 4px;
}

.ecs-guarantee-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--success-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    animation: checkmark 0.3s ease;
}

.ecs-guarantee-text {
    flex: 1;
}

/* 响应式设计 */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .ecs-config-option {
        flex: 1 1 calc(20% - 10px);
        min-width: 160px;
        max-width: calc(20% - 10px);
    }
    
    .ecs-config-area {
        padding: 40px;
    }
    
    .ecs-price-panel {
        padding: 32px;
    }
}

/* 登录方式设置样式 - 腾讯云风格 */
.ecs-login-method {
    margin-top: 0;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    transition: none;
}

.ecs-login-method:hover {
    box-shadow: none;
}

/* 登录方式选项 */
.ecs-login-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.ecs-login-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #dfe7f5;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: linear-gradient(180deg, #fafcff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    white-space: normal;
    text-align: left;
}

.ecs-login-option::before {
    content: none;
}

.ecs-login-option:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.08);
}

.ecs-login-option.active {
    border-color: var(--primary-color);
    background: rgba(0, 110, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(0, 110, 255, 0.1);
}

.ecs-login-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.ecs-login-option-content {
    flex: 1;
}

.ecs-login-option-title {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.ecs-login-option.active .ecs-login-option-title {
    color: var(--text-primary);
}

.ecs-login-option-hint {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

/* 密码设置区域 */
.ecs-password-setting {
    margin-top: 4px;
    padding: 16px;
    background: linear-gradient(180deg, #fafcff 0%, #ffffff 100%);
    border: 1px solid #e6eefc;
    border-radius: 10px;
    transition: var(--transition);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 密码字段 */
.ecs-password-field {
    margin-bottom: 16px;
    position: relative;
}

.ecs-password-field:last-child {
    margin-bottom: 0;
}

.ecs-password-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* 用户名显示 */
.ecs-username-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 10px 14px;
    background-color: #f8fbff;
    border: 1px solid #d6e2f3;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.ecs-username-display:hover {
    border-color: var(--primary-color);
}

.ecs-username-label {
    color: var(--text-secondary);
}

#usernameDisplay {
    font-weight: 600;
    color: var(--primary-color);
    font-family: monospace;
    background-color: #f5f7fa;
    padding: 4px 12px;
    border-radius: 4px;
    transition: var(--transition);
}

/* 密码输入框 */
.ecs-password-input-wrapper {
    position: relative;
}

.ecs-password-input {
    width: 100%;
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid #d6e2f3;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    background-color: #f8fbff;
    transition: var(--transition);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ecs-password-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 110, 255, 0.1);
}

.ecs-password-input:hover {
    border-color: var(--primary-color);
}

.ecs-password-input:invalid {
    border-color: var(--error-color);
}

.ecs-password-input:invalid:focus {
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.1);
}

.ecs-password-input:valid {
    border-color: var(--success-color);
}

.ecs-password-input:valid:focus {
    box-shadow: 0 0 0 2px rgba(82, 196, 26, 0.1);
}

/* 密码提示 */
.ecs-password-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ecs-login-options {
        gap: 8px;
    }

    .ecs-login-option {
        padding: 12px 14px;
    }

    /* 登录方式响应式调整 */
    .ecs-login-options {
        gap: 8px;
    }
    
    .ecs-login-option {
        padding: 12px 14px;
    }
    
    .ecs-password-setting {
        padding: 16px;
    }
    
    .ecs-password-field {
        margin-bottom: 16px;
    }
}

@media (max-width: 768px) {
    /* 登录方式响应式调整 */
    .ecs-login-options {
        gap: 8px;
    }
    
    .ecs-login-option {
        padding: 12px 14px;
    }
    
    .ecs-password-setting {
        padding: 16px;
    }
    
    .ecs-password-field {
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    /* 登录方式响应式调整 */
    .ecs-login-option {
        padding: 12px;
        gap: 12px;
        min-width: auto;
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .ecs-password-setting {
        padding: 12px;
    }

    .ecs-password-input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .ecs-password-hint {
        font-size: 11px;
    }

    /* 配置选项移动端优化 */
    .ecs-config-options {
        gap: 8px;
    }
    
    .ecs-config-option {
        flex: 1 1 calc(50% - 4px);
        min-width: auto;
        max-width: calc(50% - 4px);
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1440px;
    }
    
    .ecs-config-option {
        flex: 1 1 calc(16.666% - 10px);
        min-width: 180px;
        max-width: calc(16.666% - 10px);
    }
}

@media (max-width: 1200px) {
    .container {
        width: 960px;
    }
    
    .ecs-buy-layout {
        flex-direction: column;
    }
    
    .ecs-price-area {
        width: 100%;
        position: static;
    }
    
    .ecs-config-option {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 140px;
        max-width: calc(33.333% - 8px);
    }
}

@media (max-width: 992px) {
    .container {
        width: 720px;
    }
    
    .ecs-config-area {
        padding: 24px;
    }
    
    .ecs-step {
        padding: 0 16px;
    }
    
    .ecs-step-line {
        width: 40px;
    }
    
    .ecs-config-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ecs-config-controls {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 16px;
    }
    
    .ecs-buy-content {
        padding: 20px 0;
    }
    
    .ecs-config-area {
        padding: 20px;
    }
    
    .ecs-config-steps {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .ecs-config-steps::-webkit-scrollbar {
        display: none;
    }
    
    .ecs-step {
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 120px;
    }
    
    .ecs-config-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 4px;
        margin-left: -4px;
        margin-right: -4px;
    }
    
    .ecs-config-option {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    
    .ecs-config-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .ecs-config-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .ecs-tab {
        border-bottom: 2px solid transparent;
        border-radius: 0;
        margin-bottom: -1px;
        padding: 12px 16px;
        flex-shrink: 0;
    }
    
    .ecs-tab.active {
        border-bottom: 2px solid var(--primary-color);
        background-color: transparent;
        color: var(--primary-color);
    }
    
    .ecs-tab.active::after {
        display: block;
    }
    
    /* 镜像标签页优化 */
    .ecs-image-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .ecs-image-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .ecs-image-tab {
        padding: 10px 12px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    /* 配置控件优化 */
    .ecs-config-controls {
        gap: 12px;
    }
    
    .ecs-btn-minus,
    .ecs-btn-plus {
        width: 40px;
        height: 40px;
    }
    
    .ecs-config-input {
        width: 120px;
        height: 40px;
    }
    
    /* 价格面板优化 */
    .ecs-price-panel {
        padding: 20px;
        margin-top: 24px;
    }
    
    .ecs-price-title {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .ecs-config-overview {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .ecs-overview-title {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .ecs-overview-content {
        font-size: 13px;
        max-height: 160px;
    }
    
    .ecs-overview-item {
        font-size: 13px;
        padding: 6px 0;
    }
    
    .ecs-price-calculation {
        margin-bottom: 20px;
    }
    
    .ecs-calculation-title {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .ecs-price-item {
        font-size: 13px;
        padding: 6px 0;
    }
    
    .ecs-discount-item {
        padding: 10px;
        font-size: 13px;
    }
    
    .ecs-price-total {
        padding-top: 14px;
        margin-top: 14px;
    }
    
    .ecs-total-label {
        font-size: 15px;
    }
    
    .ecs-total-price {
        font-size: 22px;
    }
    
    .ecs-total-period {
        font-size: 13px;
    }
    
    .ecs-original-price {
        font-size: 13px;
    }
    
    .ecs-realname-tip {
        padding: 14px;
        margin-bottom: 20px;
    }
    
    .ecs-tip-title {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .ecs-tip-text {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .ecs-tip-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .ecs-buy-actions {
        gap: 12px;
        flex-direction: row;
        padding: 4px;
        margin-left: -4px;
        margin-right: -4px;
    }
    
    .ecs-buy-btn,
    .ecs-add-cart-btn {
        padding: 14px;
        font-size: 15px;
        min-height: 48px;
        flex: 1;
    }
    
    .ecs-service-guarantee {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .ecs-guarantee-item {
        font-size: 13px;
        gap: 8px;
        padding: 8px 0;
    }
    
    .ecs-guarantee-icon {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    .ecs-overview-toggle {
        font-size: 13px;
        padding: 6px 10px;
    }
}

@media (max-width: 576px) {
    .ecs-buy-header {
        padding: 40px 0;
    }
    
    .ecs-buy-title {
        font-size: 28px;
        padding: 0 16px;
    }
    
    .ecs-buy-subtitle {
        font-size: 15px;
        padding: 0 16px;
    }
    
    .ecs-header-actions {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        justify-content: center;
    }
    
    .ecs-header-link {
        width: auto;
        text-align: center;
        padding: 10px 16px;
        flex-shrink: 0;
    }
    
    .ecs-config-area {
        padding: 20px 16px;
    }
    
    .ecs-price-panel {
        padding: 20px 16px;
    }
    
    .ecs-total-price {
        font-size: 22px;
    }
    
    .ecs-buy-btn,
    .ecs-add-cart-btn {
        padding: 14px;
        font-size: 15px;
        min-height: 48px;
    }
    
    /* 操作系统类型优化 */
    .ecs-os-types {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 10px;
        padding: 4px;
        margin-left: -4px;
        margin-right: -4px;
    }
    
    .ecs-os-type {
        padding: 14px 10px;
        min-height: 95px;
    }
    
    .ecs-os-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    
    .ecs-os-logo {
        max-width: 20px;
        max-height: 20px;
    }
    
    .ecs-os-name {
        font-size: 12px;
    }
    
    .ecs-os-badge {
        font-size: 10px;
        padding: 2px 6px;
        top: -4px;
        right: -4px;
    }
    
    /* 优化配置选项布局 */
    .ecs-config-options {
        gap: 8px;
        padding: 4px;
        margin-left: -4px;
        margin-right: -4px;
    }
    
    .ecs-config-option {
        flex: 1 1 calc(50% - 4px);
        min-width: 130px;
        max-width: calc(50% - 4px);
        padding: 12px 16px;
        font-size: 13px;
    }
    
    /* 优化配置项间距 */
    .ecs-config-section {
        margin-bottom: 24px;
        padding-bottom: 24px;
    }
    
    /* 优化配置标题 */
    .ecs-config-title {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .ecs-config-desc {
        font-size: 13px;
        margin-bottom: 12px;
        padding-right: 8px;
    }
    
    /* 优化标签页 */
    .ecs-config-tabs,
    .ecs-image-tabs {
        padding: 0 4px;
        gap: 6px;
    }
    
    .ecs-tab,
    .ecs-image-tab {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* 优化步骤导航 */
    .ecs-config-steps {
        padding: 0 4px;
        gap: 6px;
    }
    
    .ecs-step {
        padding: 0 12px;
        min-width: 110px;
    }
    
    .ecs-step-text {
        font-size: 12px;
    }
    
    .ecs-step-number {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    /* 优化价格项 */
    .ecs-price-item {
        font-size: 13px;
        padding: 8px 0;
    }
    
    /* 优化配置概览 */
    .ecs-overview-item {
        font-size: 12px;
        padding: 8px 0;
    }
    
    /* 优化服务保障 */
    .ecs-service-guarantee {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .ecs-guarantee-items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .ecs-guarantee-item {
        font-size: 12px;
        gap: 8px;
        padding: 8px 0;
        flex: 1 1 calc(50% - 8px);
        min-width: 140px;
    }
    
    .ecs-guarantee-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
    
    /* 优化提示信息 */
    .ecs-tip-text {
        font-size: 13px;
    }
    
    .ecs-tip-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    /* 优化输入框 */
    .ecs-config-input {
        width: 90px;
        height: 42px;
        padding: 0 14px;
        font-size: 16px;
    }
    
    .ecs-btn-minus,
    .ecs-btn-plus {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
    
    /* 优化下拉框 */
    .ecs-image-select-input {
        height: 42px;
        padding: 0 36px 0 14px;
        font-size: 15px;
    }
    
    /* 优化配置概览切换按钮 */
    .ecs-overview-toggle {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    /* 优化总计标签 */
    .ecs-total-label {
        font-size: 15px;
    }
    
    .ecs-total-period {
        font-size: 13px;
    }
    
    /* 优化原价显示 */
    .ecs-original-price {
        font-size: 13px;
    }
}

/* 响应式断点优化 */
@media (max-width: 480px) {
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
        box-sizing: border-box;
    }
    
    *, *::before, *::after {
        box-sizing: inherit;
    }
    
    .ecs-buy-page {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .ecs-buy-title {
        font-size: 26px;
        padding: 0 12px;
    }
    
    .ecs-buy-subtitle {
        font-size: 14px;
        padding: 0 12px;
    }
    
    .ecs-config-area {
        padding: 20px 12px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        border-radius: 8px;
    }
    
    .ecs-price-panel {
        padding: 20px 12px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        border-radius: 8px;
    }
    
    .ecs-total-price {
        font-size: 20px;
    }
    
    .ecs-config-option {
        padding: 12px 14px;
        font-size: 13px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex: 0 0 auto;
        box-sizing: border-box;
        min-height: 48px;
    }
    
    .ecs-os-types {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
        padding: 4px;
        margin-left: -4px;
        margin-right: -4px;
    }
    
    .ecs-os-type {
        padding: 12px 8px;
        min-height: 90px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .ecs-os-type:hover {
        box-shadow: 0 2px 6px rgba(0, 110, 255, 0.12);
        transform: none;
    }
    
    .ecs-os-type.active {
        box-shadow: 0 2px 6px rgba(0, 110, 255, 0.2);
    }
    
    .ecs-os-type:active {
        transform: scale(0.98);
    }
    
    .ecs-os-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }
    
    .ecs-os-logo {
        max-width: 18px;
        max-height: 18px;
    }
    
    .ecs-os-name {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .ecs-os-badge {
        font-size: 9px;
        padding: 1px 5px;
        top: -4px;
        right: -4px;
    }
    
    .ecs-config-section {
        margin-bottom: 24px;
        padding-bottom: 20px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .ecs-config-title {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .ecs-config-desc {
        font-size: 12px;
        padding-right: 4px;
        margin-bottom: 10px;
    }
    
    .ecs-config-label {
        font-size: 12px;
    }
    
    .ecs-config-hint {
        font-size: 10px;
        padding: 2px 5px;
    }
    
    .ecs-config-input {
        width: 85px;
        font-size: 16px;
        min-width: 60px;
        max-width: 85px;
        flex: 1;
        box-sizing: border-box;
        height: 40px;
        padding: 0 12px;
    }
    
    .ecs-btn-minus,
    .ecs-btn-plus {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .ecs-buy-actions {
        gap: 10px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        flex-direction: row;
        padding: 4px;
        margin-left: -4px;
        margin-right: -4px;
    }
    
    .ecs-buy-btn,
    .ecs-add-cart-btn {
        padding: 12px;
        font-size: 14px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: 48px;
        flex: 1;
    }
    
    .ecs-buy-btn:hover {
        background-color: var(--primary-hover);
        box-shadow: 0 4px 12px rgba(0, 110, 255, 0.3);
        transform: none;
    }
    
    .ecs-add-cart-btn:hover {
        background-color: #F0F7FF;
        box-shadow: 0 2px 6px rgba(0, 110, 255, 0.12);
        transform: none;
    }
    
    .ecs-buy-btn:active,
    .ecs-add-cart-btn:active {
        transform: scale(0.98);
    }
    
    .ecs-overview-item {
        font-size: 12px;
        padding: 6px 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .ecs-price-item {
        font-size: 12px;
        padding: 6px 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .ecs-service-guarantee {
        margin-top: 16px;
        padding-top: 16px;
    }
    
    .ecs-guarantee-items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .ecs-guarantee-item {
        font-size: 12px;
        gap: 8px;
        padding: 6px 0;
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }
    
    .ecs-guarantee-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
        flex-shrink: 0;
    }
    
    .ecs-image-tabs {
        padding: 0 4px;
        gap: 4px;
    }
    
    .ecs-image-tab {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .ecs-config-tabs {
        padding: 0 4px;
        gap: 4px;
    }
    
    .ecs-tab {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .ecs-config-steps {
        padding: 0 4px;
        gap: 4px;
    }
    
    .ecs-step {
        padding: 0 10px;
        min-width: 100px;
    }
    
    .ecs-step-text {
        font-size: 11px;
    }
    
    .ecs-step-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .ecs-overview-toggle {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .ecs-tip-text {
        font-size: 12px;
    }
    
    .ecs-tip-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .ecs-total-label {
        font-size: 14px;
    }
    
    .ecs-total-period {
        font-size: 12px;
    }
    
    .ecs-original-price {
        font-size: 12px;
    }
    
    /* 优化配置选项布局 */
    .ecs-config-options {
        gap: 8px;
        padding: 4px;
        margin: -4px;
    }
    
    .ecs-config-option {
        flex: 1 1 calc(50% - 4px);
        min-width: 110px;
        max-width: calc(50% - 4px);
        padding: 10px 12px;
    }
    
    .ecs-config-option:hover {
        transform: none;
        box-shadow: 0 2px 6px rgba(0, 110, 255, 0.12);
    }

    .ecs-config-option.active {
        box-shadow: 0 2px 6px rgba(0, 110, 255, 0.2);
    }

    .ecs-config-option:active {
        transform: scale(0.98);
    }
    
    /* 优化下拉框 */
    .ecs-image-select-input {
        height: 40px;
        padding: 0 32px 0 12px;
        font-size: 14px;
    }
    
    /* 优化标签页滚动 */
    .ecs-config-tabs,
    .ecs-image-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .ecs-config-tabs::-webkit-scrollbar,
    .ecs-image-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .ecs-config-option,
    .ecs-os-type,
    .ecs-tab,
    .ecs-image-tab,
    .ecs-btn-minus,
    .ecs-btn-plus,
    .ecs-buy-btn,
    .ecs-add-cart-btn,
    .ecs-overview-toggle,
    .ecs-tip-btn {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
    }
    
    .ecs-config-option:active:not(.active) {
        transform: scale(0.98);
    }

    .ecs-config-option.active:active {
        background-color: var(--primary-hover);
        transform: scale(0.98);
    }

    .ecs-os-type:active:not(.active) {
        transform: scale(0.98);
    }

    .ecs-os-type.active:active {
        background-color: var(--primary-hover);
        transform: scale(0.98);
    }

    .ecs-tab:active:not(.active) {
        transform: scale(0.98);
    }
    
    .ecs-tab.active:active {
        background-color: var(--primary-hover);
        transform: scale(0.98);
    }
    
    .ecs-image-tab:active:not(.active) {
        transform: scale(0.98);
    }

    .ecs-image-tab.active:active {
        background-color: var(--primary-hover);
        transform: scale(0.98);
    }

    .ecs-btn-minus:active:not(:disabled),
    .ecs-btn-plus:active:not(:disabled) {
        transform: scale(0.95);
    }

    .ecs-buy-btn:active:not(:disabled) {
        transform: scale(0.98);
        background-color: var(--primary-hover);
    }
    
    .ecs-add-cart-btn:active:not(:disabled) {
        transform: scale(0.98);
        background-color: #E6F0FF;
    }

    .ecs-overview-toggle:active {
        transform: scale(0.98);
    }
    
    .ecs-tip-btn:active {
        transform: scale(0.98);
        background-color: #CF1322;
        box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
    }
    
    .ecs-config-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(0, 110, 255, 0.1);
    }
    
    .ecs-image-select-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(0, 110, 255, 0.1);
    }
    
    /* 优化触摸目标大小 */
    .ecs-config-option,
    .ecs-os-type,
    .ecs-tab,
    .ecs-image-tab {
        min-height: 48px;
        min-width: 48px;
        padding: 14px 20px;
    }
    
    /* 优化按钮触摸目标 */
    .ecs-btn-minus,
    .ecs-btn-plus {
        min-width: 48px;
        min-height: 48px;
    }
    
    /* 优化输入框触摸体验 */
    .ecs-config-input,
    .ecs-image-select-input {
        min-height: 48px;
        font-size: 16px;
    }
    
    /* 优化触摸反馈延迟 */
    .ecs-config-option,
    .ecs-os-type,
    .ecs-tab,
    .ecs-image-tab,
    .ecs-btn-minus,
    .ecs-btn-plus,
    .ecs-buy-btn,
    .ecs-add-cart-btn {
        transition: transform 0.1s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes valueChange {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 110, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 110, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 110, 255, 0);
    }
}

@keyframes priceChange {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes tabSlide {
    from {
        width: 0;
        left: 50%;
    }
    to {
        width: 100%;
        left: 0;
    }
}

@keyframes osTypeActive {
    0% {
        transform: scale(0.98);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.ecs-config-panel,
.ecs-price-panel {
    animation: fadeIn 0.3s ease;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

::-webkit-scrollbar-track {
    display: none;
}

::-webkit-scrollbar-thumb {
    display: none;
}

/* 滚动到顶部按钮 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.3);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(0, 110, 255, 0.4);
    transform: translateY(-2px);
}

.scroll-to-top:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 110, 255, 0.3);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }
    
    .scroll-to-top svg {
        width: 16px;
        height: 16px;
    }
}

/* 选择文本样式 */
::selection {
    background: rgba(0, 110, 255, 0.2);
    color: var(--primary-color);
}

::-moz-selection {
    background: rgba(0, 110, 255, 0.2);
    color: var(--primary-color);
}

/* 加载动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.ecs-buy-btn-loading::after,
.ecs-add-cart-btn-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.ecs-add-cart-btn-loading::after {
    border-color: rgba(0, 110, 255, 0.3);
    border-top-color: var(--primary-color);
}

/* 额外的移动端优化 */
@media (max-width: 768px) {
    /* 增大触摸目标 */
    .ecs-config-option,
    .ecs-os-type,
    .ecs-tab,
    .ecs-image-tab {
        min-height: var(--mobile-touch-target);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px 20px;
    }
    
    /* 优化按钮间距 */
    .ecs-buy-actions {
        gap: 16px;
        flex-direction: column;
    }
    
    .ecs-buy-btn,
    .ecs-add-cart-btn {
        width: 100%;
        min-height: 48px;
    }
    
    /* 优化价格显示 */
    .ecs-price-item {
        font-size: 13px;
        padding: 8px 0;
    }
    
    /* 优化配置概览 */
    .ecs-overview-item {
        font-size: 13px;
        padding: 8px 0;
    }
    
    /* 防止iOS自动缩放 */
    input[type="number"],
    input[type="text"],
    select {
        font-size: 16px !important;
    }
    
    /* 优化滚动性能 */
    .ecs-buy-content,
    .ecs-config-area,
    .ecs-price-panel {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    /* 优化触摸反馈 */
    .ecs-config-option,
    .ecs-os-type,
    .ecs-tab,
    .ecs-image-tab,
    .ecs-btn-minus,
    .ecs-btn-plus,
    .ecs-buy-btn,
    .ecs-add-cart-btn {
        transition: transform 0.1s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    }
    
    /* 优化输入框 */
    .ecs-config-input {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: textfield;
        height: 44px;
        padding: 0 16px;
    }
    
    .ecs-config-input::-webkit-outer-spin-button,
    .ecs-config-input::-webkit-inner-spin-button {
        appearance: none;
        -webkit-appearance: none;
        margin: 0;
    }
    
    /* 优化下拉框 */
    .ecs-image-select-input {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        height: 44px;
        padding: 0 40px 0 16px;
    }
    
    /* 优化文本选择 */
    .ecs-buy-page {
        -webkit-user-select: none;
        user-select: none;
    }
    
    .ecs-config-input,
    .ecs-image-select-input,
    .ecs-overview-content,
    .ecs-price-item {
        -webkit-user-select: text;
        user-select: text;
    }
    
    /* 优化配置选项布局 */
    .ecs-config-options {
        gap: 10px;
    }
    
    .ecs-config-option {
        flex: 1 1 calc(50% - 5px);
        min-width: 140px;
        max-width: calc(50% - 5px);
    }
    
    /* 优化操作系统类型布局 */
    .ecs-os-types {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }
    
    .ecs-os-type {
        padding: 16px 12px;
        min-height: 100px;
    }
    
    /* 优化价格面板布局 */
    .ecs-price-area {
        width: 100%;
        position: static;
        margin-top: 24px;
    }
    
    /* 优化配置项间距 */
    .ecs-config-item {
        margin-bottom: 28px;
        padding-bottom: 28px;
    }
    
    /* 优化标签页 */
    .ecs-config-tabs,
    .ecs-image-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .ecs-config-tabs::-webkit-scrollbar,
    .ecs-image-tabs::-webkit-scrollbar {
        display: none;
    }
    
    /* 优化步骤导航 */
    .ecs-config-steps {
        padding: 0 8px;
        gap: 8px;
    }
    
    .ecs-step {
        padding: 0 16px;
        min-width: 120px;
    }
    
    /* 优化标题区域 */
    .ecs-buy-header {
        padding: 48px 0;
    }
    
    .ecs-buy-title {
        font-size: 32px;
        padding: 0 20px;
    }
    
    .ecs-buy-subtitle {
        font-size: 16px;
        padding: 0 20px;
    }
    
    /* 优化配置区域 */
    .ecs-config-area {
        padding: 24px 20px;
    }
    
    /* 优化价格面板 */
    .ecs-price-panel {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    /* 进一步优化小屏幕 */
    .ecs-config-section {
        margin-bottom: 24px;
    }
    
    .ecs-config-title {
        font-size: 15px;
    }
    
    .ecs-config-desc {
        font-size: 13px;
    }
    
    /* 优化输入框 */
    .ecs-config-input {
        width: 100px;
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    /* 优化按钮 */
    .ecs-buy-btn,
    .ecs-add-cart-btn {
        min-height: var(--mobile-touch-target);
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .ecs-buy-header {
        padding: 30px 0;
    }
    
    .ecs-buy-title {
        font-size: 24px;
    }
    
    .ecs-buy-subtitle {
        font-size: 14px;
    }
    
    .ecs-config-area,
    .ecs-price-panel {
        padding: 16px;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .ecs-os-logo {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .ecs-buy-page {
        background-color: #1a1a1a;
    }
    
    .ecs-config-area,
    .ecs-price-panel {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }
    
    .ecs-config-option,
    .ecs-os-type {
        background-color: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .ecs-config-option:hover,
    .ecs-os-type:hover {
        border-color: var(--primary-color);
        background-color: #333;
    }
}

/* 打印样式 */
@media print {
    .ecs-buy-header,
    .ecs-buy-actions,
    .ecs-realname-tip {
        display: none;
    }
    
    .ecs-config-area,
    .ecs-price-panel {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 移动端布局优化 - 防止内容溢出 */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
        box-sizing: border-box;
    }
    
    *, *::before, *::after {
        box-sizing: inherit;
    }
    
    .ecs-buy-page {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
        box-sizing: border-box;
    }
    
    .ecs-buy-content {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding: 20px 0;
        box-sizing: border-box;
    }
    
    .ecs-buy-layout {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .ecs-config-area {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding: 20px 16px;
        margin: 0;
        border-radius: 12px;
    }
    
    .ecs-price-area {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        position: static;
        margin: 0;
    }
    
    .ecs-price-panel {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding: 20px 16px;
        margin: 0;
        border-radius: 12px;
    }
    
    .ecs-config-options {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: visible;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        box-sizing: border-box;
    }
    
    .ecs-config-option {
        width: calc(50% - 5px);
        max-width: calc(50% - 5px);
        min-width: 0;
        flex: 0 0 auto;
        padding: 14px 12px;
        text-align: center;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .ecs-config-item-header {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        box-sizing: border-box;
    }
    
    .ecs-config-controls {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: nowrap;
        box-sizing: border-box;
    }
    
    .ecs-os-types {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
        box-sizing: border-box;
    }
    
    .ecs-os-type {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .ecs-image-selector,
    .ecs-image-tabs,
    .ecs-image-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .ecs-image-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .ecs-image-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .ecs-image-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .ecs-config-tabs {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        box-sizing: border-box;
    }
    
    .ecs-config-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .ecs-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .ecs-config-steps {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 0 12px;
        margin-bottom: 24px;
        padding-bottom: 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        box-sizing: border-box;
        position: relative;
    }
    
    .ecs-config-steps::-webkit-scrollbar {
        display: none;
    }
    
    .ecs-step {
        flex-shrink: 0;
        white-space: nowrap;
        min-width: 120px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .ecs-step:first-child {
        padding-left: 0;
        margin-left: 0;
    }
    
    .ecs-step:last-child {
        padding-right: 0;
    }
    
    .ecs-step-line {
        width: 40px;
        flex-shrink: 0;
    }
    
    .ecs-config-input {
        flex: 1;
        min-width: 60px;
        max-width: 100px;
    }
    
    .ecs-btn-minus,
    .ecs-btn-plus {
        flex-shrink: 0;
        min-width: 40px;
        width: 40px;
        height: 40px;
    }
    
    .ecs-config-unit {
        flex-shrink: 0;
    }
    
    .ecs-overview-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .ecs-overview-item {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .ecs-price-item {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .ecs-buy-actions {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        gap: 12px;
        flex-direction: column;
    }
    
    .ecs-buy-btn,
    .ecs-add-cart-btn {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 14px;
        font-size: 15px;
    }
    
    .ecs-image-select-input {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .ecs-image-info {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
    }
    
    .ecs-buy-page {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .ecs-config-option {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        flex: 1 1 100%;
    }
    
    .ecs-os-types {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        width: 100%;
        overflow-x: hidden;
    }
}

/* 超小屏幕优化 */
@media (max-width: 375px) {
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
        box-sizing: border-box;
    }
    
    *, *::before, *::after {
        box-sizing: inherit;
    }
    
    .container {
        padding: 0 8px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .ecs-buy-page {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .ecs-config-area,
    .ecs-price-panel {
        padding: 12px 8px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        border-radius: 6px;
    }
    
    .ecs-config-option {
        padding: 10px 12px;
        font-size: 12px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex: 0 0 auto;
        box-sizing: border-box;
    }
    
    .ecs-os-types {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 6px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .ecs-os-type {
        padding: 10px 6px;
        min-height: 70px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .ecs-os-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 4px;
    }
    
    .ecs-os-logo {
        max-width: 16px;
        max-height: 16px;
    }
    
    .ecs-os-name {
        font-size: 10px;
        line-height: 1.1;
    }
    
    .ecs-os-badge {
        font-size: 8px;
        padding: 1px 4px;
        top: -3px;
        right: -3px;
    }
    
    .ecs-config-title {
        font-size: 14px;
    }
    
    .ecs-config-desc {
        font-size: 12px;
    }
    
    .ecs-config-label {
        font-size: 12px;
    }
    
    .ecs-config-hint {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .ecs-config-input {
        width: 80px;
        font-size: 16px;
        min-width: 50px;
        max-width: 80px;
        flex: 1;
        box-sizing: border-box;
    }
    
    .ecs-btn-minus,
    .ecs-btn-plus {
        width: 32px;
        height: 32px;
        min-width: 32px;
        flex-shrink: 0;
    }
    
    .ecs-buy-btn,
    .ecs-add-cart-btn {
        padding: 10px;
        font-size: 13px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .ecs-buy-actions {
        gap: 8px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        flex-direction: column;
    }
    
    .ecs-overview-item {
        font-size: 11px;
        padding: 4px 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .ecs-price-item {
        font-size: 11px;
        padding: 4px 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .ecs-total-price {
        font-size: 16px;
    }
    
    .ecs-guarantee-item {
        font-size: 12px;
        gap: 8px;
        padding: 6px 0;
    }
    
    .ecs-guarantee-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
        flex-shrink: 0;
    }
    
    .ecs-image-tabs {
        padding: 0 2px;
    }
    
    .ecs-image-tab {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .ecs-config-tabs {
        padding: 0 2px;
    }
    
    .ecs-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .ecs-config-steps {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 0 8px;
        margin-bottom: 20px;
        padding-bottom: 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        box-sizing: border-box;
        position: relative;
    }
    
    .ecs-config-steps::-webkit-scrollbar {
        display: none;
    }
    
    .ecs-step {
        padding: 0 8px;
        min-width: 90px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .ecs-step:first-child {
        padding-left: 0;
        margin-left: 0;
    }
    
    .ecs-step:last-child {
        padding-right: 0;
    }
    
    .ecs-step-line {
        width: 30px;
        flex-shrink: 0;
    }
    
    .ecs-step-text {
        font-size: 12px;
    }
    
    .ecs-step-number {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .ecs-overview-toggle {
        font-size: 12px;
        padding: 3px 5px;
    }
    
    .ecs-tip-text {
        font-size: 12px;
    }
    
    .ecs-tip-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 公网IP设置样式 */
.ecs-ip-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.ecs-ip-checkbox:hover {
    border-color: var(--primary-color);
}

.ecs-ip-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.ecs-ip-checkbox label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.ecs-ip-checkbox:hover label {
    color: var(--primary-color);
}

/* 带宽滑块样式 */
.ecs-bandwidth-slider {
    width: 100%;
    margin-bottom: 12px;
    padding: 4px 6px 0;
}

.ecs-bandwidth-slider input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 110, 255, 0.22) 0%, #dbe7f7 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: var(--transition);
}

.ecs-bandwidth-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.24);
    transition: var(--transition);
}

.ecs-bandwidth-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.4);
}

.ecs-bandwidth-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.24);
    transition: var(--transition);
}

.ecs-bandwidth-slider input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 110, 255, 0.4);
}

.ecs-bandwidth-slider input[type="range"]:focus {
    background: rgba(0, 110, 255, 0.1);
}

/* 带宽输入组样式 */
.ecs-bandwidth-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 4px 6px;
    border: 1px solid #d6e2f3;
    border-radius: 8px;
    background: #f8fbff;
}

.ecs-bandwidth-input-group .ecs-btn-minus,
.ecs-bandwidth-input-group .ecs-btn-plus {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border: 1px solid #d9e2ef;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ecs-bandwidth-input-group .ecs-btn-minus:hover:not(:disabled),
.ecs-bandwidth-input-group .ecs-btn-plus:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 110, 255, 0.15);
}

.ecs-bandwidth-input-group .ecs-config-input {
    width: 92px;
    height: 30px;
    border: none;
    border-radius: 6px;
    padding: 0 8px;
    font-size: 13px;
    text-align: center;
    transition: var(--transition);
    background: transparent;
}

.ecs-bandwidth-input-group .ecs-config-input:focus {
    outline: none;
    box-shadow: none;
}

.ecs-bandwidth-input-group .ecs-config-unit {
    min-width: 40px;
    font-size: 13px;
    color: #4e5969;
}

/* 配置项间距调整 */
.ecs-config-item {
    margin-bottom: 22px !important;
    padding-bottom: 22px !important;
}

.ecs-config-item:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 登录方式间距调整 */
.ecs-login-method {
    margin-top: 22px;
    margin-bottom: 22px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ecs-ip-checkbox {
        padding: 12px;
    }
    
    .ecs-bandwidth-slider {
        padding: 0 4px;
    }
    
    .ecs-bandwidth-input-group {
        gap: 8px;
    }
    
    .ecs-bandwidth-input-group .ecs-btn-minus,
    .ecs-bandwidth-input-group .ecs-btn-plus {
        width: 32px;
        height: 32px;
    }
    
    .ecs-bandwidth-input-group .ecs-config-input {
        width: 80px;
        height: 32px;
    }
    
    /* 响应式配置项间距 */
    .ecs-config-item {
        margin-bottom: 18px !important;
        padding-bottom: 18px !important;
    }
    
    .ecs-login-method {
        margin-top: 18px;
        margin-bottom: 18px;
    }
}

/* 弹窗提示样式 */
.ecs-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    transition: all 0.3s ease;
    min-width: 300px;
    max-width: 400px;
    word-break: break-word;
}

.ecs-notification-info {
    background-color: #f0f7ff;
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary);
}

.ecs-notification-success {
    background-color: #f6ffed;
    border-left: 4px solid var(--success-color);
    color: var(--text-primary);
}

.ecs-notification-warning {
    background-color: #fffbe6;
    border-left: 4px solid var(--warning-color);
    color: var(--text-primary);
}

.ecs-notification-error {
    background-color: #fff2f0;
    border-left: 4px solid var(--error-color);
    color: var(--text-primary);
}

.ecs-notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    margin-left: auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ecs-notification-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.ecs-notification.fade-out {
    opacity: 0;
    transform: translateX(20px);
}

/* 响应式弹窗 */
@media (max-width: 768px) {
    .ecs-notification {
        top: 16px;
        right: 16px;
        left: 16px;
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .ecs-notification {
        top: 12px;
        right: 12px;
        left: 12px;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* 弹性配置样式 */
.ecs-flexible-config-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ecs-flexible-config-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ecs-flexible-config-label {
    font-size: 14px;
    color: #666;
    font-weight: 400;
    min-width: 44px;
    flex-shrink: 0;
}

.ecs-flexible-config-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    align-items: center;
}

.ecs-flexible-option-btn {
    padding: 5px 14px;
    border: 1px solid #dcdcdc;
    background-color: #fff;
    color: #666;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 44px;
    text-align: center;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
}

.ecs-flexible-option-btn:hover {
    border-color: #c9cdd4;
    color: #333;
}

.ecs-flexible-option-btn.active {
    background-color: #0052d9;
    border-color: #0052d9;
    color: #fff;
}

.ecs-flexible-option-btn.active:hover {
    background-color: #0034a5;
    border-color: #0034a5;
    color: #fff;
}

@media (max-width: 768px) {
    .ecs-flexible-config-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ecs-flexible-config-label {
        min-width: auto;
    }
    
    .ecs-flexible-config-options {
        width: 100%;
    }
    
    .ecs-flexible-option-btn {
        flex: 1;
        min-width: 0;
    }
}

/* 磁盘存储样式 */
.ecs-disk-storage-item {
    margin-bottom: 18px;
}

.ecs-disk-storage-item:last-child {
    margin-bottom: 0;
}

.ecs-disk-storage-item-system,
.ecs-disk-storage-item-data {
    padding: 14px 16px;
    border: 1px solid #e6eefc;
    border-radius: 10px;
    background: linear-gradient(180deg, #fafcff 0%, #ffffff 100%);
}

.ecs-disk-storage-label {
    font-size: 13px;
    color: #4e5969;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.ecs-disk-storage-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ecs-disk-storage-content-system {
    justify-content: space-between;
}

.ecs-free-gift-btn {
    padding: 5px 12px;
    background-color: rgba(0, 82, 217, 0.08);
    color: #0052d9;
    border: 1px solid rgba(0, 82, 217, 0.18);
    border-radius: 999px;
    font-size: 12px;
    cursor: default;
    font-weight: 600;
    line-height: 1.2;
}

.ecs-free-gift-text {
    font-size: 13px;
    color: #1d2129;
    margin-left: 0;
    font-weight: 500;
}

/* 数据盘容器 */
.ecs-data-disks-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ecs-data-disk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px solid #dfe7f5;
    border-radius: 10px;
    background: #fff;
}

.ecs-data-disk-preset-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1 1 0;
    min-width: 220px;
}

.ecs-data-disk-preset-btn {
    padding: 5px 12px;
    border: 1px solid #d6e2f3;
    background-color: #fff;
    color: #4e5969;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 54px;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.ecs-price-area {
    width: 100%;
    min-width: 0;
    position: static;
}

.ecs-price-panel {
    padding: 18px;
    border-radius: 14px;
    border: 1px solid #d8e3f2;
    background: #f5f7fa;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

.ecs-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.ecs-summary-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d6e2f3;
    background: #fff;
    min-height: 42px;
    min-width: 172px;
    max-width: 100%;
}

.ecs-summary-chip-label {
    font-size: 13px;
    color: #999;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
}

.ecs-summary-chip-value {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.ecs-settlement-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
}

.ecs-settlement-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.ecs-settlement-info .ecs-summary-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
    width: 100%;
    min-width: 0;
    flex: none;
}

.ecs-settlement-info .ecs-summary-chip {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 34px;
    padding: 7px 10px;
    gap: 10px;
    flex: none;
}

.ecs-settlement-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0;
    flex-wrap: nowrap;
    overflow: visible;
}

.ecs-settlement-control-item {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.ecs-settlement-control-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.ecs-settlement-controls .ecs-duration-select {
    width: 146px;
    max-width: none;
    flex-shrink: 0;
    position: relative;
    z-index: 90;
}

.ecs-settlement-controls .ecs-duration-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #d6e2f3;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 1px 2px rgba(17, 37, 75, 0.04);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ecs-settlement-controls .ecs-duration-trigger-value {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 500;
    color: #1f2329;
    line-height: 1.2;
}

.ecs-settlement-controls .ecs-duration-trigger-arrow {
    flex-shrink: 0;
    font-size: 12px;
    color: #8aa3c7;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.ecs-settlement-controls .ecs-duration-select:hover .ecs-duration-trigger,
.ecs-settlement-controls .ecs-duration-select.is-open .ecs-duration-trigger,
.ecs-settlement-controls .ecs-duration-trigger:focus {
    border-color: #8fb4f8;
    background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
    box-shadow: 0 0 0 3px rgba(0, 110, 255, 0.08);
    outline: none;
}

.ecs-settlement-controls .ecs-duration-select:hover .ecs-duration-trigger-arrow,
.ecs-settlement-controls .ecs-duration-select.is-open .ecs-duration-trigger-arrow,
.ecs-settlement-controls .ecs-duration-trigger:focus .ecs-duration-trigger-arrow {
    color: #1664ff;
}

.ecs-settlement-controls .ecs-duration-select.is-open .ecs-duration-trigger-arrow {
    transform: rotate(180deg);
}

.ecs-settlement-controls .ecs-duration-dropdown {
    top: auto;
    bottom: calc(100% + 6px);
    left: 0;
    width: 188px;
    min-width: 188px;
    max-width: 220px;
    padding: 6px;
    border: 1px solid rgba(0, 110, 255, 0.16);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(17, 37, 75, 0.12);
    z-index: 90;
    gap: 4px;
}

.ecs-settlement-controls .ecs-duration-dropdown .ecs-config-option {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 36px;
    padding: 0 10px 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
}

.ecs-settlement-controls .ecs-duration-dropdown .ecs-config-option::before,
.ecs-settlement-controls .ecs-duration-dropdown .ecs-config-option::after {
    display: none;
}

.ecs-settlement-controls .ecs-duration-dropdown .ecs-config-option:hover {
    background: #f5f8ff;
    color: #1664ff;
    transform: none;
}

.ecs-settlement-controls .ecs-duration-dropdown .ecs-config-option.active {
    background: rgba(0, 110, 255, 0.08);
    color: #1664ff;
    box-shadow: none;
}

.ecs-settlement-controls .ecs-duration-dropdown .ecs-duration-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px;
    align-items: center;
    column-gap: 10px;
    width: 100%;
    min-height: 36px;
    min-width: 0;
    padding-right: 0;
}

.ecs-settlement-controls .ecs-duration-dropdown .ecs-duration-name {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 500;
    color: #1f2329;
    line-height: 18px;
    text-align: left;
}

.ecs-settlement-controls .ecs-duration-dropdown .ecs-duration-tag-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 100%;
    text-align: center;
}

.ecs-settlement-controls .ecs-duration-dropdown .ecs-option-tag {
    position: static;
    top: auto;
    right: auto;
    display: inline-flex;
    align-items: center;
    align-self: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 36px;
    height: 18px;
    min-height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 18px;
    vertical-align: middle;
    transform: none;
    animation: none;
}

.ecs-settlement-controls .ecs-quantity-stepper {
    gap: 4px;
    padding: 3px 5px;
    border: 1px solid #d6e2f3;
    border-radius: 8px;
    background: #f8fbff;
    min-height: 38px;
}

.ecs-settlement-controls .ecs-quantity-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 6px;
    border: 1px solid #d9e2ef;
    background: #fff;
    color: #666;
}

.ecs-settlement-controls .ecs-quantity-input {
    width: 34px;
    min-width: 34px;
    height: 26px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
}

.ecs-settlement-controls .ecs-quantity-unit {
    min-width: 14px;
    font-size: 14px;
    color: #666;
}

.ecs-price-main {
    flex: 1 1 420px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    row-gap: 10px;
    position: relative;
    padding-left: 14px;
}

.ecs-price-main::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 56px;
    background: #e8eef8;
    transform: translateY(-50%);
}

.ecs-settlement-total-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 260px;
    text-align: right;
}

.ecs-settlement-total-main {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.ecs-settlement-total-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    width: 100%;
}

.ecs-settlement-total-section::before,
.ecs-settlement-total-section::after {
    display: none;
}

.ecs-price-total {
    align-items: baseline;
    gap: 12px;
}

.ecs-total-label {
    font-size: 16px;
    color: #999;
    font-weight: 600;
}

.ecs-total-value {
    align-items: baseline;
    gap: 8px;
}

.ecs-total-price {
    font-size: 42px;
    line-height: 1;
    color: #333;
    font-weight: 700;
}

.ecs-total-period {
    font-size: 16px;
    color: #666;
}

.ecs-price-breakdown {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 13px;
    color: #999;
    position: relative;
}

.ecs-settlement-discount-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px 8px;
    width: 100%;
    max-width: 100%;
}

.ecs-price-breakdown-tip {
    position: static;
    display: inline-flex;
    align-items: center;
}

.ecs-price-breakdown-trigger {
    width: 18px;
    height: 18px;
    border: 1px solid #bfd3f5;
    border-radius: 50%;
    background: #f5f8ff;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.ecs-price-breakdown-trigger:hover,
.ecs-price-breakdown-trigger:focus {
    border-color: var(--primary-color);
    background: #eaf2ff;
    outline: none;
}

.ecs-price-breakdown-content {
    position: absolute;
    right: 50%;
    bottom: calc(100% + 12px);
    width: 260px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(17, 37, 75, 0.96);
    box-shadow: 0 12px 30px rgba(17, 37, 75, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translate(50%, 4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.ecs-price-breakdown-content::after {
    content: '';
    position: absolute;
    right: 32px;
    top: 100%;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(17, 37, 75, 0.96) transparent transparent transparent;
}

.ecs-price-breakdown-tip:hover .ecs-price-breakdown-content,
.ecs-price-breakdown-tip:focus-within .ecs-price-breakdown-content {
    opacity: 1;
    visibility: visible;
    transform: translate(50%, 0);
}

.ecs-price-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    font-size: 13px;
}

.ecs-price-detail-row + .ecs-price-detail-row {
    margin-top: 10px;
}

.ecs-price-detail-label {
    color: rgba(255, 255, 255, 0.78);
}

.ecs-price-breakdown-content .ecs-price-value {
    color: #fff;
    font-weight: 600;
}

.ecs-discount-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid #ffd8a8;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff7e8 0%, #ffedd5 100%);
    font-size: 12px;
    color: #d46b08;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 100%;
    box-shadow: 0 1px 4px rgba(212, 107, 8, 0.08);
}

.ecs-discount-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.ecs-discount-info::before {
    content: "🎁";
    font-size: 12px;
}

.ecs-discount-label {
    color: #ad6800;
    font-weight: 500;
}

.ecs-discount-name {
    color: #d46b08;
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ecs-discount-value {
    color: #d46b08;
    font-weight: 600;
    white-space: nowrap;
}

.ecs-original-price {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.ecs-buy-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    width: auto;
    margin: 0;
    padding: 0;
    margin-left: auto;
    margin-right: 0;
    max-width: 100%;
    flex: 0 0 auto;
}

.ecs-buy-btn,
.ecs-add-cart-btn {
    width: auto;
    min-width: 112px;
    padding: 0 22px;
    height: 44px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: none;
    flex-shrink: 1;
}

.ecs-add-cart-btn {
    min-width: 104px;
}

.ecs-realname-tip {
    width: 100%;
    max-width: none;
    margin-top: 24px;
    margin-bottom: 0;
    border-radius: 10px;
    border-color: #f3c2bf;
    background: #fff1f0;
    box-sizing: border-box;
}

.ecs-service-guarantee {
    margin-top: 20px;
    padding-top: 18px;
}

@media (max-width: 1320px) and (min-width: 993px) {
    .ecs-settlement-inline {
        flex-wrap: wrap;
        align-items: stretch;
        gap: 16px;
    }

    .ecs-settlement-info {
        width: 100%;
        flex-wrap: wrap;
        gap: 14px;
    }

    .ecs-settlement-info .ecs-summary-chips {
        flex-wrap: wrap;
        flex: 1 1 auto;
    }

    .ecs-settlement-info .ecs-summary-chip {
        min-width: 138px;
        padding: 10px 12px;
    }

    .ecs-settlement-controls {
        flex: 0 1 auto;
        flex-wrap: wrap;
        gap: 16px;
        row-gap: 10px;
    }

    .ecs-settlement-controls .ecs-duration-select {
        width: 118px;
    }

    .ecs-price-main {
        width: 100%;
        flex: 1 1 100%;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: wrap;
        row-gap: 10px;
        padding-left: 0;
        padding-top: 16px;
        border-top: 1px solid #e8eef8;
    }

    .ecs-price-main::before {
        display: none;
    }

    .ecs-settlement-total-section {
        min-width: 0;
        max-width: 100%;
        flex: 1 1 260px;
    }

    .ecs-settlement-discount-list {
        max-width: 100%;
    }

    .ecs-buy-actions {
        flex: 0 1 auto;
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .ecs-buy-btn,
    .ecs-add-cart-btn {
        min-width: 102px;
        padding: 0 16px;
    }
}

@media (max-width: 992px) {
    .ecs-settlement-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .ecs-settlement-info {
        width: 100%;
        flex-wrap: wrap;
        gap: 16px;
    }

    .ecs-settlement-info .ecs-summary-chips {
        width: 100%;
        flex-wrap: wrap;
    }

    .ecs-settlement-controls {
        width: 100%;
        justify-content: flex-start;
        padding: 0;
    }

    .ecs-settlement-controls .ecs-duration-select {
        width: 100%;
        max-width: 100%;
    }

    .ecs-settlement-controls .ecs-duration-dropdown {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .ecs-price-main {
        width: 100%;
        justify-content: space-between;
        align-items: flex-end;
        flex-wrap: wrap;
        row-gap: 12px;
        padding-left: 0;
        padding-top: 18px;
        border-top: 1px solid #e8eef8;
    }

    .ecs-price-main::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .ecs-price-panel {
        padding: 14px;
    }

    .ecs-summary-chips {
        gap: 10px;
        margin-bottom: 12px;
    }

    .ecs-summary-chip {
        width: 100%;
        min-width: 0;
        justify-content: space-between;
    }

    .ecs-settlement-controls {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ecs-settlement-control-item {
        width: 100%;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
    }

    .ecs-settlement-control-label {
        min-width: 42px;
        padding-top: 10px;
    }

    .ecs-settlement-controls .ecs-duration-select {
        flex: 1;
        width: auto;
    }

    .ecs-settlement-controls .ecs-duration-trigger {
        min-height: 40px;
    }

    .ecs-settlement-controls .ecs-duration-dropdown {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        bottom: calc(100% + 8px);
        padding: 6px;
        max-height: min(260px, 52vh);
    }

    .ecs-settlement-controls .ecs-duration-dropdown .ecs-config-option {
        min-height: 40px;
        padding: 0 12px;
    }

    .ecs-settlement-controls .ecs-duration-dropdown .ecs-duration-info {
        grid-template-columns: minmax(0, 1fr) 60px;
        column-gap: 8px;
        min-height: 40px;
    }

    .ecs-settlement-controls .ecs-duration-dropdown .ecs-duration-tag-slot {
        min-width: 60px;
    }

    .ecs-settlement-controls .ecs-quantity-stepper {
        flex: 1;
        justify-content: space-between;
    }

    .ecs-price-main {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 16px;
    }

    .ecs-settlement-total-section {
        width: 100%;
        align-items: flex-start;
        text-align: left;
        padding-bottom: 12px;
        border-bottom: 1px solid #e8eef8;
        min-width: 0;
    }

    .ecs-settlement-total-main,
    .ecs-settlement-total-meta,
    .ecs-settlement-discount-list {
        width: 100%;
        justify-content: flex-start;
    }

    .ecs-settlement-total-meta {
        align-items: flex-start;
    }

    .ecs-price-total {
        width: 100%;
        align-items: baseline;
        justify-content: space-between;
    }

    .ecs-total-price {
        font-size: 34px;
    }

    .ecs-buy-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .ecs-price-breakdown {
        justify-content: flex-start;
    }

    .ecs-buy-btn,
    .ecs-add-cart-btn {
        width: 100%;
        min-width: 0;
        font-size: 16px;
        padding: 0 16px;
    }

    .ecs-price-breakdown-content {
        right: auto;
        left: 0;
        transform: translateY(4px);
    }

    .ecs-price-breakdown-tip:hover .ecs-price-breakdown-content,
    .ecs-price-breakdown-tip:focus-within .ecs-price-breakdown-content {
        transform: translateY(0);
    }

    .ecs-price-breakdown-content::after {
        left: 18px;
        right: auto;
    }

    .ecs-realname-tip {
        max-width: 100%;
        margin-top: 16px;
    }
}

@media (max-width: 480px) {
    .ecs-price-total {
        flex-wrap: wrap;
        gap: 6px;
    }

    .ecs-settlement-control-item {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .ecs-settlement-control-label {
        min-width: 0;
        padding-top: 0;
    }

    .ecs-settlement-controls .ecs-duration-select {
        width: 100%;
    }

    .ecs-settlement-controls .ecs-duration-dropdown {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        left: 0;
        right: auto;
        bottom: calc(100% + 6px);
        max-height: min(220px, 46vh);
    }

    .ecs-settlement-controls .ecs-duration-dropdown .ecs-duration-info {
        grid-template-columns: minmax(0, 1fr) 56px;
    }

    .ecs-settlement-controls .ecs-duration-dropdown .ecs-duration-tag-slot {
        min-width: 56px;
    }

    .ecs-settlement-controls .ecs-quantity-stepper {
        width: 100%;
        flex: none;
    }

    .ecs-total-price {
        font-size: 28px;
    }

    .ecs-price-breakdown-content {
        width: min(240px, calc(100vw - 32px));
    }

    .ecs-settlement-discount-list {
        gap: 6px;
    }

    .ecs-discount-item,
    .ecs-original-price {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .ecs-settlement-info {
        align-items: stretch;
    }

    .ecs-settlement-info .ecs-summary-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 12px;
    }

    .ecs-settlement-info .ecs-summary-chip {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: none;
    }

    .ecs-settlement-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 12px;
        align-items: stretch;
    }

    .ecs-settlement-control-item {
        width: 100%;
        min-width: 0;
    }

    .ecs-settlement-controls .ecs-duration-select,
    .ecs-settlement-controls .ecs-quantity-stepper {
        width: 100%;
        max-width: 100%;
    }

    .ecs-settlement-total-section {
        align-items: flex-start;
        text-align: left;
    }

    .ecs-settlement-total-main,
    .ecs-settlement-total-meta,
    .ecs-settlement-discount-list,
    .ecs-price-breakdown {
        justify-content: flex-start;
    }

    .ecs-buy-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .ecs-config-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 0;
        margin: 0;
    }

    .ecs-config-option {
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: 12px 14px;
        flex: none;
        align-items: flex-start;
        text-align: left;
    }

    .ecs-config-steps,
    .ecs-config-tabs,
    .ecs-image-tabs {
        scroll-snap-type: x proximity;
        scroll-padding-inline: 16px;
    }

    .ecs-step,
    .ecs-tab,
    .ecs-image-tab {
        scroll-snap-align: start;
    }

    .ecs-settlement-info .ecs-summary-chips,
    .ecs-settlement-controls {
        grid-template-columns: 1fr;
    }

    .ecs-summary-chip {
        padding: 10px 12px;
        align-items: flex-start;
    }

    .ecs-summary-chip-label {
        line-height: 1.3;
    }

    .ecs-summary-chip-value {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.4;
        text-align: left;
    }

    .ecs-settlement-control-item {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .ecs-settlement-control-label {
        min-width: 0;
        padding-top: 0;
    }

    .ecs-price-breakdown-content {
        width: min(280px, calc(100vw - 48px));
        max-width: calc(100vw - 48px);
    }

    .ecs-buy-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .ecs-buy-btn,
    .ecs-add-cart-btn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 576px) {
    .ecs-config-options,
    .ecs-buy-actions {
        grid-template-columns: 1fr;
    }

    .ecs-settlement-inline {
        gap: 14px;
    }
}

.ecs-config-steps {
    display: grid;
    grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto;
    width: 100%;
    gap: 0;
    align-items: center;
    overflow: visible;
    white-space: normal;
}

.ecs-step {
    width: 100%;
    min-width: 0;
    padding: 0;
    gap: 10px;
    overflow: visible;
    justify-content: flex-start;
}

.ecs-step:nth-child(1) {
    grid-column: 1 / 3;
}

.ecs-step:nth-child(2) {
    grid-column: 3 / 5;
}

.ecs-step:last-child {
    grid-column: 5 / 6;
    width: auto;
    justify-self: end;
}

.ecs-step-line {
    width: auto;
    min-width: 18px;
    margin-left: 0;
    flex: 1;
}

.ecs-step-text {
    min-width: 0;
    line-height: 1.4;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .ecs-config-steps {
        grid-template-columns: auto minmax(16px, 1fr) auto minmax(16px, 1fr) auto;
        padding: 8px 0 12px;
    }

    .ecs-step {
        gap: 8px;
    }

    .ecs-step-line {
        min-width: 12px;
    }
}

@media (max-width: 576px) {
    .ecs-config-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 8px 0 10px;
    }

    .ecs-step,
    .ecs-step:nth-child(1),
    .ecs-step:nth-child(2),
    .ecs-step:last-child {
        grid-column: auto;
        width: 100%;
        justify-self: auto;
    }

    .ecs-step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .ecs-step-text {
        font-size: 12px;
    }

    .ecs-step-line {
        min-width: 8px;
    }

    .ecs-step:nth-child(2),
    .ecs-step:last-child {
        justify-content: flex-start;
    }
}

@media (max-width: 400px) {
    .ecs-config-steps {
        gap: 6px;
    }

    .ecs-step {
        gap: 6px;
    }

    .ecs-step-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .ecs-step-text {
        font-size: 11px;
    }

    .ecs-step-line {
        min-width: 6px;
    }
}

.ecs-data-disk-preset-btn:hover {
    border-color: #0052d9;
    color: #0052d9;
    background: rgba(0, 82, 217, 0.04);
}

.ecs-data-disk-preset-btn.active {
    background-color: rgba(0, 82, 217, 0.08);
    border-color: #0052d9;
    color: #0052d9;
    box-shadow: inset 0 0 0 1px rgba(0, 82, 217, 0.08);
}

.ecs-data-disk-preset-btn.active:hover {
    background-color: rgba(0, 82, 217, 0.12);
    border-color: #0034a5;
    color: #0034a5;
}

.ecs-data-disk-custom-input {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border: 1px solid #d6e2f3;
    border-radius: 8px;
    background: #f8fbff;
}

.ecs-data-disk-input {
    width: 72px;
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    background: transparent;
}

.ecs-data-disk-input:focus {
    outline: none;
    box-shadow: none;
}

.ecs-data-disk-unit {
    min-width: 14px;
    font-size: 13px;
    color: #4e5969;
}

.ecs-data-disk-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    padding-top: 2px;
}

.ecs-add-disk-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background-color: #0052d9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.ecs-add-disk-btn:hover {
    background-color: #0034a5;
}

.ecs-add-disk-btn:disabled {
    background-color: #dcdcdc;
    color: #999;
    cursor: not-allowed;
}

.ecs-add-icon {
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

.ecs-disk-hint {
    font-size: 12px;
    color: #86909c;
    line-height: 1.4;
}

.ecs-remove-disk-btn {
    padding: 5px 12px;
    background-color: #fff5f5;
    color: #d5444e;
    border: 1px solid #d5444e;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    font-weight: 500;
}

.ecs-remove-disk-btn:hover {
    background-color: #d5444e;
    color: #fff;
}

@media (max-width: 768px) {
    .ecs-disk-storage-item-system,
    .ecs-disk-storage-item-data {
        padding: 12px;
    }

    .ecs-disk-storage-content-system {
        justify-content: flex-start;
    }

    .ecs-data-disk-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ecs-data-disk-preset-options {
        width: 100%;
        min-width: 0;
    }
    
    .ecs-data-disk-preset-btn {
        flex: 1;
        min-width: 0;
    }
    
    .ecs-data-disk-actions {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }
}

@media (max-width: 992px) {
    .ecs-flexible-config-item {
        align-items: flex-start;
    }

    .ecs-flexible-config-options {
        width: 100%;
    }

    .ecs-flexible-option-btn {
        min-width: 72px;
    }

    .ecs-config-controls {
        gap: 12px;
    }

    .ecs-bandwidth-slider,
    .ecs-bandwidth-input-group {
        width: 100%;
    }

    .ecs-bandwidth-input-group {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .ecs-flexible-config-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ecs-flexible-option-btn {
        width: 100%;
        min-width: 0;
        padding-inline: 12px;
    }

    .ecs-bandwidth-slider {
        margin-bottom: 8px;
        padding: 0;
    }

    .ecs-bandwidth-input-group {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 40px auto;
        gap: 8px;
        align-items: center;
        margin-top: 0;
    }

    .ecs-bandwidth-input-group .ecs-config-input {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .ecs-data-disk-preset-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .ecs-data-disk-custom-input {
        width: 100%;
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 40px auto;
        gap: 8px;
        align-items: center;
    }

    .ecs-data-disk-input {
        width: 100%;
        min-width: 0;
    }

    .ecs-data-disk-actions {
        gap: 10px;
    }

    .ecs-add-disk-btn {
        width: 100%;
        justify-content: center;
    }

    .ecs-disk-hint {
        width: 100%;
        line-height: 1.5;
    }

    .ecs-remove-disk-btn {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .ecs-flexible-config-options,
    .ecs-data-disk-preset-options {
        grid-template-columns: 1fr;
    }

    .ecs-bandwidth-input-group,
    .ecs-data-disk-custom-input {
        grid-template-columns: 36px minmax(0, 1fr) 36px auto;
    }

    .ecs-bandwidth-input-group .ecs-btn-minus,
    .ecs-bandwidth-input-group .ecs-btn-plus,
    .ecs-data-disk-custom-input .ecs-btn-minus,
    .ecs-data-disk-custom-input .ecs-btn-plus {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}

@media (max-width: 480px) {
    .ecs-config-controls {
        padding: 0;
        margin: 0;
    }

    .ecs-bandwidth-input-group .ecs-config-input,
    .ecs-data-disk-input {
        min-height: 40px;
        font-size: 16px;
    }

    .ecs-bandwidth-input-group .ecs-config-unit,
    .ecs-data-disk-unit {
        justify-self: end;
        white-space: nowrap;
    }

    .ecs-data-disk-custom-input .ecs-data-disk-unit {
        justify-self: start;
    }

    .ecs-remove-disk-btn {
        width: 100%;
        text-align: center;
    }
}

.ecs-confirm-page {
    align-self: flex-start;
}

.ecs-confirm-page-panel {
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.ecs-confirm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    border-bottom: 1px solid #e5eaf3;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.ecs-confirm-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2329;
}

.ecs-confirm-subtitle {
    margin-top: 8px;
    font-size: 14px;
    color: #4e5969;
}

.ecs-confirm-close,
.ecs-confirm-primary {
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ecs-confirm-close {
    background: #f2f3f5;
    color: #1f2329;
}

.ecs-confirm-close {
    min-width: 112px;
    height: 40px;
    border-radius: 10px;
    padding: 0 18px;
}

.ecs-confirm-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    padding: 32px;
}

.ecs-confirm-overview {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ecs-confirm-overview-item {
    padding: 16px 18px;
    border: 1px solid #d9e7ff;
    border-radius: 14px;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.ecs-confirm-overview-item span {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #667085;
}

.ecs-confirm-overview-item strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1f2329;
}

.ecs-confirm-main,
.ecs-confirm-side {
    min-width: 0;
}

.ecs-confirm-side {
    align-self: start;
}

.ecs-confirm-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2329;
    margin-bottom: 20px;
}

.ecs-confirm-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
}

.ecs-confirm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f9fbff;
}

.ecs-confirm-item span,
.ecs-confirm-price-row span {
    font-size: 14px;
    color: #4e5969;
}

.ecs-confirm-item strong,
.ecs-confirm-price-row strong {
    font-size: 14px;
    font-weight: 600;
    color: #1f2329;
    text-align: right;
    word-break: break-word;
}

.ecs-confirm-price-section {
    padding: 18px 20px;
    border: 1px solid #e7edf5;
    border-radius: 16px;
    background: #fbfdff;
}

.ecs-confirm-price-section + .ecs-confirm-price-section {
    margin-top: 16px;
}

.ecs-confirm-section-title {
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2329;
}

.ecs-confirm-fee-list {
    padding-bottom: 0;
    border-bottom: none;
}

.ecs-confirm-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.ecs-confirm-price-row .is-highlight {
    font-size: 28px;
    color: #ed7b2f;
}

/* 活动折扣行特殊样式 */
#confirmSalesDiscountRow {
    background: linear-gradient(135deg, #fffbf5 0%, #fff7e8 100%);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 3px solid #faad14;
}

#confirmSalesDiscountRow span {
    color: #ad6800;
    font-weight: 500;
    position: relative;
    padding-left: 20px;
}

#confirmSalesDiscountRow span::before {
    content: "🎁";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-55%);
    font-size: 13px;
}

#confirmSalesDiscountRow strong {
    color: #d46b08;
    font-weight: 700;
    font-size: 15px;
}

.ecs-confirm-total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e7edf5;
}

.ecs-confirm-total > span {
    font-size: 14px;
    color: #4e5969;
}

.ecs-confirm-total-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.ecs-confirm-price-tip {
    padding-top: 16px;
    font-size: 13px;
    line-height: 1.7;
    color: #86909c;
}

.ecs-confirm-actions {
    display: block;
    margin-top: 20px;
}

.ecs-confirm-primary {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
}

.ecs-confirm-primary {
    background: #006eff;
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 110, 255, 0.22);
}

.ecs-confirm-primary:hover {
    background: #0052d9;
}

.ecs-confirm-close:hover {
    background: #e5e6eb;
}

.ecs-confirm-primary[disabled],
.ecs-confirm-close[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 991px) {
    .ecs-confirm-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .ecs-confirm-header,
    .ecs-confirm-content {
        padding: 20px 16px;
    }

    .ecs-confirm-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ecs-confirm-items {
        grid-template-columns: 1fr;
    }

    .ecs-confirm-overview {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ecs-confirm-total {
        align-items: flex-start;
        flex-direction: column;
    }

    .ecs-confirm-close,
    .ecs-confirm-primary {
        width: 100%;
    }
}

.ecs-buy-title {
    line-height: 1.2;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.ecs-buy-subtitle {
    line-height: 1.7;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.ecs-header-actions {
    flex-wrap: wrap;
    row-gap: 12px;
}

.ecs-header-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ecs-config-title {
    line-height: 1.4;
}

.ecs-config-desc {
    line-height: 1.7;
}

.ecs-realname-tip {
    align-items: flex-start;
}

.ecs-tip-content {
    min-width: 0;
}

.ecs-tip-btn {
    display: inline-flex;
    align-items: center;
}

.ecs-guarantee-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.ecs-guarantee-item {
    min-width: 0;
    align-items: flex-start;
}

.ecs-guarantee-text,
.ecs-tip-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .ecs-buy-title {
        max-width: 100%;
        line-height: 1.25;
    }

    .ecs-buy-subtitle {
        max-width: 100%;
        line-height: 1.6;
    }

    .ecs-guarantee-items {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .ecs-header-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
    }

    .ecs-header-link {
        width: 100%;
    }

    .ecs-realname-tip {
        flex-direction: column;
        gap: 12px;
    }

    .ecs-tip-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .ecs-buy-title {
        font-size: 24px;
    }

    .ecs-buy-subtitle {
        font-size: 13px;
    }
}

@media (max-width: 1200px) {
    .container {
        width: 100%;
        max-width: 1120px;
        padding: 0 16px;
    }

    .ecs-buy-layout {
        gap: 20px;
    }

    .ecs-config-area,
    .ecs-price-area {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 992px) {
    .container {
        width: 100%;
        max-width: 860px;
        padding: 0 16px;
    }

    .ecs-config-panel {
        padding: 0;
    }

    .ecs-price-area {
        order: 0;
    }

    .ecs-price-panel {
        margin-top: 4px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1280px;
        padding: 0 24px;
    }

    .ecs-buy-header {
        padding: 72px 0 68px;
    }

    .ecs-header-content {
        max-width: 960px;
    }

    .ecs-buy-title {
        font-size: 42px;
        letter-spacing: 0.5px;
    }

    .ecs-buy-subtitle {
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
        font-size: 18px;
    }

    .ecs-header-actions {
        display: inline-flex;
        gap: 16px;
        padding: 10px;
        margin: 0 auto;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.14);
        backdrop-filter: blur(8px);
    }

    .ecs-header-link {
        min-width: 120px;
        padding: 10px 20px;
        border-radius: 999px;
    }

    .ecs-buy-layout {
        gap: 32px;
        align-items: flex-start;
    }

    .ecs-config-area {
        padding: 36px;
        border: 1px solid rgba(0, 110, 255, 0.08);
        box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
    }

    .ecs-config-steps {
        margin-bottom: 36px;
        padding: 14px 20px 18px;
        border-radius: 14px;
        background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
        border: 1px solid rgba(0, 110, 255, 0.08);
    }

    .ecs-step-number {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .ecs-step-text {
        font-size: 15px;
    }

    .ecs-config-section {
        margin-bottom: 36px;
    }

    .ecs-config-title {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .ecs-config-desc {
        margin-bottom: 18px;
    }

    .ecs-config-options {
        gap: 14px;
    }

    .ecs-price-area {
        width: 408px;
        top: 32px;
    }

    .ecs-price-panel {
        padding: 28px;
        border: 1px solid rgba(0, 110, 255, 0.08);
        box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
    }

    .ecs-price-title {
        font-size: 20px;
        margin-bottom: 28px;
    }

    .ecs-config-overview,
    .ecs-price-calculation,
    .ecs-service-guarantee {
        margin-bottom: 28px;
    }

    .ecs-overview-item:hover,
    .ecs-price-item:hover {
        padding-left: 10px;
        background-color: #f8fbff;
    }

    .ecs-config-option {
        min-height: 92px;
        padding: 16px 20px;
        font-size: 15px;
    }

    .ecs-price-total-section {
        padding: 16px;
        border-radius: 10px;
        background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
        border: 1px solid rgba(0, 110, 255, 0.08);
    }

    .ecs-buy-actions {
        align-items: stretch;
        gap: 14px;
        margin-bottom: 28px;
    }

    .ecs-buy-btn {
        flex: 1.2;
        min-height: 50px;
        font-size: 17px;
    }

    .ecs-add-cart-btn {
        flex: 0.8;
        min-height: 50px;
    }
}

@media (min-width: 992px) {
    .ecs-buy-layout {
        flex-direction: column;
        gap: 20px;
    }

    .ecs-config-area,
    .ecs-price-area {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .ecs-price-area {
        position: sticky;
        bottom: 0;
        top: auto;
        z-index: 30;
    }

    .ecs-price-panel {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 20px;
        padding: 12px 18px;
        border-radius: 12px 12px 0 0;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(0, 110, 255, 0.12);
        box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.08);
        backdrop-filter: blur(12px);
    }

    .ecs-price-title,
    .ecs-settlement-main,
    .ecs-realname-tip,
    .ecs-service-guarantee {
        grid-column: 1 / -1;
    }

    .ecs-price-title {
        display: none;
    }

    .ecs-config-overview {
        margin-bottom: 0;
        padding: 0;
        border: none;
        border-radius: 0;
        background-color: transparent;
        flex: 1 1 420px;
        min-width: 0;
    }

    .ecs-price-calculation {
        margin-bottom: 0;
        padding: 0;
        border: none;
        border-radius: 0;
        background-color: transparent;
        flex: 0 0 auto;
        min-width: 0;
    }

    .ecs-settlement-main {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        flex-wrap: wrap;
        margin-left: 0;
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }

    .ecs-price-total-section {
        margin-top: 0;
        padding: 0 0 0 18px;
        border-top: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        border-left: 1px solid rgba(0, 110, 255, 0.1);
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap;
        flex: 0 1 auto;
    }

    .ecs-buy-actions {
        flex: 0 1 auto;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 0;
        border-top: none;
        margin-left: auto;
        width: auto;
        max-width: 100%;
        gap: 10px;
        padding: 0;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
    }

    .ecs-service-guarantee {
        display: none;
    }

    .ecs-overview-title,
    .ecs-calculation-title {
        display: none;
    }

    .ecs-overview-content {
        max-height: none;
        display: flex;
        flex-wrap: wrap;
        gap: 8px 10px;
    }

    .ecs-overview-item {
        min-height: auto;
        align-items: center;
        margin-bottom: 0;
        padding: 7px 12px;
        border: 1px solid rgba(0, 110, 255, 0.12);
        border-radius: 8px;
        background-color: #fff;
        gap: 6px;
        flex: 0 0 auto;
    }

    .ecs-overview-item:nth-child(4),
    .ecs-overview-item:nth-child(5),
    .ecs-overview-item:nth-child(6),
    .ecs-overview-item:nth-child(7),
    .ecs-overview-item:nth-child(8) {
        display: none;
    }

    .ecs-overview-item:nth-child(1),
    .ecs-overview-item:nth-child(2) {
        min-width: 108px;
        justify-content: space-between;
    }

    .ecs-price-item {
        display: none;
    }

    .ecs-overview-label,
    .ecs-price-label {
        color: var(--text-light);
        font-size: 12px;
    }

    .ecs-overview-value,
    .ecs-price-value {
        color: var(--text-primary);
        font-size: 13px;
        font-weight: 500;
    }

    .ecs-overview-toggle {
        display: none;
    }

    .ecs-price-calculation {
        display: flex;
        align-items: center;
        gap: 0;
        flex-wrap: wrap;
        flex: 0 0 auto;
    }

    .ecs-calculation-title {
        margin-bottom: 0;
        white-space: nowrap;
    }

    .ecs-price-total {
        gap: 10px;
        flex-wrap: nowrap;
        align-items: baseline;
    }

    .ecs-price-total::before,
    .ecs-price-total-section::before {
        display: none;
    }

    .ecs-total-label {
        font-size: 13px;
        color: var(--text-light);
    }

    .ecs-total-price {
        font-size: 26px;
    }

    .ecs-total-period {
        font-size: 13px;
    }

    .ecs-original-price {
        padding-top: 0;
        gap: 6px;
        align-items: center;
        white-space: nowrap;
    }

    .ecs-discount-item,
    .ecs-original-price {
        margin-bottom: 0;
    }

    .ecs-discount-item {
        padding: 4px 10px;
        font-size: 12px;
        border-radius: 999px;
        border-color: #ffd8a8;
        background-color: #fff7e8;
        white-space: nowrap;
    }

    .ecs-buy-btn,
    .ecs-add-cart-btn {
        width: auto;
        border-radius: 8px;
        padding: 11px 18px;
        font-size: 14px;
        min-height: 42px;
        box-shadow: none;
    }

    .ecs-buy-btn {
        min-width: 124px;
    }

    .ecs-add-cart-btn {
        min-width: 108px;
    }
}

@media (max-width: 768px) {
    .ecs-buy-header {
        padding: 36px 0 32px;
    }

    .ecs-header-content {
        max-width: 100%;
    }

    .ecs-header-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .ecs-header-link {
        flex: 1 1 calc(50% - 5px);
        text-align: center;
        min-width: 0;
    }

    .ecs-config-area,
    .ecs-price-panel {
        border-radius: 10px;
    }

    .ecs-config-area,
    .ecs-price-panel {
        border: 1px solid var(--border-color);
        box-shadow: none;
    }

    .ecs-price-area {
        order: 0;
    }

    .ecs-price-panel {
        margin-top: 8px;
    }

    .ecs-config-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ecs-config-option {
        min-width: 0;
        max-width: none;
    }

    .ecs-config-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .ecs-bandwidth-slider,
    .ecs-bandwidth-input-group,
    .ecs-image-select,
    .ecs-image-select-input {
        width: 100%;
    }

    .ecs-bandwidth-input-group {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ecs-overview-content {
        max-height: 132px;
    }

    .ecs-overview-content.expanded {
        max-height: 420px;
    }

    .ecs-overview-toggle {
        display: inline-flex;
    }

    .ecs-guarantee-items {
        gap: 12px;
    }

    .ecs-guarantee-item {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .ecs-disk-storage-content,
    .ecs-data-disk-custom-input,
    .ecs-username-display {
        width: 100%;
        flex-wrap: wrap;
    }

    .ecs-data-disk-custom-input .ecs-data-disk-input {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }

    .ecs-add-disk-btn,
    .ecs-remove-disk-btn {
        min-height: 40px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .ecs-buy-content {
        padding: 16px 0;
    }

    .ecs-buy-title {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .ecs-buy-subtitle {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .ecs-header-link {
        flex-basis: 100%;
    }

    .ecs-config-area,
    .ecs-price-panel {
        padding: 16px 14px;
    }

    .ecs-price-title {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .ecs-config-overview,
    .ecs-price-calculation,
    .ecs-service-guarantee {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }

    .ecs-config-section {
        margin-bottom: 20px;
    }

    .ecs-config-title {
        font-size: 15px;
    }

    .ecs-config-desc {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .ecs-config-options {
        gap: 8px;
    }

    .ecs-buy-actions {
        flex-direction: column;
        position: sticky;
        bottom: 0;
        z-index: 12;
        margin: 20px -14px -16px;
        padding: 14px;
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid rgba(0, 110, 255, 0.12);
        backdrop-filter: blur(10px);
    }

    .ecs-buy-btn,
    .ecs-add-cart-btn,
    .ecs-tip-btn {
        width: 100%;
    }

    .ecs-buy-btn,
    .ecs-add-cart-btn {
        min-height: 46px;
    }

    .ecs-overview-item,
    .ecs-price-item {
        align-items: flex-start;
        gap: 10px;
    }

    .ecs-discount-item,
    .ecs-price-total {
        align-items: flex-start;
        gap: 8px;
    }

    .ecs-price-title::after {
        min-width: 0;
    }

    .ecs-discount-info {
        flex-wrap: wrap;
    }

    .ecs-price-total {
        padding-top: 12px;
        margin-top: 12px;
    }

    .ecs-total-price {
        font-size: 20px;
    }

    .ecs-flexible-config-options,
    .ecs-data-disk-preset-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .ecs-flexible-option-btn,
    .ecs-data-disk-preset-btn {
        width: 100%;
    }

    .ecs-data-disk-actions {
        width: 100%;
    }

    .ecs-remove-disk-btn,
    .ecs-add-disk-btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .ecs-realname-tip {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 420px) {
    .ecs-config-options,
    .ecs-flexible-config-options,
    .ecs-data-disk-preset-options {
        grid-template-columns: 1fr;
    }

    .ecs-guarantee-item {
        flex-basis: 100%;
    }

    .ecs-bandwidth-input-group {
        gap: 6px;
    }

    .ecs-bandwidth-input-group .ecs-config-input,
    .ecs-config-input {
        width: 100%;
        max-width: none;
    }

    .ecs-step {
        min-width: 92px;
    }

    .ecs-step-line {
        width: 24px;
    }

    .ecs-buy-actions {
        margin-left: -12px;
        margin-right: -12px;
        margin-bottom: -14px;
        padding: 12px;
    }
}

@media (min-width: 993px) {
    .ecs-settlement-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .ecs-settlement-info {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .ecs-settlement-info .ecs-summary-chips {
        flex: 1 1 auto;
        flex-wrap: wrap;
    }

    .ecs-settlement-controls {
        flex: 0 1 auto;
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 10px;
    }

    .ecs-price-main {
        width: 100%;
        flex: 1 1 100%;
        justify-content: flex-end;
        align-items: center;
        padding-left: 0;
        padding-top: 16px;
        border-top: 1px solid #e8eef8;
    }

    .ecs-price-main::before {
        display: none;
    }

    .ecs-settlement-total-section {
        min-width: 0;
        max-width: 100%;
    }
}
