/**
 * Liquid Glass iOS Settings - Premium UI
 *
 * 设计灵感: Apple Liquid Glass UI, shadcn/ui, 21st.dev
 * 特性: 毛玻璃材质, 多层阴影, 弹性动画, 日夜模式
 */

/* ================================================================
   1. 字体系统 - 本地化，离线可用
   ================================================================ */
/* 使用系统原生字体栈，确保离线可用且性能最佳 */

/* ================================================================
   2. CSS 变量系统 - Liquid Glass Design Tokens
   ================================================================ */
:root {
    /* --- Typography (本地系统字体，离线可用) --- */
    --font-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
                    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

    /* --- Light Mode Colors (Porcelain) --- */
    --lg-bg-start: #fdfbf7;
    --lg-bg-end: #f4f1ea;
    --lg-bg-gradient: linear-gradient(160deg, var(--lg-bg-start) 0%, var(--lg-bg-end) 100%);

    /* Glass Materials */
    --lg-glass: rgba(255, 255, 255, 0.65);
    --lg-glass-hover: rgba(255, 255, 255, 0.78);
    --lg-glass-active: rgba(255, 255, 255, 0.55);
    --lg-glass-border: rgba(255, 255, 255, 0.5);
    --lg-glass-shine: linear-gradient(120deg,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 70%);

    /* Text */
    --lg-text-primary: #1d1d1f;
    --lg-text-secondary: #86868b;
    --lg-text-tertiary: #aeaeb2;

    /* Separators */
    --lg-separator: rgba(60, 60, 67, 0.08);

    /* Frost Effect */
    --lg-frost: blur(24px) saturate(180%);

    /* Shadows - Cream Porcelain Style (多层温暖阴影) */
    /* 使用温暖的棕褐色调，分层递增，模拟真实光影 */
    --lg-shadow-combined:
        0 1px 2px hsl(30 15% 40% / 0.04),
        0 2px 4px hsl(30 15% 40% / 0.04),
        0 4px 8px hsl(30 15% 40% / 0.04),
        0 8px 16px hsl(30 15% 40% / 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);

    /* Hover Shadows - 更明显的提升感 */
    --lg-shadow-hover:
        0 2px 4px hsl(30 15% 40% / 0.05),
        0 4px 8px hsl(30 15% 40% / 0.05),
        0 8px 16px hsl(30 15% 40% / 0.05),
        0 16px 32px hsl(30 15% 40% / 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);

    /* Border Radius */
    --lg-radius-sm: 12px;
    --lg-radius-md: 18px;
    --lg-radius-lg: 24px;
    --lg-radius-xl: 32px;

    /* Animations */
    --lg-ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    --lg-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --lg-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --lg-duration-fast: 0.2s;
    --lg-duration-normal: 0.3s;
    --lg-duration-slow: 0.5s;

    /* Accent Colors */
    --lg-accent-blue: #007aff;
    --lg-accent-green: #34c759;
    --lg-accent-orange: #ff9500;
    --lg-accent-red: #ff3b30;
    --lg-accent-purple: #af52de;
    --lg-accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Macaron Colors (低饱和，高明度，柔和可爱) */
    --macaron-green: #B5EAD7;
    --macaron-blue: #C7CEEA;
    --macaron-purple: #E0BBE4;
    --macaron-pink: #FF9AA2;
    --macaron-orange: #FFDAC1;
    --macaron-yellow: #FFFFD8;
}

/* --- Dark Mode (Obsidian Glass) --- */
[data-theme="night"],
body.night,
body.dark-mode,
.screen.iosm.night {
    --lg-bg-start: #0a0a0a;
    --lg-bg-end: #1a1a1a;
    --lg-bg-gradient: linear-gradient(160deg, var(--lg-bg-start) 0%, var(--lg-bg-end) 100%);

    /* Dark Glass Materials */
    --lg-glass: rgba(38, 38, 40, 0.65);
    --lg-glass-hover: rgba(48, 48, 52, 0.75);
    --lg-glass-active: rgba(28, 28, 30, 0.55);
    --lg-glass-border: rgba(255, 255, 255, 0.1);
    --lg-glass-shine: linear-gradient(120deg,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0) 70%);

    /* Dark Text */
    --lg-text-primary: #f5f5f7;
    --lg-text-secondary: #98989d;
    --lg-text-tertiary: #636366;

    /* Dark Separators */
    --lg-separator: rgba(255, 255, 255, 0.08);

    /* Dark Shadows - 暗色模式分层阴影 */
    --lg-shadow-combined:
        0 1px 2px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);

    --lg-shadow-hover:
        0 2px 4px rgba(0, 0, 0, 0.18),
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* 夜间模式下 .screen.iosm 的显式背景覆盖 */
body.dark-mode .screen.iosm,
body.night .screen.iosm,
[data-theme="night"] .screen.iosm {
    background: linear-gradient(160deg, #0a0a0a 0%, #1a1a1a 100%) !important;
    color: #f5f5f7 !important;
}

/* ================================================================
   3. 动画关键帧
   ================================================================ */

/* 入场动画 - 从下方浮入 */
@keyframes lg-float-in {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 淡入 */
@keyframes lg-fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* 背景雾气流动 */
@keyframes lg-mist-flow {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-2%, -1%) rotate(1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* 微光闪烁 */
@keyframes lg-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 脉冲发光 */
@keyframes lg-pulse-glow {
    0%, 100% { box-shadow: var(--lg-shadow-combined); }
    50% { box-shadow: var(--lg-shadow-hover); }
}

/* ================================================================
   4. iOS 设置容器 - 主界面
   ================================================================ */

.screen.iosm {
    font-family: var(--font-primary) !important;
    background: var(--lg-bg-gradient) !important;
    color: var(--lg-text-primary) !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: background var(--lg-duration-slow) var(--lg-ease-smooth);
}

/* 动态背景雾气层 */
.screen.iosm::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(118, 75, 162, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    animation: lg-mist-flow 20s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
}

/* 暗色模式背景调整 */
.screen.iosm.night::before,
[data-theme="night"] .screen.iosm::before,
body.dark-mode .screen.iosm::before,
body.night .screen.iosm::before {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(102, 126, 234, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(118, 75, 162, 0.08) 0%, transparent 50%);
    opacity: 0.5;
}

/* ================================================================
   5. 头部区域
   ================================================================ */

.screen.iosm .iosm-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 8px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    background: transparent;
}

.screen.iosm .iosm-back {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--lg-radius-sm);
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    color: var(--lg-text-primary) !important;
    font-size: 22px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--lg-shadow-combined);
    border: 1px solid var(--lg-glass-border);
    transition: all var(--lg-duration-fast) var(--lg-ease-smooth);
}

