/* styles.css - 优化版 */
:root {
    --primary-color: #07C160;
    --primary-light: #e3f5eb;
    --primary-dark: #06a552;
    --success-color: #07C160;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --border-color: #eaeaea;
    --background-color: #f7f8fa;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --transition-time: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    flex-direction: column;
}

/* 主容器样式 - 更紧凑 */
.main-container {
    flex: 1;
    padding: 12px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.header h1 {
    color: var(--text-color);
    font-size: 24px;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-light);
    font-size: 14px;
}

/* 价格选项卡 - 更紧凑的布局 */
.pricing-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.option-card {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-time);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1px solid transparent;
}

/* 简化卡片样式 - 更紧凑 */
.option-card.simple {
    padding: 10px;
    text-align: center;
}

.option-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.option-card.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.option-card.expanded {
    grid-column: span 2;
    grid-row: span 2;
    z-index: 2;
}

.option-card.recommended {
    border-color: var(--primary-color);
}

.option-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: bold;
    border-bottom-left-radius: 6px;
}

.option-card.recommended .option-badge {
    background-color: var(--success-color);
}

/* 简化卡片中的价格和标题布局 - 更小更紧凑 */
.option-card.simple .option-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 3px 0;
}

.option-card.simple .option-title {
    font-size: 14px;
    font-weight: bold;
    margin: 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 默认隐藏详情 */
.option-details {
    margin-top: 10px;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
    animation: fadeIn 0.3s ease;
}

.option-description {
    color: var(--text-light);
    margin-bottom: 10px;
    font-size: 13px;
}

.option-features {
    margin-bottom: 10px;
}

.feature {
    margin-bottom: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.feature i {
    color: var(--success-color);
    margin-right: 6px;
    font-size: 11px;
}

.option-select {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color var(--transition-time);
    width: 100%;
    margin-top: 5px;
}

.option-select:hover {
    background-color: var(--primary-dark);
}

/* 支付部分 - 更紧凑 */
.payment-section {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--card-shadow);
    margin-top: 15px;
    animation: fadeIn 0.3s ease-in-out;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.back-button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
    margin-right: 10px;
    transition: transform 0.2s;
}

.back-button:hover {
    transform: translateX(-3px);
}

.section-header h2 {
    font-size: 18px;
    font-weight: bold;
}

.selected-option {
    background-color: var(--primary-light);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-title {
    font-size: 16px;
    font-weight: bold;
}

.selected-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

/* QR Code 显示区域 - 更紧凑 */
.qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.qrcode-title {
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.qrcode-frame {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 10px;
    position: relative;
}

.qrcode-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background-color: var(--primary-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.qrcode-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.qrcode-image img {
    max-width: 180px;
    height: auto;
}

.qrcode-hint {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

.qrcode-guide {
    color: var(--primary-color);
    font-weight: bold;
}

/* 指南与说明 - 更紧凑 */
.guide {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
}

.guide-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--primary-color);
    /*display: flex;*/
    align-items: center;
    text-align: center;
}

.guide-title i {
    margin-right: 6px;
}

.guide-content {
    font-size: 13px;
    color: var(--text-light);
}

.guide-important {
    color: var(--danger-color);
    font-weight: bold;
}

/* 联系按钮 - 更紧凑 */
.contact-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 10px;
    /*font-size: 15px;*/
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 5px;
}

.contact-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    text-align: center;
    max-width: 90%;
    width: 250px;
    position: relative;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 22px;
    color: var(--text-lighter);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-title {
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.modal-image {
    max-width: 180px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.modal-description {
    font-size: 13px;
    color: var(--text-light);
}

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

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

/* 辅助类 */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

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

.text-danger {
    color: var(--danger-color);
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 15px;
}

/* 响应式设计 - 更精细的断点 */
@media (max-width: 900px) {
    .pricing-options {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .pricing-options {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .option-card.expanded {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .pricing-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .option-card.expanded {
        grid-column: span 2;
    }
    
    .main-container {
        padding: 10px;
        margin-bottom: 50px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .subtitle {
        font-size: 12px;
    }
}

@media (max-width: 320px) {
    .pricing-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .option-card.simple {
        padding: 8px;
    }
    
    .option-card.simple .option-price {
        font-size: 16px;
    }
    
    .option-card.simple .option-title {
        font-size: 12px;
    }
}

/* 增强触摸体验 */
@media (hover: none) {
    .option-select {
        padding: 10px; /* 适当的触摸目标 */
    }
    
    .contact-button {
        padding: 12px 20px;
    }
    
    /* 激活态样式 */
    .option-select:active,
    .contact-button:active {
        transform: scale(0.98);
        background-color: var(--primary-dark);
    }
}