/* assets/style.css — IP 黑洞状态查询页面样式 */
:root {
    --bg-1: #0f0c29;
    --bg-2: #302b63;
    --bg-3: #24243e;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.12);
    --text-main: #f1f2f6;
    --text-dim: #9aa0b4;
    --accent: #6c5ce7;
    --accent-hover: #5a4bd1;
    --danger: #ff4757;
    --danger-bg: rgba(255, 71, 87, 0.12);
    --success: #2ed573;
    --success-bg: rgba(46, 213, 115, 0.12);
    --warn: #ffa502;
    --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
    min-height: 100vh;
    color: var(--text-main);
    overflow-x: hidden;
}

/* 背景装饰光斑 */
.bg-decoration { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-decoration span {
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
}
.bg-decoration span:nth-child(1) { background: #6c5ce7; top: -10%; left: -5%; }
.bg-decoration span:nth-child(2) { background: #a55eea; bottom: -15%; right: -10%; }
.bg-decoration span:nth-child(3) { background: #fd79a8; top: 40%; left: 50%; width: 300px; height: 300px; }
.bg-decoration span:nth-child(4) { background: #00cec9; bottom: 10%; left: 10%; width: 250px; height: 250px; }
.bg-decoration span:nth-child(5) { background: #e17055; top: 20%; right: 20%; width: 200px; height: 200px; }

.wrapper {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 24px 40px;
}

/* Hero */
.hero { text-align: center; margin-bottom: 36px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(108, 92, 231, 0.18);
    border: 1px solid rgba(108, 92, 231, 0.35);
    border-radius: 100px;
    font-size: 13px;
    color: #c8bffa;
    margin-bottom: 18px;
}
.hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, #fff, #b8b0ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}
.hero-sub { color: var(--text-dim); font-size: 1rem; line-height: 1.6; }

/* 搜索卡片 */
.search-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 6px 6px 6px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}
.input-icon { color: var(--text-dim); flex-shrink: 0; }
#ipInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 16px;
    padding: 12px 0;
    font-family: inherit;
}
#ipInput::placeholder { color: var(--text-dim); }
#queryBtn {
    flex-shrink: 0;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent), #8e7bff);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
    min-width: 120px;
}
#queryBtn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.45);
}
#queryBtn:disabled { opacity: 0.7; cursor: not-allowed; }
.hint { margin-top: 14px; font-size: 13px; color: var(--text-dim); text-align: center; }

.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 结果区域 */
.result-area { margin-top: 28px; animation: fadeUp 0.4s ease; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-card {
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    animation: fadeUp 0.4s ease;
}
.result-card.status-blackhole {
    background: var(--danger-bg);
    border-color: rgba(255, 71, 87, 0.4);
    box-shadow: 0 8px 32px rgba(255, 71, 87, 0.15);
}
.result-card.status-clean {
    background: var(--success-bg);
    border-color: rgba(46, 213, 115, 0.4);
    box-shadow: 0 8px 32px rgba(46, 213, 115, 0.12);
}
.result-card.status-error {
    background: rgba(255, 165, 2, 0.1);
    border-color: rgba(255, 165, 2, 0.35);
}

.result-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.result-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.status-blackhole .result-icon { background: rgba(255, 71, 87, 0.2); color: var(--danger); }
.status-clean .result-icon     { background: rgba(46, 213, 115, 0.2); color: var(--success); }
.status-error .result-icon     { background: rgba(255, 165, 2, 0.2); color: var(--warn); }

.result-title { font-size: 1.3rem; font-weight: 700; }
.result-sub   { font-size: 14px; color: var(--text-dim); margin-top: 3px; }

.ip-display {
    font-family: "SF Mono", Consolas, Monaco, monospace;
    font-size: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 18px;
    word-break: break-all;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.metric-item {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.06);
}
.metric-label { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.metric-value { font-size: 1.05rem; font-weight: 600; word-break: break-all; }

.countdown-big {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--danger);
    margin: 8px 0 4px;
    letter-spacing: -1px;
}

.footer {
    text-align: center;
    margin-top: 48px;
    font-size: 12px;
    color: var(--text-dim);
    opacity: 0.7;
}

@media (max-width: 480px) {
    .wrapper { padding: 40px 16px 30px; }
    .hero h1 { font-size: 1.8rem; }
    .input-group { flex-direction: column; align-items: stretch; padding: 10px; }
    #queryBtn { width: 100%; }
    .result-head { flex-direction: column; text-align: center; }
}