.screen.iosm .iosm-back:hover {
    background: var(--lg-glass-hover);
    transform: scale(1.05);
}

.screen.iosm .iosm-back:active {
    transform: scale(0.95);
    background: var(--lg-glass-active);
}

.screen.iosm .iosm-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--lg-text-primary) !important;
    margin: 0;
    padding: 8px 20px 16px;
    animation: lg-fade-in var(--lg-duration-normal) var(--lg-ease-out);
}

/* ================================================================
   6. 滚动区域
   ================================================================ */

.screen.iosm .iosm-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0 40px 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    z-index: 1;
}

/* 自定义滚动条 */
.screen.iosm .iosm-body::-webkit-scrollbar {
    width: 6px;
}

.screen.iosm .iosm-body::-webkit-scrollbar-track {
    background: transparent;
}

.screen.iosm .iosm-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.screen.iosm .iosm-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.screen.iosm.night .iosm-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

/* ================================================================
   7. 搜索框 - Glass Style
   ================================================================ */

.screen.iosm .iosm-search {
    margin: 0 20px 20px;
    padding: 14px 16px;
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    border-radius: var(--lg-radius-md);
    border: 1px solid var(--lg-glass-border);
    box-shadow: var(--lg-shadow-combined);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: lg-float-in var(--lg-duration-slow) var(--lg-ease-elastic) 0.05s backwards;
    transition: all var(--lg-duration-fast) var(--lg-ease-smooth);
}

.screen.iosm .iosm-search:focus-within {
    box-shadow: var(--lg-shadow-hover), 0 0 0 3px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.screen.iosm .iosm-search .icon,
.screen.iosm .iosm-search .search-icon {
    width: 20px;
    height: 20px;
    color: var(--lg-text-secondary);
    opacity: 0.6;
    flex-shrink: 0;
}

.screen.iosm .iosm-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: var(--font-primary);
    color: var(--lg-text-primary);
    outline: none;
}

.screen.iosm .iosm-search input::placeholder {
    color: var(--lg-text-tertiary);
}

/* ================================================================
   8. 个人资料卡片 - Premium Glass Card
   ================================================================ */

.screen.iosm .iosm-profile {
    margin: 0 20px 24px;
    padding: 18px;
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    border-radius: var(--lg-radius-lg);
    border: 1px solid var(--lg-glass-border);
    box-shadow: var(--lg-shadow-combined);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    width: auto;
    animation: lg-float-in var(--lg-duration-slow) var(--lg-ease-elastic) 0.1s backwards;
    transition: all var(--lg-duration-normal) var(--lg-ease-smooth);
    position: relative;
    overflow: hidden;
}

/* 光泽效果层 */
.screen.iosm .iosm-profile::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--lg-glass-shine);
    transition: left 0.6s var(--lg-ease-smooth);
    pointer-events: none;
}

.screen.iosm .iosm-profile:hover {
    transform: translateY(-2px);
    box-shadow: var(--lg-shadow-hover);
    background: var(--lg-glass-hover);
}

.screen.iosm .iosm-profile:hover::after {
    left: 100%;
}

.screen.iosm .iosm-profile:active {
    transform: translateY(0) scale(0.99);
    background: var(--lg-glass-active);
}

.screen.iosm .iosm-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #e8e8ed 0%, #d1d1d6 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.screen.iosm .iosm-ptext {
    flex: 1;
    min-width: 0;
}

.screen.iosm .iosm-pname {
    font-size: 18px;
    font-weight: 600;
    color: var(--lg-text-primary) !important;
    margin-bottom: 2px;
}

