/* 市场页面样式 */
.market-header {
    margin-bottom: 30px;
    text-align: center;
}

.market-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.market-desc {
    font-size: 16px;
    color: #666;
}

.market-content {
    display: flex;
    gap: 30px;
}

/* 筛选面板样式 */
.filter-panel {
    width: 280px;
    flex-shrink: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.filter-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-option input[type="checkbox"] {
    margin-right: 5px;
}

.option-text {
    font-size: 14px;
    color: #555;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-range input {
    width: 80px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 10px;
}

.price-separator {
    color: #999;
}

.btn-price-filter {
    height: 32px;
    padding: 0 10px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 实例列表样式 */
.instance-list {
    flex: 1;
}

.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-label {
    font-size: 14px;
    color: #666;
}

.sort-option {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
}

.sort-option.active {
    color: #3f87f5;
    background-color: rgba(63, 135, 245, 0.1);
    font-weight: 500;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-option {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
}

.view-option.active {
    background-color: rgba(63, 135, 245, 0.1);
    color: #3f87f5;
}

.icon-grid, .icon-list {
    font-size: 18px;
}

/* 实例卡片样式 */
.instance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.instance-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.instance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.instance-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.instance-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.instance-tag {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: #f5f5f5;
    color: #666;
}

.instance-card:nth-child(1) .instance-tag {
    background-color: #ffecec;
    color: #ff4d4f;
}

.instance-card:nth-child(2) .instance-tag {
    background-color: #e6f7ff;
    color: #1890ff;
}

.instance-card:nth-child(3) .instance-tag {
    background-color: #f6ffed;
    color: #52c41a;
}

.instance-card:nth-child(4) .instance-tag {
    background-color: #fff7e6;
    color: #fa8c16;
}

.instance-card:nth-child(5) .instance-tag {
    background-color: #f9f0ff;
    color: #722ed1;
}

.instance-card:nth-child(6) .instance-tag {
    background-color: #e6fffb;
    color: #13c2c2;
}

.instance-body {
    padding: 15px;
    display: flex;
    justify-content: space-between;
}

.instance-specs {
    flex: 1;
}

.spec-item {
    margin-bottom: 10px;
}

.spec-item:last-child {
    margin-bottom: 0;
}

.spec-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 3px;
}

.spec-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.instance-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.price-value {
    font-size: 20px;
    font-weight: 600;
    color: #ff4d4f;
}

.price-unit {
    font-size: 12px;
    color: #999;
}

.instance-footer {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #f0f0f0;
}

.btn-rent, .btn-details {
    flex: 1;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
}

.page-prev, .page-next, .page-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background-color: #fff;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.page-item.active {
    background-color: #3f87f5;
    color: #fff;
}

.page-prev:hover, .page-next:hover, .page-item:hover {
    background-color: #f5f5f5;
}

.page-item.active:hover {
    background-color: #3f87f5;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-dialog {
    max-width: 700px;
    margin: 50px auto;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #f0f0f0;
}

/* 实例详情弹窗样式 */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.detail-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.detail-tag {
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 4px;
    background-color: #ffecec;
    color: #ff4d4f;
}

.detail-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-spec-item {
    display: flex;
    flex-direction: column;
}

.detail-spec-label {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.detail-spec-value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-name {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.software-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.software-item {
    display: flex;
    flex-direction: column;
}

.software-name {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.software-version {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.price-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.price-item {
    padding: 15px;
    border-radius: 8px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.price-type {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.price-amount {
    font-size: 18px;
    font-weight: 600;
    color: #ff4d4f;
    margin-bottom: 5px;
}

.price-save {
    font-size: 12px;
    color: #52c41a;
}

/* 租用弹窗样式 */
.rent-instance-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.rent-instance-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.rent-instance-specs {
    font-size: 14px;
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 15px;
    font-size: 14px;
}

.form-tip {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.duration-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.duration-option {
    position: relative;
    width: 50px;
    height: 40px;
}

.duration-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.duration-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
}

.duration-option input[type="radio"]:checked + label {
    border-color: #3f87f5;
    background-color: rgba(63, 135, 245, 0.1);
    color: #3f87f5;
}

.duration-unit {
    font-size: 14px;
    color: #666;
}

.payment-info {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.payment-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.payment-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-label {
    font-size: 14px;
    color: #666;
}

.payment-value {
    font-size: 14px;
    color: #333;
}

.payment-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.payment-total .payment-label,
.payment-total .payment-value {
    font-size: 16px;
    font-weight: 600;
    color: #ff4d4f;
}

.payment-agreement {
    flex: 1;
}

.agreement-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.agreement-checkbox input[type="checkbox"] {
    margin: 0;
}

.checkbox-text a {
    color: #3f87f5;
    text-decoration: none;
}

/* 支付弹窗样式 */
.payment-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.payment-instance {
    margin-bottom: 10px;
}

.payment-instance-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.payment-instance-specs {
    font-size: 14px;
    color: #666;
}

.payment-amount {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.payment-amount-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.payment-amount-value {
    font-size: 24px;
    font-weight: 600;
    color: #ff4d4f;
}

.payment-methods {
    margin-top: 10px;
}

.payment-method-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.payment-method-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.payment-method-option input[type="radio"] {
    margin: 0;
}

.payment-method-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.balance-icon {
    background-image: url('../images/balance-icon.png');
}

.alipay-icon {
    background-image: url('../images/alipay-icon.png');
}

.wechat-icon {
    background-image: url('../images/wechat-icon.png');
}

.payment-method-name {
    font-size: 14px;
    color: #333;
}

.payment-method-balance {
    font-size: 14px;
    color: #999;
}

/* 成功提示弹窗样式 */
.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.icon-success {
    width: 60px;
    height: 60px;
    background-color: #52c41a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
}

.success-message {
    text-align: center;
    margin-bottom: 20px;
}

.success-message p {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.instance-access-info {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.access-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.access-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.access-label {
    font-size: 14px;
    color: #666;
}

.access-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .market-content {
        flex-direction: column;
    }
    
    .filter-panel {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .instance-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .detail-specs, 
    .performance-metrics, 
    .software-list, 
    .price-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 20px;
    }
    
    .instance-grid {
        grid-template-columns: 1fr;
    }
}