/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* 页面头部 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.merchant-info {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.merchant-logo {
    flex-shrink: 0;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.merchant-details {
    flex: 1;
}

.merchant-name {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.2;
}

.welcome-text {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 40px 20px;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

/* 初始状态 */
.initial-state {
    text-align: center;
    width: 100%;
}

.main-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    line-height: 1.3;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 20px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto 30px;
    min-width: 280px;
    justify-content: center;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.primary-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 20px;
}

.btn-text {
    font-size: 16px;
}

.assistant-text {
    font-size: 14px;
    color: #666;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
}

/* 选择组样式 */
.selection-group {
    margin-bottom: 30px;
    text-align: center;
}

.selection-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.selection-btn {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.selection-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.selection-btn.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.selection-btn.multi.selected {
    background: #56ab2f;
    border-color: #56ab2f;
    box-shadow: 0 4px 12px rgba(86, 171, 47, 0.3);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .button-group {
        gap: 8px;
    }
    
    .selection-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 80px;
    }
}

/* 加载状态 */
.loading-state {
    text-align: center;
    width: 100%;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

/* 结果状态 */
.result-state {
    width: 100%;
    text-align: center;
}

.result-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 25px;
}

.review-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
}

.review-text {
    width: 100%;
    min-height: 120px;
    border: none;
    resize: none;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: transparent;
    font-family: inherit;
    outline: none;
    padding: 0;
}

.review-text:focus {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
}

.edit-hint {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 12px;
    color: #999;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 12px;
}

.final-btn {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 35px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto 20px;
    min-width: 260px;
    justify-content: center;
}

.final-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(86, 171, 47, 0.5);
}

.final-btn:active {
    transform: translateY(0);
}

.final-hint {
    font-size: 13px;
    color: #666;
    max-width: 280px;
    margin: 0 auto;
    line-height: 1.4;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    margin-top: auto;
}

.tech-support {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .header {
        padding: 15px;
    }
    
    .merchant-name {
        font-size: 20px;
    }
    
    .main-content {
        padding: 30px 15px;
        min-height: calc(100vh - 180px);
    }
    
    .main-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .primary-btn {
        padding: 18px 30px;
        font-size: 16px;
        min-width: 260px;
    }
    
    .btn-text {
        font-size: 15px;
    }
    
    .review-card {
        padding: 20px;
    }
    
    .final-btn {
        padding: 16px 30px;
        min-width: 240px;
    }
}

/* 动画效果 */
.initial-state, .loading-state, .result-state {
    animation: fadeInUp 0.5s ease-out;
}

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

/* 按钮禁用状态 */
.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 触摸优化 */
@media (hover: none) {
    .primary-btn:hover,
    .final-btn:hover {
        transform: none;
    }
    
    .primary-btn:active,
    .final-btn:active {
        transform: scale(0.98);
    }
}