.screen.iosm .iosm-psub {
    font-size: 13px;
    color: var(--lg-text-secondary) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.screen.iosm .iosm-profile .iosm-chev {
    font-size: 20px;
    color: var(--lg-text-tertiary) !important;
    margin-left: 8px;
}

/* ================================================================
   9. 日夜模式切换按钮 - Premium Toggle
   ================================================================ */

.screen.iosm .theme-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px !important;
    background: transparent;
}

.screen.iosm .theme-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.screen.iosm .theme-toggle-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--lg-text-primary) !important;
}

.screen.iosm .theme-toggle-desc {
    font-size: 13px;
    color: var(--lg-text-secondary) !important;
}

/* 主题切换按钮 - Jewel Style */
.screen.iosm .theme-toggle-btn {
    position: relative;
    width: 76px;
    height: 42px;
    border: none;
    border-radius: 21px;
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.3) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all var(--lg-duration-slow) var(--lg-ease-elastic);
    overflow: hidden;
    flex-shrink: 0;
}

.screen.iosm .theme-toggle-btn:hover {
    transform: scale(1.03);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.screen.iosm .theme-toggle-btn:active {
    transform: scale(0.97);
}

/* 滑块 */
.screen.iosm .theme-toggle-btn .toggle-knob {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 1);
    transition: all var(--lg-duration-slow) var(--lg-ease-elastic);
    z-index: 2;
}

/* 图标 */
.screen.iosm .theme-toggle-btn .theme-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--lg-duration-normal) var(--lg-ease-smooth);
    z-index: 1;
}

.screen.iosm .theme-toggle-btn .theme-icon.sun {
    left: 4px;
    color: #ff9500;
    opacity: 1;
}

.screen.iosm .theme-toggle-btn .theme-icon.moon {
    right: 4px;
    color: var(--lg-text-tertiary);
    opacity: 0.4;
}

.screen.iosm .theme-toggle-btn .theme-icon svg {
    width: 18px;
    height: 18px;
}

/* 夜间模式状态 */
.screen.iosm .theme-toggle-btn.night {
    background: linear-gradient(145deg,
        rgba(45, 45, 50, 0.8) 0%,
        rgba(30, 30, 35, 0.9) 100%);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.screen.iosm .theme-toggle-btn.night .toggle-knob {
    left: calc(100% - 38px);
    background: linear-gradient(145deg, #3a3a3c 0%, #2c2c2e 100%);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.screen.iosm .theme-toggle-btn.night .theme-icon.sun {
    opacity: 0.3;
    color: #636366;
}

.screen.iosm .theme-toggle-btn.night .theme-icon.moon {
    opacity: 1;
    color: #ffd60a;
    filter: drop-shadow(0 0 6px rgba(255, 214, 10, 0.4));
}

/* ================================================================
   10. 设置组 - Glass Card Group
   ================================================================ */

.screen.iosm .iosm-group {
    margin: 0 20px 20px;
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    border-radius: var(--lg-radius-lg);
    border: 1px solid var(--lg-glass-border);
    box-shadow: var(--lg-shadow-combined);
    overflow: hidden;
    animation: lg-float-in var(--lg-duration-slow) var(--lg-ease-elastic) 0.15s backwards;
}

/* 分组标题 */
.screen.iosm .iosm-header-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--lg-text-secondary) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 24px 20px 8px;
    background: transparent;
}

/* ================================================================
   11. 设置行 - Interactive Row
   ================================================================ */

.screen.iosm .iosm-row {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    min-height: 52px;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    position: relative;
    transition: all var(--lg-duration-fast) var(--lg-ease-smooth);
}

.screen.iosm .iosm-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

.screen.iosm.night .iosm-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.screen.iosm .iosm-row:active {
    background: rgba(0, 0, 0, 0.06);
    transform: scale(0.995);
}

/* 分隔线 - 渐变淡出 */
.screen.iosm .iosm-row + .iosm-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 60px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg,
        var(--lg-separator) 0%,
        var(--lg-separator) 80%,
        transparent 100%);
}

/* ================================================================
   12. 图标容器 - Gradient Icon Badge
   ================================================================ */

