/* ============================================
   ShiYu Pages · App Shell
   Neon Lime Light —— apps 业务页统一设计规范
   与首页 home.css 共享霓虹青柠血脉 (#7cff01) + Hanken Grotesk
   ============================================ */

/* ---------- Web Fonts (与首页同源) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   Design Tokens
   ============================================ */
:root {
    color-scheme: light;

    /* 颜色 —— 亮色基调，强调色与首页同源 */
    --bg: #f4f5f1;              /* 页面底：米白 */
    --surface: #ffffff;         /* 卡片表面：纯白 */
    --text: #121814;            /* 主文字：近黑墨绿 */
    --muted: #5f6672;           /* 次文字：中灰 */
    --line: rgba(18, 24, 20, 0.12);     /* 标准分割线 */
    --line-soft: rgba(18, 24, 20, 0.08);/* 柔和分割线 */

    /* 强调色：霓虹青柠（与首页 home.css 同源） */
    --accent: #7cff01;
    --accent-dim: #6ce000;      /* hover 略深 */
    --on-accent: #0a1f00;       /* 青柠上的深色字 */
    --focus: rgba(124, 255, 1, 0.4);  /* 聚焦 ring */

    /* 字体 —— 标题字体与首页同源 */
    --font-headline: "Hanken Grotesk", "PingFang SC", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;

    /* 圆角 */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-pill: 999px;

    /* 阴影 —— 克制呼吸感 */
    --shadow-1: 0 8px 24px rgba(15, 23, 42, 0.05);
    --shadow-2: 0 4px 14px rgba(15, 23, 42, 0.04);
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-card-hover: 0 5px 14px rgba(15, 23, 42, 0.06);
    --shadow-accent: 0 8px 24px rgba(124, 255, 1, 0.25);
}

/* ============================================
   Base Reset
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.58;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
}

::selection {
    background: rgba(124, 255, 1, 0.25);
    color: var(--text);
}

/* ---------- 自定义滚动条（克制轻量） ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(18, 24, 20, 0.15);
    border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(18, 24, 20, 0.3);
}

/* ============================================
   Site Bar —— 站点回首页胶囊（统一组件，消除重复 inline style）
   ============================================ */
.sy-sitebar {
    padding: 12px 20px 4px;
    flex-shrink: 0;
}

.sy-sitebar-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px 5px 10px;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}
.sy-sitebar-link:hover {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.sy-sitebar-link img {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: contain;
}

/* ============================================
   Buttons
   ============================================ */
.sy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    min-height: 36px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.sy-btn:hover {
    transform: translateY(-1px);
}
.sy-btn:active {
    transform: translateY(0);
}
.sy-btn:focus-visible {
    box-shadow: 0 0 0 3px var(--focus);
}

/* 主按钮：霓虹青柠底 + 深墨字 */
.sy-btn-primary {
    background-color: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    box-shadow: var(--shadow-accent);
}
.sy-btn-primary:hover {
    background-color: var(--accent-dim);
    box-shadow: 0 12px 28px rgba(124, 255, 1, 0.35);
}

/* 次按钮：白底描边 */
.sy-btn-ghost {
    background-color: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
}
.sy-btn-ghost:hover {
    background-color: #fcfcfc;
    box-shadow: var(--shadow-card);
}

/* ============================================
   Form Controls
   ============================================ */
.sy-input,
.sy-textarea,
.sy-select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    padding: 9px 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sy-input:focus,
.sy-textarea:focus,
.sy-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus);
}
.sy-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* ============================================
   Panel —— 卡片面板
   ============================================ */
.sy-panel {
    background-color: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.sy-panel:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(18, 24, 20, 0.12);
}
.sy-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}
.sy-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.sy-panel-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
    opacity: 0.7;
}
.sy-panel-title .dot-accent {
    background: var(--accent);
}

/* ============================================
   Toast —— 轻提示
   ============================================ */
.sy-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 12px 20px;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-1);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
    pointer-events: none;
    z-index: 50;
}
.sy-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Eyebrow / Pill —— 小标签
   ============================================ */
.sy-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}
.sy-eyebrow .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}
.sy-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--r-pill);
    padding: 6px 12px;
    font-size: 12px;
    color: var(--muted);
    background: #f5f7f4;
    border: 1px solid var(--line-soft);
}

/* ============================================
   Noise Texture —— 噪点纹理（工具页共享）
   ============================================ */
.noise-bg {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 50;
}
