/* 新版結果頁面樣式 */

/* 標籤導航 */
.result-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    background: #fafafa;
    border-radius: 12px 12px 0 0;
    margin: -30px -25px 20px -25px;
    padding: 0 10px;
}

.tab-btn {
    flex: 1;
    padding: 14px 10px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #5f7a73;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: #5f7a73;
    border-radius: 2px 2px 0 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 分數卡片 */
.score-cards {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

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

.score-ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 6px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    position: relative;
    background: white;
}

.score-ring::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: #5f7a73;
    border-right-color: #5f7a73;
    transform: rotate(-45deg);
}

.score-ring.good::before {
    border-top-color: #5f7a73;
    border-right-color: #5f7a73;
    border-bottom-color: #5f7a73;
}

.score-value {
    font-size: 36px;
    font-weight: 700;
    color: #5f7a73;
}

.score-title {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* 雷達圖區域 */
.radar-section {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 20px;
    background: #f8fafb;
    border-radius: 16px;
}

#radarChart {
    max-width: 100%;
}

/* 指標網格 */
.metrics-section {
    margin: 20px 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* AI 建議卡片 */
.ai-suggestion-card {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border-radius: 16px;
    padding: 18px;
    margin: 20px 0;
    border: 1px solid #99f6e4;
}

.ai-suggestion-card h3 {
    margin-bottom: 10px;
    color: #5f7a73;
    font-size: 14px;
    font-weight: 600;
}

.ai-suggestion-card p {
    color: #555;
    line-height: 1.7;
    font-size: 13px;
}

/* 問題標籤 */
.problem-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

.problem-tabs::-webkit-scrollbar {
    height: 0;
}

.problem-tab {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: #f0f0f0;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.problem-tab.active {
    background: linear-gradient(135deg, #5f7a73 0%, #5eead4 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.3);
}

.problem-content {
    display: none;
}

.problem-content.active {
    display: block;
}

.problem-content h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

/* 眼部分析 */
.eye-analysis {
    margin: 15px 0;
}

.eye-types {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.eye-type {
    text-align: center;
    padding: 12px 8px;
    border-radius: 14px;
    background: #f5f5f5;
    flex: 1;
    opacity: 0.5;
    transition: all 0.3s;
}

.eye-type.active {
    opacity: 1;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    box-shadow: 0 2px 10px rgba(45, 212, 191, 0.2);
    border: 1px solid #99f6e4;
}

.eye-icon {
    margin-bottom: 8px;
}

.eye-svg {
    width: 50px;
    height: 25px;
}

.severity-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ddd;
    margin-right: 4px;
}

.eye-type.active .severity-dot {
    background: #5f7a73;
}

.eye-type span:last-child {
    font-size: 11px;
    color: #666;
}

/* 嚴重程度條 */
.severity-section {
    margin: 20px 0;
}

.severity-section h4 {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.severity-bar {
    height: 6px;
    background: linear-gradient(to right, #ccfbf1, #5eead4, #fbbf24, #f87171);
    border-radius: 3px;
    position: relative;
    margin-bottom: 8px;
}

.severity-fill {
    position: absolute;
    left: 0;
    top: -5px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    border: 3px solid #5f7a73;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: left 0.3s;
}

.severity-labels {
    display: flex;
    justify-content: space-between;
}

.severity-label {
    font-size: 11px;
    color: #999;
    padding: 3px 8px;
    border-radius: 10px;
}

.severity-label.active {
    background: #5f7a73;
    color: white;
}

/* 問題建議 */
.problem-advice {
    background: #f8fafb;
    border-radius: 14px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #f0f0f0;
}

.problem-advice p {
    color: #555;
    line-height: 1.7;
    font-size: 13px;
}

/* 解決方案按鈕 */
.solution-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border: 1px solid #99f6e4;
    border-radius: 25px;
    color: #5f7a73;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin: 15px 0;
    transition: all 0.2s;
}

.solution-btn:hover {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    transform: translateY(-1px);
}

/* 臉部圖示 */
.face-diagram {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 15px 0;
    padding: 15px;
    background: #f8fafb;
    border-radius: 14px;
}

.face-svg-container {
    flex-shrink: 0;
}

.face-svg {
    width: 100px;
    height: 130px;
}

.face-metrics {
    flex: 1;
}

.face-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.face-metric span {
    width: 36px;
    font-size: 12px;
    color: #666;
}

.metric-bar {
    flex: 1;
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(to right, #5f7a73, #4a635d);
    border-radius: 3px;
    transition: width 0.5s;
}

/* 問題結果 */
.problem-result {
    text-align: center;
    margin: 15px 0;
}

.problem-result span:first-child {
    color: #666;
    font-size: 13px;
}

.result-status {
    color: #5f7a73;
    font-weight: 600;
    font-size: 16px;
    margin-left: 8px;
}

.result-status.warning {
    color: #f59e0b;
}

.result-status.danger {
    color: #ef4444;
}

/* 泛紅標籤 */
.redness-labels {
    display: flex;
    justify-content: space-around;
    margin-top: 8px;
}

.redness-labels span {
    font-size: 11px;
    color: #666;
}

/* 油脂量表 */
.oil-scale {
    margin: 25px 0;
}

.oil-bar {
    height: 10px;
    background: linear-gradient(to right, #fde68a, #86efac, #fde68a);
    border-radius: 5px;
    position: relative;
}

.oil-indicator {
    position: absolute;
    top: -5px;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid #5f7a73;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.3s;
    left: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.oil-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.oil-labels span {
    font-size: 11px;
    color: #999;
}

.oil-labels span:nth-child(2) {
    color: #22c55e;
    font-weight: 500;
}

.oil-status {
    text-align: center;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 12px;
    margin: 12px 0;
}

.oil-status .status-text {
    color: #22c55e;
    font-weight: 600;
}

/* 問題專屬產品推薦 */
.problem-products {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px dashed #e0e0e0;
}

.problem-products h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

.problem-products-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.problem-products-grid::-webkit-scrollbar {
    height: 3px;
}

.problem-products-grid::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.problem-product-card {
    flex: 0 0 120px;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.problem-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-color: #5f7a73;
}

.problem-product-card img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.problem-product-card .product-info {
    padding: 10px;
}

.problem-product-card .product-name {
    font-size: 11px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 28px;
}

.problem-product-card .product-price {
    font-size: 12px;
    font-weight: 600;
    color: #f472b6;
}

/* 產品推薦區塊 */
.product-recommendations {
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
}

.product-recommendations h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 15px;
    font-weight: 600;
}

/* 響應式 */
@media (max-width: 480px) {
    .result-tabs {
        margin: -25px -20px 15px -20px;
    }

    .score-cards {
        margin: 20px 0;
    }

    .score-ring {
        width: 90px;
        height: 90px;
    }

    .score-value {
        font-size: 28px;
    }

    .eye-types {
        flex-direction: column;
        gap: 8px;
    }

    .face-diagram {
        flex-direction: column;
        text-align: center;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .problem-product-card {
        flex: 0 0 110px;
    }

    .problem-product-card img {
        height: 70px;
    }
}


/* 分享結果區塊 */
.share-result-section {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f9f7f4 0%, #f5f3ef 100%);
    border-radius: 16px;
    text-align: center;
    border: 1px solid #ebe7df;
}

.share-hint {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.share-result-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #c9ba96 0%, #b8a882 100%);
    border: none;
    border-radius: 12px;
    color: #3d3d3d;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(201, 186, 150, 0.35);
}

.share-result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 186, 150, 0.45);
}

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

.share-copied {
    margin-top: 12px;
    font-size: 14px;
    color: #5f7a73;
    font-weight: 500;
}