.screen.iosm .iosm-leading {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
    font-size: 16px;
    background: linear-gradient(135deg, #e8e8ed 0%, #d1d1d6 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform var(--lg-duration-fast) var(--lg-ease-smooth);
}

.screen.iosm .iosm-row:hover .iosm-leading {
    transform: scale(1.05);
}

.screen.iosm .iosm-leading svg {
    width: 18px;
    height: 18px;
}

/* 单色图标风格 - 简洁优雅 */
.screen.iosm .iosm-leading.icon-blue,
.screen.iosm .iosm-leading.icon-green,
.screen.iosm .iosm-leading.icon-orange,
.screen.iosm .iosm-leading.icon-red,
.screen.iosm .iosm-leading.icon-purple,
.screen.iosm .iosm-leading.icon-teal,
.screen.iosm .iosm-leading.icon-pink,
.screen.iosm .iosm-leading.icon-gray,
.screen.iosm .iosm-leading.icon-gradient {
    background: rgba(120, 120, 128, 0.12);
    color: #636366;
}

/* 暗色模式下的单色图标 */
body.dark-mode .screen.iosm .iosm-leading.icon-blue,
body.dark-mode .screen.iosm .iosm-leading.icon-green,
body.dark-mode .screen.iosm .iosm-leading.icon-orange,
body.dark-mode .screen.iosm .iosm-leading.icon-red,
body.dark-mode .screen.iosm .iosm-leading.icon-purple,
body.dark-mode .screen.iosm .iosm-leading.icon-teal,
body.dark-mode .screen.iosm .iosm-leading.icon-pink,
body.dark-mode .screen.iosm .iosm-leading.icon-gray,
body.dark-mode .screen.iosm .iosm-leading.icon-gradient {
    background: rgba(255, 255, 255, 0.1);
    color: #98989f;
}

/* ================================================================
   13. 标签和值
   ================================================================ */

.screen.iosm .iosm-label {
    font-size: 16px;
    font-weight: 400;
    color: var(--lg-text-primary) !important;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen.iosm .iosm-value {
    font-size: 14px;
    color: var(--lg-text-secondary) !important;
    margin-left: auto;
    padding-right: 4px;
}

.screen.iosm .iosm-chev {
    font-size: 18px;
    color: var(--lg-text-tertiary) !important;
    margin-left: 4px;
    transition: transform var(--lg-duration-fast) var(--lg-ease-smooth);
}

.screen.iosm .iosm-row:hover .iosm-chev {
    transform: translateX(2px);
}

/* ================================================================
   14. 开关 - Capsule Switch
   ================================================================ */

.screen.iosm .iosm-switch {
    position: relative;
    width: 52px;
    height: 32px;
    margin-left: auto;
    flex-shrink: 0;
}

.screen.iosm .iosm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.screen.iosm .iosm-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(120, 120, 128, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 32px;
    transition: all var(--lg-duration-normal) var(--lg-ease-elastic);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.screen.iosm .iosm-slider::before {
    content: "";
    position: absolute;
    height: 28px;
    width: 28px;
    left: 2px;
    bottom: 2px;
    background: linear-gradient(145deg, #ffffff 0%, #f5f5f5 100%);
    border-radius: 50%;
    transition: all var(--lg-duration-normal) var(--lg-ease-elastic);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.screen.iosm .iosm-switch input:checked + .iosm-slider {
    background: var(--lg-accent-green);
}

.screen.iosm .iosm-switch input:checked + .iosm-slider::before {
    transform: translateX(20px);
}

/* ================================================================
   15. 间隔
   ================================================================ */

.screen.iosm .iosm-spacer {
    height: 8px;
}

/* ================================================================
   15.1 存储空间指示器
   ================================================================ */

.screen.iosm .storage-indicator {
    padding: 20px;
    margin: 0 16px 16px;
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    border-radius: var(--lg-radius-lg);
    border: 1px solid var(--lg-glass-border);
    box-shadow: var(--lg-shadow-combined);
}

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

.screen.iosm .storage-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--lg-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.screen.iosm .storage-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--lg-text-primary);
}

.screen.iosm .storage-bar {
    height: 8px;
    background: rgba(120, 120, 128, 0.16);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.screen.iosm .storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #34c759 0%, #30d158 50%, #ff9500 85%, #ff3b30 100%);
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.5s var(--lg-ease-elastic);
}

.screen.iosm .storage-detail {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--lg-text-tertiary);
}

/* 操作按钮颜色 */
.screen.iosm .iosm-row.action-blue .iosm-label {
    color: var(--lg-accent-blue) !important;
}

.screen.iosm .iosm-row.action-orange .iosm-label {
    color: var(--lg-accent-orange) !important;
}

.screen.iosm .iosm-row.action-red .iosm-label {
    color: var(--lg-accent-red) !important;
}

/* ================================================================
   16. 折叠组
   ================================================================ */

.screen.iosm .iosm-collapse-group {
    width: 100%;
}

.screen.iosm .iosm-collapse-arrow {
    transition: transform var(--lg-duration-normal) var(--lg-ease-smooth);
}

.screen.iosm .iosm-collapse-arrow.expanded {
    transform: rotate(90deg);
}

.screen.iosm .iosm-collapse-content {
    overflow: hidden;
    transition: max-height var(--lg-duration-normal) var(--lg-ease-smooth);
}

.screen.iosm .iosm-sub-item {
    padding-left: 60px;
    background: rgba(0, 0, 0, 0.02);
}

.screen.iosm .iosm-sub-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.screen.iosm .iosm-sub-leading {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(120, 120, 128, 0.08);
    color: var(--lg-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.screen.iosm .iosm-sub-leading svg {
    width: 14px;
    height: 14px;
}

body.dark-mode .screen.iosm .iosm-sub-leading {
    background: rgba(255, 255, 255, 0.08);
    color: var(--lg-text-tertiary);
}

/* 敬请期待标签 */
.screen.iosm .coming-soon-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(120, 120, 128, 0.12);
    color: var(--lg-text-tertiary);
    margin-right: 8px;
}

body.dark-mode .screen.iosm .coming-soon-tag {
    background: rgba(255, 255, 255, 0.1);
}

/* 重置按钮警告色 */
.screen.iosm .iosm-row.action-warning .iosm-label {
    color: var(--lg-accent-orange) !important;
}

/* 日夜切换按钮 SVG 图标 */
.screen.iosm .theme-toggle-btn .theme-icon svg {
    width: 16px;
    height: 16px;
}

/* ================================================================
   17. 过渡动画 - 页面进入时的错开动画
   ================================================================ */

.screen.iosm .iosm-group:nth-child(1) { animation-delay: 0.1s; }
.screen.iosm .iosm-group:nth-child(2) { animation-delay: 0.15s; }
.screen.iosm .iosm-group:nth-child(3) { animation-delay: 0.2s; }
.screen.iosm .iosm-group:nth-child(4) { animation-delay: 0.25s; }
.screen.iosm .iosm-group:nth-child(5) { animation-delay: 0.3s; }

/* ================================================================
   18. 响应式调整
   ================================================================ */

@media (max-width: 375px) {
    .screen.iosm .iosm-title {
        font-size: 28px;
    }

    .screen.iosm .iosm-row {
        padding: 12px 14px;
    }

    .screen.iosm .iosm-profile {
        padding: 14px;
    }
}

/* ================================================================
   19. 高对比度模式支持
   ================================================================ */

@media (prefers-contrast: high) {
    .screen.iosm .iosm-group {
        border: 2px solid var(--lg-text-primary);
    }

    .screen.iosm .iosm-row + .iosm-row::before {
        background: var(--lg-text-primary);
        height: 2px;
    }
}

/* ================================================================
   20. 减少动画偏好
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
    .screen.iosm *,
    .screen.iosm *::before,
    .screen.iosm *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .screen.iosm::before {
        animation: none;
    }
}

/* ================================================================
   21. 数据管理页面 - Macaron Style
   ================================================================ */

/* Dark Mode Macaron Colors */
body.dark-mode .screen.iosm {
    --macaron-green: #76C7A8;
    --macaron-blue: #8FA4D6;
    --macaron-purple: #B991C4;
    --macaron-pink: #E87A85;
    --macaron-orange: #E6B695;
}

/* Storage Hero Card */
.screen.iosm .storage-hero {
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    border-radius: var(--lg-radius-lg);
    padding: 28px 24px;
    margin: 0 16px 16px;
    box-shadow: var(--lg-shadow-combined);
    text-align: center;
    border: 1px solid var(--lg-glass-border);
}

.screen.iosm .storage-hero-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--macaron-blue) 0%, var(--macaron-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(199, 206, 234, 0.4);
}

.screen.iosm .storage-hero-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.screen.iosm .storage-hero-value {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 2px;
    color: var(--lg-text-primary);
}

.screen.iosm .storage-hero-unit {
    font-size: 16px;
    color: var(--lg-text-secondary);
    font-weight: 600;
    margin-left: 4px;
}

.screen.iosm .storage-hero-sub {
    font-size: 13px;
    color: var(--lg-text-secondary);
    margin-bottom: 20px;
}

/* Soft Bar (Segmented Storage) */
.screen.iosm .soft-bar-track {
    height: 14px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    display: flex;
    overflow: hidden;
    margin-bottom: 16px;
    gap: 2px;
}

body.dark-mode .screen.iosm .soft-bar-track {
    background: rgba(255, 255, 255, 0.06);
}

.screen.iosm .bar-seg {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.screen.iosm .seg-chat {
    background: var(--macaron-green);
    border-radius: 10px 4px 4px 10px;
}

.screen.iosm .seg-world {
    background: var(--macaron-blue);
}

.screen.iosm .seg-backpack {
    background: var(--macaron-orange);
}

.screen.iosm .seg-other {
    background: var(--macaron-pink);
    border-radius: 4px 10px 10px 4px;
}

.screen.iosm .legend-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.screen.iosm .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--lg-text-secondary);
}

.screen.iosm .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 3px;
}

