/* Personal Agent — Apple Refined Light Theme */

:root {
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --surface: #ffffff;
    --bg: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ─── Base ─── */
body {
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 移除移动端点击高亮闪烁 */
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
}

/* iOS 输入框防缩放：font-size >= 16px 阻止聚焦时自动 zoom */
@media (max-width: 767px) {
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="password"],
    input[type="url"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ─── Button press feedback（仅 transform，合成器动画不触发重排） ─── */
.btn-press {
    transition: transform 120ms ease-out;
    -webkit-user-select: none;
    user-select: none;
}
.btn-press:active {
    transform: scale(0.97);
}

/* ─── Card hover elevation（仅精确指针设备启用 hover 效果） ─── */
.card-hover {
    box-shadow: var(--shadow-sm);
}
@media (hover: hover) and (pointer: fine) {
    .card-hover {
        transition: box-shadow 200ms ease-out, transform 200ms ease-out;
    }
    .card-hover:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }
}

/* ─── Interactive list item ─── */
.item-press {
    transition: transform 100ms ease-out;
}
.item-press:active {
    transform: scale(0.98);
}

/* ─── Line clamp utilities ─── */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Scrollbar（桌面端细滚动条，触屏设备隐藏） ─── */
@media (hover: hover) and (pointer: fine) {
    ::-webkit-scrollbar {
        width: 5px;
        height: 5px;
    }
    ::-webkit-scrollbar-track {
        background: transparent;
    }
    ::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.12);
        border-radius: 100px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.2);
    }
}
@media (hover: none), (pointer: coarse) {
    * {
        scrollbar-width: none;
    }
    *::-webkit-scrollbar {
        display: none;
    }
}

/* ─── 横向滚动容器优化（筛选条等） ─── */
.scroll-x-safe {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.scroll-x-safe::-webkit-scrollbar {
    display: none;
}

/* ─── Editor textarea ─── */
textarea {
    tab-size: 4;
}

/* ─── Focus ring (Apple style) ─── */
.focus-apple:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .card-hover:hover {
        transform: none;
    }
    .btn-press:active {
        transform: none;
    }
}
/* Personal Agent — Apple Refined Light Theme */

:root {
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --surface: #ffffff;
    --bg: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

/* ─── Base ─── */
body {
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Button press feedback ─── */
.btn-press {
    transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 120ms ease-out;
}
.btn-press:active {
    transform: scale(0.97);
}

/* ─── Card hover elevation ─── */
.card-hover {
    box-shadow: var(--shadow-sm);
    transition: box-shadow 200ms ease-out, transform 200ms ease-out;
}
.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* ─── Interactive list item ─── */
.item-press {
    transition: background-color 100ms ease-out, transform 100ms ease-out;
}
.item-press:active {
    transform: scale(0.98);
}

/* ─── Line clamp utilities ─── */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ─── Editor textarea ─── */
textarea {
    tab-size: 4;
}

/* ─── Focus ring (Apple style) ─── */
.focus-apple:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .card-hover:hover {
        transform: none;
    }
    .btn-press:active {
        transform: none;
    }
}
/* Personal Agent - Main Styles */

/* Smooth transitions */
* {
    transition-property: background-color, border-color;
    transition-duration: 150ms;
}

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

/* Editor textarea */
textarea {
    tab-size: 4;
}
