﻿body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--page-ink);
    background:
        radial-gradient(circle at 12% 10%, rgba(244, 155, 102, 0.18), transparent 24%),
        radial-gradient(circle at 88% 14%, rgba(53, 163, 205, 0.18), transparent 26%),
        radial-gradient(circle at 50% 78%, rgba(88, 181, 151, 0.14), transparent 28%),
        linear-gradient(145deg, #fffaf5 0%, #f4f8ff 44%, #f0f8f3 100%);
    background-attachment: fixed;
}

:root {
    --page-ink: #132743;
    --muted-ink: #4c6077;
    --line-soft: rgba(116, 138, 168, 0.22);
    --panel-shadow: 0 24px 60px rgba(23, 44, 77, 0.11);
    --search-accent: #ef7f52;
    --search-accent-soft: rgba(239, 127, 82, 0.12);
    --recent-accent: #129ab0;
    --recent-accent-soft: rgba(18, 154, 176, 0.12);
    --button-start: #ef7f52;
    --button-end: #149aae;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 72%);
    z-index: -1;
}

.shell {
    min-height: 100vh;
    padding: 28px 16px 40px;
}

.container {
    max-width: 860px;
    margin: 0 auto;
}

.hero,
.panel {
    border: 1px solid var(--line-soft);
    box-shadow: var(--panel-shadow);
    backdrop-filter: blur(10px);
}

.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
    padding: 22px 22px 18px;
    background:
        radial-gradient(circle at top right, rgba(245, 160, 101, 0.24), transparent 30%),
        radial-gradient(circle at left center, rgba(56, 189, 248, 0.2), transparent 30%),
        linear-gradient(135deg, rgba(255, 252, 247, 0.94), rgba(241, 248, 255, 0.92) 56%, rgba(240, 252, 247, 0.92));
    border-radius: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #0d84a7;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.hero h1 {
    margin: 0;
    font-size: 29px;
    line-height: 1.15;
}

.hero-emoji {
    display: inline-block;
    margin-right: 8px;
    color: initial;
    -webkit-text-fill-color: initial;
}

.hero-title-text {
    display: inline;
    background: linear-gradient(135deg, #183252, #0d99b0 52%, #ef7f52 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    margin: 10px 0 0;
    color: var(--muted-ink);
    font-size: 15px;
    line-height: 1.6;
    max-width: 640px;
}

.panel {
    position: relative;
    padding: 22px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 24px;
}

.recent-panel {
    margin-top: 14px;
    background:
        radial-gradient(circle at top right, rgba(71, 190, 214, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(247, 252, 255, 0.92), rgba(242, 249, 248, 0.9));
}

.search-panel {
    background:
        radial-gradient(circle at top left, rgba(245, 165, 120, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 251, 247, 0.94), rgba(255, 255, 255, 0.86));
}

.search-panel::before,
.recent-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 4px;
    border-radius: 999px;
}

.search-panel::before {
    background: linear-gradient(90deg, rgba(239, 127, 82, 0.95), rgba(243, 177, 98, 0.68));
}

.recent-panel::before {
    background: linear-gradient(90deg, rgba(18, 154, 176, 0.95), rgba(55, 184, 154, 0.68));
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #2f4562;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 12px;
}

input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid rgba(201, 177, 164, 0.52);
    border-radius: 16px;
    background: rgba(255, 253, 250, 0.98);
    color: var(--page-ink);
    font-size: 14px;
    line-height: 1.65;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus {
    outline: none;
    border-color: rgba(255, 122, 89, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 122, 89, 0.14);
    transform: translateY(-1px);
}

button {
    padding: 12px 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--button-start), var(--button-end));
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(231, 121, 89, 0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(35, 166, 184, 0.24);
}

