/**
 * 网站健康诊断工具 - 前端样式
 *
 * @package Site_Diagnosis_Tool
 * @version 1.0.1
 */

/* 主容器 */
.child-site-diagnosis-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}
html.io-black-mode .child-site-diagnosis-container {
    color: #b4b8bf;
}

/* 英雄区域 */
.sdt-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    color: #fff;
}
.sdt-hero-inner {
    max-width: 600px;
    margin: 0 auto;
}
.sdt-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
}
.sdt-subtitle {
    font-size: 15px;
    opacity: 0.9;
    margin: 0;
}

/* 输入区域 */
.sdt-input-section {
    margin-bottom: 30px;
}
.sdt-input-wrapper {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
html.io-black-mode .sdt-input-wrapper {
    background: #2D2E2F;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.sdt-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
    color: #333;
}
html.io-black-mode .sdt-label {
    color: #b4b8bf;
}
.sdt-input-row {
    display: flex;
    gap: 10px;
}
.sdt-url-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    color: #333;
}
html.io-black-mode .sdt-url-input {
    background: #1b1d1f;
    border-color: #444;
    color: #b4b8bf;
}
.sdt-url-input:focus {
    border-color: #667eea;
}

/* 按钮 */
.sdt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.sdt-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.sdt-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.sdt-btn-secondary {
    background: #f0f0f0;
    color: #333;
}
html.io-black-mode .sdt-btn-secondary {
    background: #3a3a3a;
    color: #b4b8bf;
}
.sdt-btn-secondary:hover {
    background: #e0e0e0;
}
html.io-black-mode .sdt-btn-secondary:hover {
    background: #4a4a4a;
}
.sdt-btn-ai {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}
.sdt-btn-ai:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.sdt-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 加载动画 */
.sdt-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sdt-spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes sdt-spin {
    to { transform: rotate(360deg); }
}

/* 加载区域 */
.sdt-loading-section {
    text-align: center;
    padding: 60px 20px;
}
.sdt-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: sdt-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
html.io-black-mode .sdt-loading-spinner {
    border-color: #444;
    border-top-color: #667eea;
}
.sdt-loading-text {
    font-size: 16px;
    color: #666;
}
html.io-black-mode .sdt-loading-text {
    color: #999;
}

/* 错误提示 */
.sdt-error-section {
    margin-bottom: 30px;
}
.sdt-error-content {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
html.io-black-mode .sdt-error-content {
    background: #2a1a1a;
    border-color: #5a2a2a;
}
.sdt-error-text {
    color: #cf1322;
    margin: 0;
}

/* 网站信息 */
.sdt-site-info {
    text-align: center;
    margin-bottom: 30px;
}
.sdt-result-title {
    font-size: 22px;
    margin: 0 0 6px;
    color: #333;
}
html.io-black-mode .sdt-result-title {
    color: #b4b8bf;
}
.sdt-result-url {
    color: #667eea;
    margin: 0 0 4px;
    font-size: 14px;
    word-break: break-all;
}
.sdt-result-meta {
    color: #999;
    margin: 0;
    font-size: 13px;
}

/* 综合评分 */
.sdt-overall-score {
    text-align: center;
    margin-bottom: 40px;
}
.sdt-score-circle {
    position: relative;
    display: inline-block;
    width: 200px;
    height: 200px;
}
.sdt-score-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.sdt-score-number {
    font-size: 48px;
    font-weight: 700;
    color: #333;
}
html.io-black-mode .sdt-score-number {
    color: #b4b8bf;
}
.sdt-score-unit {
    font-size: 16px;
    color: #999;
}
.sdt-score-desc {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}
html.io-black-mode .sdt-score-desc {
    color: #999;
}

/* 维度评分网格 */
.sdt-dimensions {
    margin-bottom: 40px;
}
.sdt-section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}
html.io-black-mode .sdt-section-title {
    color: #b4b8bf;
    border-bottom-color: #444;
}
.sdt-dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}
.sdt-dimension-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
html.io-black-mode .sdt-dimension-card {
    background: #2D2E2F;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.sdt-dimension-card:hover {
    transform: translateY(-2px);
}
.sdt-dimension-icon {
    font-size: 28px;
    margin-bottom: 8px;
}
.sdt-dimension-card h4 {
    font-size: 14px;
    margin: 0 0 10px;
    color: #666;
}
html.io-black-mode .sdt-dimension-card h4 {
    color: #999;
}
.sdt-dimension-score {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}
html.io-black-mode .sdt-dimension-score {
    color: #b4b8bf;
}
.sdt-dimension-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}
html.io-black-mode .sdt-dimension-bar {
    background: #444;
}
.sdt-dimension-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease-out;
    width: 0;
}

/* 雷达图 */
.sdt-radar-section {
    margin-bottom: 40px;
}
.sdt-radar-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

/* 问题列表 */
.sdt-issues-section {
    margin-bottom: 40px;
}
.sdt-issues-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.sdt-filter-btn {
    padding: 6px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    color: #333;
}
html.io-black-mode .sdt-filter-btn {
    background: #2D2E2F;
    border-color: #444;
    color: #b4b8bf;
}
.sdt-filter-btn.active,
.sdt-filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f0f0ff;
}
html.io-black-mode .sdt-filter-btn.active,
html.io-black-mode .sdt-filter-btn:hover {
    background: #3a3a5a;
}
.sdt-issues-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sdt-issue-item {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-left: 4px solid transparent;
}
html.io-black-mode .sdt-issue-item {
    background: #2D2E2F;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.sdt-issue-item.priority-high {
    border-left-color: #ff4d4f;
}
.sdt-issue-item.priority-medium {
    border-left-color: #faad14;
}
.sdt-issue-item.priority-low {
    border-left-color: #52c41a;
}
.sdt-issue-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.sdt-issue-dimension {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #f0f0ff;
    color: #667eea;
}
html.io-black-mode .sdt-issue-dimension {
    background: #3a3a5a;
}
.sdt-issue-priority {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.sdt-issue-priority.priority-high {
    background: #fff2f0;
    color: #ff4d4f;
}
.sdt-issue-priority.priority-medium {
    background: #fffbe6;
    color: #faad14;
}
.sdt-issue-priority.priority-low {
    background: #f6ffed;
    color: #52c41a;
}
.sdt-issue-text {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}
html.io-black-mode .sdt-issue-text {
    color: #b4b8bf;
}
.sdt-issue-suggestion {
    font-size: 14px;
    color: #666;
    margin: 0;
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
}
html.io-black-mode .sdt-issue-suggestion {
    color: #999;
    border-left-color: #444;
}

/* 操作区域 */
.sdt-actions {
    text-align: center;
    margin-bottom: 40px;
}

/* 响应式 */
@media (max-width: 600px) {
    .sdt-hero {
        padding: 24px 16px;
    }
    .sdt-title {
        font-size: 22px;
    }
    .sdt-input-row {
        flex-direction: column;
    }
    .sdt-dimensions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sdt-score-circle {
        width: 160px;
        height: 160px;
    }
    .sdt-score-number {
        font-size: 36px;
    }
}
