/**
 * Premature Test 组件样式
 * 文件名：premature-test.css
 * 功能：纯定义样式 - 早泄自测界面视觉样式
 */

/* 主容器样式 */
.premature-test {
    padding: 2rem 0 4rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
}

.premature-test__container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 标题区域 */
.premature-test__header {
    text-align: center;
    margin-bottom: 3rem;
}

.premature-test__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premature-test__subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 进度条 */
.premature-test__progress {
    margin-bottom: 2rem;
}

.premature-test__progress-bar {
    width: 100%;
    height: 8px;
    background: #334155;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.premature-test__progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.premature-test__progress-text {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 表单容器 */
.premature-test__form-container {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 1.5rem;
    border: 1px solid rgba(100, 116, 139, 0.2);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.premature-test__form {
    min-height: 400px;
}

/* 问题样式 */
.premature-test__question {
    margin-bottom: 2rem;
}

.premature-test__question-text {
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.premature-test__options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.premature-test__option {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid #334155;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.premature-test__option:hover {
    border-color: #60a5fa;
    background: rgba(51, 65, 85, 0.6);
}

.premature-test__option--selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.premature-test__option-input {
    position: absolute;
    opacity: 0;
}

.premature-test__option-label {
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
}

.premature-test__option-check {
    width: 20px;
    height: 20px;
    border: 2px solid #475569;
    border-radius: 50%;
    margin-right: 1rem;
    position: relative;
    flex-shrink: 0;
}

.premature-test__option--selected .premature-test__option-check {
    border-color: #3b82f6;
    background: #3b82f6;
}

.premature-test__option--selected .premature-test__option-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* 导航按钮 */
.premature-test__navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 2px solid #334155;
}

.premature-test__nav-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.premature-test__nav-btn--prev {
    background: transparent;
    border: 2px solid #475569;
    color: #cbd5e1;
}

.premature-test__nav-btn--prev:hover:not(:disabled) {
    background: #475569;
    color: white;
}

.premature-test__nav-btn--prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.premature-test__nav-btn--next,
.premature-test__nav-btn--submit {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.premature-test__nav-btn--next:hover,
.premature-test__nav-btn--submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* 测试结果 */
.premature-test__result {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 1.5rem;
    border: 1px solid rgba(100, 116, 139, 0.2);
    padding: 2.5rem;
}

.premature-test__result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #334155;
}

.premature-test__result-title {
    color: #f1f5f9;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.premature-test__result-score {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.premature-test__result-level {
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.premature-test__result-description {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* 建议部分 */
.premature-test__recommendations {
    margin-bottom: 2rem;
}

.premature-test__recommendations-title {
    color: #f1f5f9;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.premature-test__recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.premature-test__recommendation {
    background: rgba(15, 23, 42, 0.3);
    padding: 1.5rem;
    border-radius: 1rem;
    border-left: 4px solid #3b82f6;
}

.premature-test__recommendation-title {
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.premature-test__recommendation-desc {
    color: #cbd5e1;
    line-height: 1.6;
}

/* 产品推荐 */
.premature-test__products {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #334155;
}

.premature-test__products-title {
    color: #f1f5f9;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.premature-test__products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.premature-test__product-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #334155;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.premature-test__product-card:hover {
    border-color: #60a5fa;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.premature-test__product-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #475569;
}

.premature-test__product-name {
    color: #f1f5f9;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.premature-test__product-brand {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.premature-test__product-price {
    color: #60a5fa;
    font-weight: 700;
    font-size: 1.1rem;
}

/* 重新测试按钮 */
.premature-test__retest {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #334155;
}

.premature-test__retest-btn {
    background: transparent;
    border: 2px solid #475569;
    color: #cbd5e1;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.premature-test__retest-btn:hover {
    background: #475569;
    color: white;
}

/* 加载状态 */
.premature-test__loading {
    text-align: center;
    padding: 3rem;
    color: #cbd5e1;
}

.premature-test__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #334155;
    border-top: 3px solid #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .premature-test__container {
        padding: 0 1rem;
    }
    
    .premature-test__title {
        font-size: 2rem;
    }
    
    .premature-test__subtitle {
        font-size: 1.125rem;
    }
    
    .premature-test__form-container {
        padding: 2rem;
    }
    
    .premature-test__question-text {
        font-size: 1.3rem;
    }
    
    .premature-test__navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .premature-test__nav-btn {
        width: 100%;
    }
    
    .premature-test__result-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .premature-test__products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .premature-test__form-container {
        padding: 1.5rem;
    }
    
    .premature-test__option {
        padding: 1rem 1.25rem;
    }
    
    .premature-test__option-label {
        font-size: 1rem;
    }
    
    .premature-test__result {
        padding: 2rem;
    }
    
    .premature-test__result-level {
        font-size: 1.3rem;
    }
    
    .premature-test__result-description {
        font-size: 1rem;
    }
}