/* ==========================================================================
   aegis-connection.css — 连接安全检测页样式（科幻风全屏 Hero）
   类别：页面（aegis-connection.php 专属）
   布局：居中大标题 Hero + 控件；检测中标题渐隐显示「正在检测」；
        结果区展示警示分级（正常 / 黄 / 橙 / 红）+ 分数 + 逐项列表
   ========================================================================== */

.aegis-conn-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 56px 24px 72px;
}

/* ---------- 英雄区：居中标题 ---------- */
.conn-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 440px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.conn-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.conn-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #eaf6ff;
    text-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
}

.conn-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.7;
}

/* 控件区：所在地 + 按钮 */
.conn-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.conn-country-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.conn-country-label iconify-icon { color: var(--accent); font-size: 1rem; }

.conn-country {
    width: 190px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.conn-country:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.conn-country::placeholder { color: var(--text-dim); }

.conn-check-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(56, 189, 248, 0.22));
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: var(--radius-pill);
    color: #a5f3fc;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.22);
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.conn-check-btn:hover {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.32), rgba(56, 189, 248, 0.32));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
}

.conn-check-btn:active { transform: scale(0.97); }

.conn-check-btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- 检测中：标题渐隐 + 「正在检测」 ---------- */
.conn-hero.is-detecting .conn-intro.is-fading {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.conn-detecting {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    text-align: center;
}

.detecting-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #eaf6ff;
    text-shadow: 0 0 26px rgba(34, 211, 238, 0.6);
    animation: detecting-pulse 1.4s ease-in-out infinite;
}

.detecting-title::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.1em;
    margin-left: 8px;
    vertical-align: text-bottom;
    background: var(--accent);
    animation: detecting-caret 0.9s steps(2) infinite;
}

@keyframes detecting-pulse {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

@keyframes detecting-caret {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* ---------- 检测结果 ---------- */
.conn-result {
    max-width: 760px;
    width: 100%;
    margin: 48px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    animation: result-in 0.5s ease;
}

@keyframes result-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-score-wrap {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* 警示等级标签 */
.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.result-badge iconify-icon { font-size: 1.05rem; }

.result-badge.lv-ok {
    color: var(--green);
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.result-badge.lv-warn {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.result-badge.lv-orange {
    color: #fb923c;
    background: rgba(251, 146, 60, 0.12);
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.result-badge.lv-danger {
    color: var(--red);
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* 分数（配色跟随警示等级） */
.result-score {
    font-size: clamp(3.4rem, 10vw, 5.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-score.lv-ok {
    background-image: linear-gradient(135deg, #34d399, #22d3ee);
    text-shadow: 0 0 40px rgba(52, 211, 153, 0.3);
}

.result-score.lv-warn {
    background-image: linear-gradient(135deg, #fbbf24, #f59e0b);
    text-shadow: 0 0 40px rgba(251, 191, 36, 0.3);
}

.result-score.lv-orange {
    background-image: linear-gradient(135deg, #fb923c, #f97316);
    text-shadow: 0 0 40px rgba(251, 146, 60, 0.3);
}

.result-score.lv-danger {
    background-image: linear-gradient(135deg, #f87171, #ef4444);
    text-shadow: 0 0 40px rgba(248, 113, 113, 0.35);
}

.result-score-label {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
}

.result-list {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.result-item.pass { border-left: 3px solid var(--green); }
.result-item.fail { border-left: 3px solid var(--red); }

.result-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.result-item.pass .result-icon { color: var(--green); }
.result-item.fail .result-icon { color: var(--red); }

.result-body {
    flex: 1;
    min-width: 0;
}

.result-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.result-label iconify-icon { color: var(--accent); font-size: 1rem; }

.result-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.result-state {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
}

.result-item.pass .result-state {
    color: var(--green);
    background: rgba(52, 211, 153, 0.12);
}

.result-item.fail .result-state {
    color: var(--red);
    background: rgba(248, 113, 113, 0.12);
}

.conn-again-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.conn-again-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.conn-again-btn iconify-icon { font-size: 1rem; }

/* ---------- 移动端 ---------- */
@media (max-width: 820px) {
    .aegis-conn-main { padding: 40px 18px 56px; }
    .conn-hero { min-height: 360px; }
    .conn-title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
    .conn-controls { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; }
    .conn-country { width: 100%; }
    .conn-check-btn { justify-content: center; }
}
