/* 
 * premature-test.css
 * 早泄自测组件样式
 * 设计理念：专业的医学测试界面，清晰的进度指示
 */

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

.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__test-container {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 1.5rem;
    padding: 3rem;
    margin-bottom: 3rem;
}

/* 进度指示器 */
.premature-test__progress {
    margin-bottom: 3rem;
}

.premature-test__progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.premature-test__progress-text {
    font-size: 1rem;
    color: #cbd5e1;
    font-weight: 600;
}

.premature-test__progress-bar {
    height: 8px;
    background: #374151;
    border-radius: 4px;
    overflow: hidden;
}

.premature-test__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

/* 问题容器 */
.premature-test__question-container {
    display: none;
}

.premature-test__question-container--active {
    display: block;
    animation: fadeInUp 0.6s ease;
}

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

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

/* 选项网格 */
.premature-test__options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .premature-test__options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .premature-test__options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .premature-test__options-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 选项卡片 */
.premature-test__option-card {
    background: #1e293b;
    border: 2px solid #475569;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.premature-test__option-card:hover {
    border-color: #60a5fa;
    transform: translateY(-2px);
}

.premature-test__option-card--selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.premature-test__option-card--selected::before {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.premature-test__option-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #60a5fa;
    margin-bottom: 0.5rem;
}

.premature-test__option-text {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}

.premature-test__option-description {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* 导航按钮 */
.premature-test__navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    gap: 1rem;
}

.premature-test__nav-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid #475569;
}

.premature-test__nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: #60a5fa;
}

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

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

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

/* 结果容器 */
.premature-test__result {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 1.5rem;
    padding: 3rem;
    margin-top: 2rem;
    display: none;
}

.premature-test__result--show {
    display: block;
    animation: fadeInUp 0.8s ease;
}

/* 结果头部 */
.premature-test__result-header {
    text-align: center;
    margin-bottom: 3rem;
}

.premature-test__result-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.premature-test__result-title {
    font-size: 2rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 1rem;
}

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

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

/* 结果详情 */
.premature-test__result-details {
    background: rgba(96, 165, 250, 0.05);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.premature-test__result-section {
    margin-bottom: 2rem;
}

.premature-test__result-section:last-child {
    margin-bottom: 0;
}

.premature-test__section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premature-test__section-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #cbd5e1;
}

/* 评分级别指示器 */
.premature-test__levels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.premature-test__level {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.premature-test__level--active {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.premature-test__level--normal {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid #22c55e;
}

.premature-test__level--mild {
    background: rgba(234, 179, 8, 0.1);
    border: 2px solid #eab308;
}

.premature-test__level--moderate {
    background: rgba(249, 115, 22, 0.1);
    border: 2px solid #f97316;
}

.premature-test__level--severe {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
}

.premature-test__level-range {
    font-size: 1.125rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.premature-test__level-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.premature-test__level-description {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* 推荐产品 */
.premature-test__recommendations {
    margin-top: 3rem;
}

.premature-test__recommendation-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
    text-align: center;
    margin-bottom: 2rem;
}

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

.premature-test__product-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    border-radius: 1rem;
    padding: 1.5rem;
    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(96, 165, 250, 0.15);
}

.premature-test__product-image {
    width: 80px;
    height: 80px;
    border-radius: 0.75rem;
    object-fit: cover;
    margin: 0 auto 1rem;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

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

.premature-test__product-brand {
    font-size: 0.875rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 1rem;
}

.premature-test__product-type {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

/* 行动按钮 */
.premature-test__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.premature-test__action-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.premature-test__action-btn--primary {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.premature-test__action-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.premature-test__action-btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid #475569;
}

.premature-test__action-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #60a5fa;
}

/* 免责声明 */
.premature-test__disclaimer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.premature-test__disclaimer-text {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .premature-test__test-container,
    .premature-test__result {
        padding: 2rem 1.5rem;
    }
    
    .premature-test__question {
        font-size: 1.25rem;
    }
    
    .premature-test__options-grid {
        grid-template-columns: 1fr;
    }
    
    .premature-test__levels {
        grid-template-columns: 1fr;
    }
    
    .premature-test__navigation {
        flex-direction: column;
    }
    
    .premature-test__nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .premature-test__actions {
        flex-direction: column;
    }
    
    .premature-test__action-btn {
        width: 100%;
        justify-content: center;
    }
}

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

.premature-test__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #374151;
    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); }
}