:root {
    /* 2026 极深墨色背景：深邃且省电 */
    --bg-body: #050505;

    /* 毛玻璃：稍微增加透明度，更灵动 */
    --bg-glass: rgba(15, 15, 15, 0.65);

    /* 卡片微调：采用中性黑 #0D0D0E，比纯黑更有质感 */
    --card-bg: #0D0D0E;

    /* 2026 工具栏：降低饱和度，更沉浸 */
    --card-toolbar: #121214;

    --text-primary: #FFFFFF;

    /* 2026 中性灰色调文本 */
    --text-secondary: #9BA0A8;

    --border-light: rgba(255, 255, 255, 0.04);

    /* === 核心微调：2026 去饱和中性蓝 === */
    /* 摒弃高饱和度 #0A84FF，转向更柔和、优雅的灰色调蓝 */
    --accent-blue: #66B3FF;

    /* 去饱和柔和红 */
    --danger-red: #FF6666;

    --font-serif: "Georgia", "Times New Roman", serif;
    --header-h: 240px;
}

[data-theme="light"] {
    --bg-body: #F2F2F7;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --card-bg: #FFFFFF;
    --card-toolbar: #FAFAFA;
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    --border-light: rgba(0, 0, 0, 0.03);

    /* 浅色模式保持原有的清晰度，稍微中性化 */
    --accent-blue: #007AFF;
    --danger-red: #FF3B30;
}

body {
    margin: 0;
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1), color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    -webkit-user-select: none;
    /* 禁用长按弹出菜单，更具 App 感 */
}

/* 艺术化大标题 */
.brand {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 800;
    font-size: 34px;
    /* 稍微调大，更震撼 */
    letter-spacing: -1.2px;
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* 标题渐变微调：减少白色分量，增加银灰分量 */
    background: linear-gradient(180deg, #FFFFFF 0%, #BDBDBD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* 开场动画 */
    animation: slideUpLargeTitle 1.2s cubic-bezier(0.2, 0, 0.2, 1);
}

.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(25px);
    -webkit-backdrop-filter: saturate(180%) blur(25px);
    border-bottom: 1px solid var(--border-light);
    padding: calc(env(safe-area-inset-top) + 20px) 20px 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* 主题切换按钮微调 */
.btn-theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

/* 输入区域艺术化 */
textarea {
    width: 100%;
    height: 90px;
    border-radius: 14px;
    padding: 14px;
    font-size: 16px;
    background: rgba(128, 128, 128, 0.06);
    border: 1px solid transparent;
    color: var(--text-primary);
    outline: none;
    resize: none;
    box-sizing: border-box;
    transition: background 0.3s, border-color 0.3s, font-size 0.1s;
}

textarea:focus {
    background: rgba(128, 128, 128, 0.09);
    border-color: rgba(255, 255, 255, 0.1);
    font-size: 16px;
    /* 解决 iOS 自动缩放问题 */
}

.input-footer {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

#remarkBox {
    flex: 1;
    border-radius: 10px;
    background: rgba(128, 128, 128, 0.06);
    border: none;
    padding: 0 14px;
    color: var(--text-primary);
    height: 44px;
    outline: none;
    font-size: 14px;
}

.btn-push {
    background: #FFFFFF;
    /* 2026 标准黑白对比 */
    color: #000000;
    border: none;
    padding: 0 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-push:active {
    transform: scale(0.95);
    opacity: 0.8;
}

/* 列表与卡片 */
.history-list {
    padding: var(--header-h) 18px 40px;
    max-width: 600px;
    margin: 0 auto;
}

.history-card {
    background: var(--card-bg);
    border-radius: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;

    /* 2026 标准悬浮感 */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);

    transition: transform 0.3s, opacity 0.3s, background-color 0.5s;
    animation: slideInCard 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-content {
    padding: 18px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-time {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-serif);
}

/* 去饱和柔和倒计时 */
.expire-tag {
    font-size: 10px;
    color: var(--danger-red);
    font-weight: 700;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

/* 2026 中性蓝备注 */
.card-remark {
    font-size: 11px;
    color: var(--accent-blue);
    background: rgba(102, 179, 255, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
}

.card-text {
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 工具栏沉浸式 */
.card-toolbar {
    display: flex;
    height: 48px;
    background: var(--card-toolbar);
    border-top: 1px solid var(--border-light);
}

.tool-btn {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.2s;
}

.tool-btn:active {
    background: rgba(255, 255, 255, 0.05);
}

/* 自定义跳转蓝色微调 */
.btn-jump {
    color: var(--accent-blue);
}

/* 自定义抹除红色微调 */
.btn-del {
    color: var(--danger-red);
}

/* 2026 Action Sheet 质感 */
.sheet-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-end;
}

.sheet-mask.show {
    opacity: 1;
    pointer-events: auto;
}

.sheet-content {
    width: 100%;
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet-mask.show .sheet-content {
    transform: translateY(0);
}

.sheet-title {
    font-weight: 700;
    font-size: 17px;
    text-align: center;
}

.sheet-desc {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin: 8px 0 24px;
}

.sheet-btn {
    width: 100%;
    height: 54px;
    border-radius: 16px;
    border: none;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-danger {
    background: var(--danger-red);
    color: white;
}

.btn-cancel {
    background: rgba(128, 128, 128, 0.12);
    color: var(--text-primary);
}

.sheet-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* === 开场艺术动画 === */
@keyframes slideUpLargeTitle {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.safe-area-bottom {
    height: env(safe-area-inset-bottom);
}