/* Macaron Menu Items */
.screen.iosm .macaron-menu-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 16px;
}

.screen.iosm .macaron-menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    border-radius: var(--lg-radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid var(--lg-glass-border);
}

.screen.iosm .macaron-menu-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--lg-shadow-hover);
}

.screen.iosm .macaron-menu-item:active {
    transform: scale(0.98);
}

.screen.iosm .macaron-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: var(--lg-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    transition: transform 0.2s;
}

.screen.iosm .macaron-menu-item:hover .macaron-icon-wrapper {
    transform: rotate(-5deg) scale(1.08);
}

.screen.iosm .macaron-icon-wrapper svg {
    width: 20px;
    height: 20px;
}

/* Icon Background Colors */
.screen.iosm .macaron-bg-green {
    background: rgba(181, 234, 215, 0.35);
    color: #4A9B7F;
}

.screen.iosm .macaron-bg-blue {
    background: rgba(199, 206, 234, 0.35);
    color: #5A7AB8;
}

.screen.iosm .macaron-bg-purple {
    background: rgba(224, 187, 228, 0.35);
    color: #9B6FA8;
}

.screen.iosm .macaron-bg-pink {
    background: rgba(255, 154, 162, 0.25);
    color: #C85A6A;
}

.screen.iosm .macaron-bg-orange {
    background: rgba(255, 218, 193, 0.45);
    color: #CC8B65;
}

body.dark-mode .screen.iosm .macaron-bg-green {
    background: rgba(118, 199, 168, 0.2);
}

body.dark-mode .screen.iosm .macaron-bg-blue {
    background: rgba(143, 164, 214, 0.2);
}