button:disabled {
    background: linear-gradient(135deg, #b8c7da, #c6d1df);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.result-meta {
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(239, 127, 82, 0.1), rgba(244, 196, 128, 0.18));
    color: #814633;
    font-size: 13px;
    border: 1px solid rgba(255, 171, 138, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.result-field {
    margin-top: 14px;
}

.result-output {
    min-height: calc(1.8em + 28px);
    padding: 14px 15px;
    border: 1px solid rgba(215, 193, 178, 0.62);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(250, 253, 255, 0.96));
    color: var(--page-ink);
    font-size: 14px;
    line-height: 1.8;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-break: break-word;
}

.result-output.is-empty {
    color: #6f8197;
}

.result-output a {
    color: #0d6c99;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.result-output a:hover {
    color: #1087c2;
}

.recent-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.recent-title-block h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    color: #183252;
}

.recent-eyebrow {
    margin-bottom: 10px;
}

.recent-desc {
    margin: 10px 0 0;
    color: var(--muted-ink);
    font-size: 14px;
    line-height: 1.6;
}

.recent-meta {
    flex-shrink: 0;
    padding: 9px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(13, 158, 194, 0.12), rgba(92, 200, 151, 0.18));
    color: #17617b;
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid rgba(73, 170, 194, 0.24);
}

.recent-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.recent-card,
.recent-empty {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(178, 214, 221, 0.58);
    background: rgba(248, 251, 255, 0.94);
    box-sizing: border-box;
}

.recent-card {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(23, 96, 117, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.recent-card:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 16px 30px rgba(23, 96, 117, 0.1);
}

.recent-card:nth-child(4n + 1) {
    background: linear-gradient(180deg, rgba(240, 250, 255, 0.98), rgba(246, 255, 252, 0.94));
}

.recent-card:nth-child(4n + 2) {
    background: linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(250, 255, 252, 0.94));
}

.recent-card:nth-child(4n + 3) {
    background: linear-gradient(180deg, rgba(246, 248, 255, 0.98), rgba(243, 253, 255, 0.94));
}

.recent-card:nth-child(4n + 4) {
    background: linear-gradient(180deg, rgba(244, 255, 249, 0.98), rgba(250, 251, 255, 0.94));
}

.recent-card h3 {
    margin: 0 0 12px;
    color: var(--page-ink);
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
}

.recent-time {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(13, 158, 194, 0.11), rgba(72, 197, 160, 0.15));
    color: #1d5c71;
    font-size: 12px;
    font-weight: 600;
}

.recent-time-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.recent-time.recent-time-fresh {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.18), rgba(255, 0, 0, 0.24));
    color: #ff0000;
}

.recent-fresh-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff0000;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.recent-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.recent-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 9px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 132, 95, 0.14), rgba(28, 167, 178, 0.14));
    color: #145c79;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.recent-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(25, 111, 122, 0.12);
    background: linear-gradient(135deg, rgba(255, 132, 95, 0.2), rgba(28, 167, 178, 0.18));
}

.recent-empty {
    grid-column: 1 / -1;
    color: #6f8197;
    text-align: center;
    border-style: dashed;
    background: linear-gradient(180deg, rgba(249, 253, 255, 0.98), rgba(246, 252, 249, 0.94));
}

.search-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(9, 18, 30, 0.32);
    backdrop-filter: blur(4px);
    z-index: 50;
}

.search-overlay.hidden {
    display: none;
}

.search-overlay-card {
    width: min(100%, 320px);
    padding: 22px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
    text-align: center;
}

.search-overlay-card p {
    margin: 0;
    color: #24506e;
    font-size: 15px;
    font-weight: 600;
}

.search-overlay-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 14px;
    border: 4px solid rgba(16, 135, 194, 0.15);
    border-top-color: #1087c2;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .shell {
        padding: 18px 12px 28px;
    }

    body::before {
        display: none;
    }

    .hero h1 {
        font-size: 24px;
    }

    input,
    button {
        font-size: 16px;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .recent-header {
        flex-direction: column;
    }

    .recent-meta {
        white-space: normal;
    }

    .recent-list {
        grid-template-columns: 1fr;
    }
}
