/* ============ HTTP 猫图鉴 ============ */
.hc-hero {
    margin-top: 28px;
    padding: 26px 28px 32px;
    border-radius: 18px;
    background: linear-gradient(160deg, #fff7ed 0%, #ecfeff 100%);
    border: 1px solid #fed7aa;
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.08);
}
[data-theme="dark"] .hc-hero {
    background: linear-gradient(160deg, #2b1c0e 0%, #0c2a33 100%);
    border-color: rgba(253, 186, 116, 0.16);
}

/* ---- 头部 ---- */
.hc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.hc-brand { display: flex; align-items: center; gap: 14px; }
.hc-logo {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    border-radius: 14px;
    background: linear-gradient(145deg, #fed7aa, #fb923c);
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.35);
}
.hc-title { font-size: 22px; font-weight: 800; color: #7c2d12; }
[data-theme="dark"] .hc-title { color: #ffedd5; }
.hc-sub { font-size: 13px; color: #fb923c; margin-top: 2px; }
[data-theme="dark"] .hc-sub { color: #fdba74; }

.hc-tip {
    font-size: 12px;
    color: #a16207;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed #fcd34d;
    border-radius: 10px;
}
.hc-tip b { color: #ca8a04; }
[data-theme="dark"] .hc-tip { background: rgba(120, 90, 20, 0.35); border-color: rgba(253, 224, 71, 0.4); color: #fde047; }
[data-theme="dark"] .hc-tip b { color: #fde047; }

/* ---- 工具栏 ---- */
.hc-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.hc-input-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
}
.hc-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    color: #7c2d12;
    border: 2px solid #fed7aa;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.08);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.hc-input:focus {
    border-color: #f97316;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.2), 0 0 0 3px rgba(249, 115, 22, 0.1);
}
[data-theme="dark"] .hc-input {
    background: rgba(60, 38, 16, 0.6);
    border-color: rgba(253, 186, 116, 0.25);
    color: #ffedd5;
}
[data-theme="dark"] .hc-input:focus { border-color: #fb923c; }

.hc-err-msg {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
    padding: 3px 8px;
    background: #fee2e2;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.hc-err-msg.show { opacity: 1; transform: translateY(0); }
[data-theme="dark"] .hc-err-msg { background: rgba(220, 38, 38, 0.25); color: #fecaca; }

.hc-btn {
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 22px;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}
.hc-btn:active { transform: translateY(0); }
.hc-btn-primary {
    background: linear-gradient(135deg, #fb923c, #ea580c);
    color: #fff;
    box-shadow: 0 5px 14px rgba(249, 115, 22, 0.35);
}
.hc-btn-primary:hover { background: linear-gradient(135deg, #ea580c, #c2410c); transform: translateY(-1px); }
.hc-btn-secondary {
    background: #fff;
    color: #b45309;
    border: 1.5px solid #fed7aa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.hc-btn-secondary:hover { background: #fff7ed; border-color: #fb923c; transform: translateY(-1px); }
[data-theme="dark"] .hc-btn-secondary {
    background: rgba(60, 38, 16, 0.6);
    color: #fdba74;
    border-color: rgba(253, 186, 116, 0.3);
}
[data-theme="dark"] .hc-btn-secondary:hover { background: rgba(80, 50, 20, 0.8); }

/* ---- 预设 ---- */
.hc-presets {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed #fcd34d;
    border-radius: 12px;
}
[data-theme="dark"] .hc-presets { background: rgba(60, 38, 16, 0.35); border-color: rgba(253, 224, 71, 0.4); }
.hc-presets-label { font-size: 12px; font-weight: 700; color: #a16207; }
[data-theme="dark"] .hc-presets-label { color: #fde047; }
.hc-preset {
    border: 0;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    background: linear-gradient(135deg, #fde68a, #fbbf24);
    color: #78350f;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}
.hc-preset:hover { transform: scale(1.06); box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4); }
.hc-preset:active { transform: scale(0.97); }

/* ---- 图片预览 ---- */
.hc-preview {
    margin-bottom: 24px;
}
.hc-img-card {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 2px solid #fed7aa;
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.15);
}
[data-theme="dark"] .hc-img-card {
    background: #2e2010;
    border-color: rgba(253, 186, 116, 0.25);
}
.hc-img {
    width: 100%;
    display: block;
    opacity: 0;
    transition: opacity .5s ease;
}
.hc-img.hc-img-ready { opacity: 1; }

.hc-img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #c2410c;
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    z-index: 2;
}
.hc-img-overlay[hidden] { display: none; }
.hc-overlay-err { color: #991b1b; }
[data-theme="dark"] .hc-img-overlay { background: linear-gradient(135deg, #33220f, #3a2a12); color: #fdba74; }
[data-theme="dark"] .hc-overlay-err { color: #fecaca; }

.hc-spinner {
    width: 34px; height: 34px;
    border: 4px solid #fed7aa;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: hc-spin 0.9s linear infinite;
}
@keyframes hc-spin { to { transform: rotate(360deg); } }

.hc-err-icon { font-size: 42px; }

/* ---- 元信息 ---- */
.hc-meta {
    max-width: 560px;
    margin: 14px auto 0;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #fed7aa;
    border-radius: 12px;
}
[data-theme="dark"] .hc-meta { background: rgba(60, 38, 16, 0.5); border-color: rgba(253, 186, 116, 0.25); }
.hc-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.hc-meta-row:last-child { margin-bottom: 0; }
.hc-meta-label {
    font-size: 12px;
    color: #92400e;
    font-weight: 600;
}
[data-theme="dark"] .hc-meta-label { color: #fdba74; }
.hc-meta-code {
    font-size: 20px;
    font-weight: 800;
    color: #ea580c;
    letter-spacing: 1px;
}
[data-theme="dark"] .hc-meta-code { color: #fb923c; }
.hc-meta-tag {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    background: #fed7aa;
    color: #9a3412;
}
[data-theme="dark"] .hc-meta-tag { background: rgba(253, 186, 116, 0.25); color: #fdba74; }
.hc-url-box { flex: 1; min-width: 180px; }
.hc-url {
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    background: #fff;
    color: #92400e;
    cursor: text;
}
[data-theme="dark"] .hc-url { background: rgba(40, 26, 12, 0.7); border-color: rgba(253, 186, 116, 0.25); color: #fdba74; }

.hc-action-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ---- 代码分组 ---- */
.hc-codes { margin-top: 10px; }
.hc-section-title {
    font-size: 16px;
    font-weight: 800;
    color: #7c2d12;
    margin-bottom: 14px;
}
[data-theme="dark"] .hc-section-title { color: #ffedd5; }

.hc-code-group {
    margin-bottom: 16px;
}
.hc-code-head {
    font-size: 13px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px 8px 0 0;
    display: inline-block;
    margin-bottom: 8px;
}
.hc-c-1xx.hc-code-head { color: #1e3a8a; background: rgba(191, 219, 254, 0.7); }
.hc-c-2xx.hc-code-head { color: #14532d; background: rgba(187, 247, 208, 0.7); }
.hc-c-3xx.hc-code-head { color: #78350f; background: rgba(253, 230, 138, 0.8); }
.hc-c-4xx.hc-code-head { color: #7c2d12; background: rgba(253, 215, 170, 0.8); }
.hc-c-5xx.hc-code-head { color: #7f1d1d; background: rgba(254, 202, 202, 0.8); }
[data-theme="dark"] .hc-c-1xx.hc-code-head { color: #bfdbfe; background: rgba(30, 58, 138, 0.4); }
[data-theme="dark"] .hc-c-2xx.hc-code-head { color: #86efac; background: rgba(22, 101, 52, 0.4); }
[data-theme="dark"] .hc-c-3xx.hc-code-head { color: #fde047; background: rgba(120, 53, 15, 0.45); }
[data-theme="dark"] .hc-c-4xx.hc-code-head { color: #fdba74; background: rgba(124, 45, 18, 0.45); }
[data-theme="dark"] .hc-c-5xx.hc-code-head { color: #fecaca; background: rgba(127, 29, 29, 0.45); }

.hc-code-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid #fed7aa;
    border-radius: 10px;
}
[data-theme="dark"] .hc-code-grid { background: rgba(40, 26, 12, 0.3); border-color: rgba(253, 186, 116, 0.2); }

.hc-code-btn {
    border: 1.5px solid transparent;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.hc-code-btn:hover { transform: scale(1.05); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); }
.hc-code-btn:active { transform: scale(0.96); }

/* 颜色分组 */
.hc-code-btn.hc-c-1xx {
    background: linear-gradient(135deg, #dbeafe, #93c5fd);
    color: #1e3a8a;
    border-color: #60a5fa;
}
.hc-code-btn.hc-c-2xx {
    background: linear-gradient(135deg, #dcfce7, #86efac);
    color: #14532d;
    border-color: #4ade80;
}
.hc-code-btn.hc-c-3xx {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    color: #78350f;
    border-color: #fbbf24;
}
.hc-code-btn.hc-c-4xx {
    background: linear-gradient(135deg, #ffedd5, #fdba74);
    color: #7c2d12;
    border-color: #fb923c;
}
.hc-code-btn.hc-c-5xx {
    background: linear-gradient(135deg, #fee2e2, #fca5a5);
    color: #7f1d1d;
    border-color: #f87171;
}
[data-theme="dark"] .hc-code-btn.hc-c-1xx {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.6), rgba(59, 130, 246, 0.45));
    color: #bfdbfe;
    border-color: rgba(147, 197, 253, 0.5);
}
[data-theme="dark"] .hc-code-btn.hc-c-2xx {
    background: linear-gradient(135deg, rgba(22, 101, 52, 0.6), rgba(34, 197, 94, 0.4));
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.5);
}
[data-theme="dark"] .hc-code-btn.hc-c-3xx {
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.6), rgba(234, 179, 8, 0.35));
    color: #fde047;
    border-color: rgba(253, 224, 71, 0.5);
}
[data-theme="dark"] .hc-code-btn.hc-c-4xx {
    background: linear-gradient(135deg, rgba(124, 45, 18, 0.6), rgba(249, 115, 22, 0.35));
    color: #fdba74;
    border-color: rgba(253, 186, 116, 0.5);
}
[data-theme="dark"] .hc-code-btn.hc-c-5xx {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.6), rgba(239, 68, 68, 0.35));
    color: #fecaca;
    border-color: rgba(254, 202, 202, 0.5);
}

.hc-code-btn.active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(249, 115, 22, 0.5);
    transform: scale(1.08);
}
[data-theme="dark"] .hc-code-btn.active { box-shadow: 0 0 0 2px #1c1917, 0 0 0 4px rgba(251, 146, 60, 0.6); }

/* ---- 信息区 ---- */
.hc-info { margin-top: 30px; }

/* ---- 响应式 ---- */
@media (max-width: 640px) {
    .hc-hero { padding: 20px 14px; }
    .hc-toolbar { flex-wrap: wrap; }
    .hc-input-wrap { flex: 1 0 100%; }
    .hc-btn { flex: 1; min-width: 0; }
    .hc-code-grid { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
    .hc-code-grid { grid-template-columns: repeat(3, 1fr); }
}