body.dark-mode .screen.iosm .macaron-bg-purple {
    background: rgba(185, 145, 196, 0.2);
}

body.dark-mode .screen.iosm .macaron-bg-pink {
    background: rgba(232, 122, 133, 0.2);
}

body.dark-mode .screen.iosm .macaron-bg-orange {
    background: rgba(230, 182, 149, 0.2);
}

.screen.iosm .macaron-item-text {
    flex: 1;
}

.screen.iosm .macaron-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--lg-text-primary);
}

.screen.iosm .macaron-item-desc {
    font-size: 12px;
    color: var(--lg-text-secondary);
    margin-top: 2px;
}

.screen.iosm .macaron-item-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.screen.iosm .macaron-badge-on {
    background: rgba(129, 199, 132, 0.2);
    color: #4CAF50;
}

.screen.iosm .macaron-badge-count {
    background: rgba(120, 120, 128, 0.12);
    color: var(--lg-text-secondary);
}

/* Stats Card (涌现记忆) */
.screen.iosm .macaron-stats-card {
    background: linear-gradient(135deg, var(--macaron-purple) 0%, var(--macaron-blue) 100%);
    border-radius: var(--lg-radius-lg);
    padding: 20px;
    margin: 0 16px 12px;
    color: var(--lg-text-primary);
    box-shadow: var(--lg-shadow-combined);
    border: 1px solid var(--lg-glass-border);
}

.screen.iosm .macaron-stats-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.screen.iosm .macaron-stats-header-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9B6FA8;
}

.screen.iosm .macaron-stats-header-icon svg {
    width: 16px;
    height: 16px;
}

.screen.iosm .macaron-stats-header-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--lg-text-primary);
}

.screen.iosm .macaron-stats-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.screen.iosm .macaron-stats-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--lg-text-primary);
}

.screen.iosm .macaron-stats-label {
    font-size: 11px;
    color: var(--lg-text-secondary);
    margin-top: 2px;
}

/* Character List */
.screen.iosm .macaron-char-list {
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    border-radius: var(--lg-radius-md);
    border: 1px solid var(--lg-glass-border);
    overflow: hidden;
    margin: 0 16px 12px;
    max-height: 240px;
    overflow-y: auto;
}

.screen.iosm .macaron-char-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--lg-separator);
}

.screen.iosm .macaron-char-item:last-child {
    border-bottom: none;
}

.screen.iosm .macaron-char-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(120, 120, 128, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    overflow: hidden;
}

.screen.iosm .macaron-char-avatar svg {
    width: 18px;
    height: 18px;
    color: var(--lg-text-secondary);
}

.screen.iosm .macaron-char-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screen.iosm .macaron-char-info {
    flex: 1;
}

.screen.iosm .macaron-char-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--lg-text-primary);
}

.screen.iosm .macaron-char-count {
    font-size: 11px;
    color: var(--lg-text-secondary);
}

.screen.iosm .macaron-char-action {
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 154, 162, 0.15);
    color: #C85A6A;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.screen.iosm .macaron-char-action:hover {
    background: rgba(255, 154, 162, 0.25);
}

/* Action Buttons Row */
.screen.iosm .macaron-action-row {
    display: flex;
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 12px;
}

.screen.iosm .macaron-action-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--lg-radius-md);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.screen.iosm .macaron-action-btn:active {
    transform: scale(0.96);
}

.screen.iosm .macaron-btn-secondary {
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    color: var(--lg-text-primary);
    border: 1px solid var(--lg-glass-border);
}

.screen.iosm .macaron-btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
}

/* Tip Box */
.screen.iosm .macaron-tip-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(199, 206, 234, 0.2);
    border-radius: var(--lg-radius-sm);
    margin: 0 16px 16px;
}

.screen.iosm .macaron-tip-box svg {
    width: 16px;
    height: 16px;
    color: #5A7AB8;
    flex-shrink: 0;
    margin-top: 1px;
}

.screen.iosm .macaron-tip-box span {
    font-size: 12px;
    color: var(--lg-text-secondary);
    line-height: 1.5;
}

body.dark-mode .screen.iosm .macaron-tip-box {
    background: rgba(143, 164, 214, 0.15);
}

/* Warning Card */
.screen.iosm .macaron-warning-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 183, 77, 0.15);
    border-radius: var(--lg-radius-sm);
    border-left: 3px solid #FFB74D;
    margin: 0 16px 16px;
}

.screen.iosm .macaron-warning-card svg {
    width: 16px;
    height: 16px;
    color: #FFB74D;
    flex-shrink: 0;
    margin-top: 1px;
}

.screen.iosm .macaron-warning-card span {
    font-size: 12px;
    color: var(--lg-text-primary);
    line-height: 1.5;
}

/* Section Title */
.screen.iosm .macaron-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--lg-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 20px 12px;
}

/* Bottom Sheet */
.screen.iosm .macaron-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 900;
}

.screen.iosm .macaron-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.screen.iosm .macaron-sheet-card {
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    margin: 0 auto;
    background: var(--lg-glass);
    backdrop-filter: var(--lg-frost);
    -webkit-backdrop-filter: var(--lg-frost);
    padding: 32px 24px 24px;
    border-radius: var(--lg-radius-lg);
    box-shadow: 0 15px 35px -5px rgba(149, 157, 165, 0.18);
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1000;
    text-align: center;
    border: 1px solid var(--lg-glass-border);
    color: initial;
}

