@charset "UTF-8";

:root {
    --bg: #f5f3ef;
    --ink: #1f2937;
    --muted: #6b7280;
    --accent: #1E3A8A;
    --accent-2: #f59e0b;
    --panel: #ffffff;
    --panel-2: #f8fafc;
    --border: #e5e7eb;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: radial-gradient(circle at top left, #ffffff 0%, #f7f5f1 45%, #ece7e0 100%);
    min-height: 100vh;

    font-family: 'Noto Sans SC',
                 -apple-system,
                 BlinkMacSystemFont,
                 "Segoe UI",
                 "PingFang SC",
                 "Microsoft YaHei",
                 sans-serif;
}



body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(30, 58, 138, 0.08), transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.12), transparent 38%),
        radial-gradient(circle at 40% 90%, rgba(15, 23, 42, 0.06), transparent 35%);
    pointer-events: none;
    z-index: 0;
}

.page {
    width: 60%;
    min-width: 320px;
    max-width: 1100px;
    margin: 40px auto 60px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeUp 0.7s ease;
}

.section {
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.section-a {
    background: var(--accent);
    color: #fff;
    padding: 26px 28px;
}

.section-a-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-title {
    margin: 0;
    font-size: 30px;
    letter-spacing: 2px;
}

.section-title {
    margin: 0 0 14px;
    font-size: 20px;
}

.section-b,
.section-c,
.section-d {
    background: var(--panel-2);
}

.section-d {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 8px 18px;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chip.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.bookmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 150px);
    gap: 14px;
    justify-content: flex-start;
}

.bookmark-card {
    background: #fff;
    border-radius: 14px;
    width: 150px;
    height: 50px;
    padding: 0 12px;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bookmark-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    background: var(--accent);
    color: #fff;
    font-family: "SimHei", sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: #16327a;
}

.btn-ghost,
.btn-ghost:visited,
.btn-ghost:active,
.btn-ghost:focus {
    color: #fff;
    background: var(--accent);
    font-family: "SimHei", sans-serif;
    text-decoration: none;
}


.input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}

.empty-hint {
    color: var(--muted);
    font-size: 14px;
}

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-card {
    width: min(420px, 92vw);
    background: var(--panel);
    padding: 32px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-title {
    margin: 0 0 8px;
    font-size: 24px;
}

.auth-subtitle {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14px;
}

.auth-form {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.form-error {
    color: #b91c1c;
    font-size: 13px;
}

.text-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
}

.admin-body {
    background: #f3f0eb;
}

.admin-page .section {
    background: #fff;
}

.admin-header {
    margin-bottom: 10px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.notice {
    padding: 12px 18px;
    border-radius: 12px;
    margin: 0 0 12px;
    font-size: 14px;
}

.notice-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.notice-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.card-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    align-items: center;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--panel-2);
    border-radius: 999px;
    padding: 6px 12px;
    border: 1px solid var(--border);
}

.icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
}

.trash-icon {
    width: 16px;
    height: 16px;
    fill: #9f1239;
}

.bookmark-list {
    display: grid;
    gap: 10px;
}

.bookmark-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--panel-2);
}

.bookmark-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.bookmark-meta {
    font-size: 12px;
    color: var(--muted);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .page {
        width: 92%;
    }
    .section-a-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