/* 弹窗内按钮文字颜色强制覆盖 */
.screen.iosm .macaron-sheet-card .macaron-sheet-btn-primary {
    color: #ffffff !important;
}

body.dark-mode .screen.iosm .macaron-sheet-card .macaron-sheet-btn-primary,
body.night .screen.iosm .macaron-sheet-card .macaron-sheet-btn-primary {
    color: #1d1d1f !important;
}

body.dark-mode .screen.iosm .macaron-sheet-card {
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.4);
}

.screen.iosm .macaron-sheet-overlay.active .macaron-sheet-card {
    transform: translateY(0);
}

.screen.iosm .macaron-sheet-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--lg-shadow-ambient);
}

.screen.iosm .macaron-sheet-icon svg {
    width: 28px;
    height: 28px;
}

.screen.iosm .macaron-sheet-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--lg-text-primary);
}

.screen.iosm .macaron-sheet-desc {
    font-size: 14px;
    color: var(--lg-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Macaron 弹窗按钮 - 全局样式确保文字可见 */
.macaron-sheet-btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--lg-radius-md, 14px);
    border: none;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: transform 0.1s;
    color: #1d1d1f !important;
}

.macaron-sheet-btn:active {
    transform: scale(0.96);
}

.macaron-sheet-btn + .macaron-sheet-btn {
    margin-top: 10px;
}

/* 日间模式按钮 - 使用高优先级选择器 */
.screen.iosm .macaron-sheet-btn-primary,
.macaron-sheet-btn-primary {
    background: #1d1d1f !important;
    color: #ffffff !important;
}

.screen.iosm .macaron-sheet-btn-secondary,
.macaron-sheet-btn-secondary {
    background: transparent !important;
    color: #86868b !important;
}

.screen.iosm .macaron-sheet-btn-danger,
.macaron-sheet-btn-danger {
    background: #FFE5E5 !important;
    color: #D63031 !important;
}

/* 暗黑模式适配 */
body.dark-mode .screen.iosm .macaron-sheet-btn-primary,
body.night .screen.iosm .macaron-sheet-btn-primary,
body.dark-mode .macaron-sheet-btn-primary,
body.night .macaron-sheet-btn-primary {
    background: #f5f5f7 !important;
    color: #1d1d1f !important;
}

body.dark-mode .screen.iosm .macaron-sheet-btn-secondary,
body.night .screen.iosm .macaron-sheet-btn-secondary,
body.dark-mode .macaron-sheet-btn-secondary,
body.night .macaron-sheet-btn-secondary {
    color: #98989d !important;
}

/* ========== 数据检查卡片样式 ========== */
.screen.iosm .data-check-card {
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.screen.iosm .data-check-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.screen.iosm .data-check-header .macaron-sheet-icon {
    margin: 0;
    flex-shrink: 0;
}

.screen.iosm .data-check-header-text {
    flex: 1;
    text-align: left;
}

.screen.iosm .data-check-header-text .macaron-sheet-title {
    margin: 0;
    text-align: left;
}

.screen.iosm .data-check-summary {
    font-size: 13px;
    color: var(--lg-text-tertiary);
    margin-top: 2px;
}

.screen.iosm .data-check-list {
    flex: 1;
    overflow-y: auto;
    margin: 0 -20px;
    padding: 0 20px;
    max-height: 40vh;
}

.screen.iosm .data-check-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .screen.iosm .data-check-item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.screen.iosm .data-check-item:last-child {
    border-bottom: none;
}

.screen.iosm .data-check-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 14px;
}

.screen.iosm .data-check-item-icon.size-small {
    background: #E8F5E9;
    color: #4CAF50;
}

.screen.iosm .data-check-item-icon.size-medium {
    background: #FFF8E1;
    color: #FF9800;
}

.screen.iosm .data-check-item-icon.size-large {
    background: #FFEBEE;
    color: #F44336;
}

body.dark-mode .screen.iosm .data-check-item-icon.size-small {
    background: rgba(76, 175, 80, 0.15);
}

body.dark-mode .screen.iosm .data-check-item-icon.size-medium {
    background: rgba(255, 152, 0, 0.15);
}

body.dark-mode .screen.iosm .data-check-item-icon.size-large {
    background: rgba(244, 67, 54, 0.15);
}

.screen.iosm .data-check-item-info {
    flex: 1;
    min-width: 0;
}

.screen.iosm .data-check-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--lg-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.screen.iosm .data-check-item-count {
    font-size: 12px;
    color: var(--lg-text-tertiary);
    margin-top: 2px;
}

.screen.iosm .data-check-item-size {
    font-size: 13px;
    font-weight: 600;
    color: var(--lg-text-secondary);
    margin-left: 12px;
    white-space: nowrap;
}

.screen.iosm .data-check-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-mode .screen.iosm .data-check-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.screen.iosm .data-check-total {
    font-size: 13px;
    color: var(--lg-text-tertiary);
}

.screen.iosm .data-check-total-size {
    font-size: 18px;
    font-weight: 600;
    color: var(--lg-text-primary);
}

.screen.iosm .data-check-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
}

.screen.iosm .data-check-status.status-good {
    background: #E8F5E9;
    color: #2E7D32;
}

.screen.iosm .data-check-status.status-warning {
    background: #FFF8E1;
    color: #F57C00;
}

.screen.iosm .data-check-status.status-danger {
    background: #FFEBEE;
    color: #C62828;
}

body.dark-mode .screen.iosm .data-check-status.status-good {
    background: rgba(76, 175, 80, 0.15);
}

body.dark-mode .screen.iosm .data-check-status.status-warning {
    background: rgba(255, 152, 0, 0.15);
}

body.dark-mode .screen.iosm .data-check-status.status-danger {
    background: rgba(244, 67, 54, 0.15);
}

/* ==================== 图床设置弹窗样式 ==================== */

.screen.iosm .image-host-card {
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
}

.screen.iosm .image-host-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
    text-align: left;
}

.screen.iosm .image-host-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--lg-card-bg, #f8f9fa);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.screen.iosm .image-host-option:hover {
    background: var(--lg-card-hover, #f0f1f2);
}

.screen.iosm .image-host-option:has(input:checked) {
    border-color: var(--lg-primary, #007AFF);
    background: rgba(0, 122, 255, 0.05);
}

.screen.iosm .image-host-option input[type="radio"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--lg-primary, #007AFF);
}

.screen.iosm .image-host-option .option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.screen.iosm .image-host-option .option-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.screen.iosm .image-host-option .option-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--lg-text-primary);
}

.screen.iosm .image-host-option .option-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.screen.iosm .image-host-option .option-badge.default {
    background: #E3E3E3;
    color: #666;
}

.screen.iosm .image-host-option .option-badge.free {
    background: #E8F5E9;
    color: #2E7D32;
}

.screen.iosm .image-host-option .option-badge.pro {
    background: #E3F2FD;
    color: #1565C0;
}

.screen.iosm .image-host-option .option-desc {
    font-size: 12px;
    color: var(--lg-text-secondary, #666);
}

/* 配置面板 */
.screen.iosm .image-host-config {
    display: none;  /* 默认隐藏 */
    margin: 0 0 8px 30px;
    padding: 12px;
    background: var(--lg-card-bg, #f8f9fa);
    border-radius: 10px;
    border-left: 3px solid var(--lg-primary, #007AFF);
}

.screen.iosm .image-host-config.expanded {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen.iosm .image-host-config .config-field {
    margin-bottom: 12px;
}

.screen.iosm .image-host-config .config-field label {
    display: block;
    font-size: 12px;
    color: var(--lg-text-secondary, #666);
    margin-bottom: 4px;
}

.screen.iosm .image-host-config .config-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--lg-border, #ddd);
    border-radius: 8px;
    font-size: 14px;
    background: var(--lg-input-bg, #fff);
    color: var(--lg-text-primary);
    box-sizing: border-box;
}

.screen.iosm .image-host-config .config-field input:focus {
    outline: none;
    border-color: var(--lg-primary, #007AFF);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.screen.iosm .image-host-config .config-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.screen.iosm .image-host-config .config-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.screen.iosm .image-host-config .config-btn svg {
    width: 14px;
    height: 14px;
}

.screen.iosm .image-host-config .config-btn.register {
    background: var(--lg-card-hover, #f0f1f2);
    color: var(--lg-text-primary);
}

.screen.iosm .image-host-config .config-btn.register:hover {
    background: var(--lg-border, #ddd);
}

.screen.iosm .image-host-config .config-btn.test {
    background: var(--lg-primary, #007AFF);
    color: white;
}

.screen.iosm .image-host-config .config-btn.test:hover {
    background: #0056b3;
}

.screen.iosm .image-host-config .config-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    display: none;
}

.screen.iosm .image-host-config .config-status.success {
    display: block;
    background: #E8F5E9;
    color: #2E7D32;
}

.screen.iosm .image-host-config .config-status.error {
    display: block;
    background: #FFEBEE;
    color: #C62828;
}

.screen.iosm .image-host-config .config-status.loading {
    display: block;
    background: #E3F2FD;
    color: #1565C0;
}

/* 深色模式适配 */
body.dark-mode .screen.iosm .image-host-option {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .screen.iosm .image-host-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .screen.iosm .image-host-option:has(input:checked) {
    background: rgba(0, 122, 255, 0.15);
}

body.dark-mode .screen.iosm .image-host-option .option-badge.default {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

body.dark-mode .screen.iosm .image-host-option .option-badge.free {
    background: rgba(76, 175, 80, 0.2);
}

body.dark-mode .screen.iosm .image-host-option .option-badge.pro {
    background: rgba(33, 150, 243, 0.2);
}

body.dark-mode .screen.iosm .image-host-config {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .screen.iosm .image-host-config .config-field input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .screen.iosm .image-host-config .config-btn.register {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .screen.iosm .image-host-config .config-status.success {
    background: rgba(76, 175, 80, 0.15);
}

body.dark-mode .screen.iosm .image-host-config .config-status.error {
    background: rgba(244, 67, 54, 0.15);
}

body.dark-mode .screen.iosm .image-host-config .config-status.loading {
    background: rgba(33, 150, 243, 0.15);
}
