/* ============================================
   Krypton Vault — 密码管理器
   Liquid Glass Design System (液态玻璃 · 紫粉主题)
   ============================================ */

:root {
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-bg-hover: rgba(255, 255, 255, 0.10);
    --glass-border: rgba(255, 255, 255, 0.20);
    --glass-border-hover: rgba(255, 255, 255, 0.35);
    --glass-blur: blur(40px) saturate(200%) brightness(1.1);
    --glass-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    --glass-inner-glow: inset 0 1px 1px rgba(255, 255, 255, 0.20);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.45);
    --accent: #d946ef;
    --accent-hover: #e879f9;
    --accent-glow: rgba(217, 70, 239, 0.5);
    --danger: #ff4d6a;
    --success: #4ade80;
    --warning: #fbbf24;
    --bg1: #120812;
    --bg2: #2a0a2e;
    --bg3: #1c0a24;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    background: linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg3) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* ============ 动态背景 ============ */
.bg-animated {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    animation: blobFloat 25s infinite ease-in-out;
}

.bg-blob-1 {
    width: 700px;
    height: 700px;
    background: linear-gradient(135deg, #d946ef, #f472b6);
    top: -250px;
    left: -150px;
    animation-delay: 0s;
}

.bg-blob-2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #ff6b9d, #ec4899);
    bottom: -200px;
    right: -150px;
    animation-delay: -8s;
}

.bg-blob-3 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #e879f9, #ec4899);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -16s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(80px, -50px) scale(1.15); }
    50% { transform: translate(-40px, 60px) scale(0.92); }
    75% { transform: translate(-60px, -40px) scale(1.08); }
}

/* ============ 液态玻璃卡片基础 ============ */
.glass-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(255, 255, 255, 0.07) 100%
    );
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius);
    position: relative;
    z-index: 1;
    overflow: hidden;

    /* 渐变折射边框 — 模拟玻璃边缘光线折射 */
    border: 1px solid transparent;
    background-clip: padding-box;
    
    /* 玻璃厚度阴影 + 内部高光 */
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.25),
        0 2px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);

    transition: 
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

/* 液态玻璃边框 — 用伪元素绘制渐变边框 */
.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.10) 30%,
        rgba(240, 170, 225, 0.15) 50%,
        rgba(255, 255, 255, 0.08) 70%,
        rgba(255, 255, 255, 0.28) 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* 顶部高光条 — 模拟光源照射在玻璃表面的反射 */
.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

.glass-card:hover {
    box-shadow:
        0 12px 50px rgba(0, 0, 0, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* ============ 屏幕切换 ============ */
.screen {
    display: none;
    position: relative;
    z-index: 2;
}

.screen.active {
    display: flex;
}

#lockScreen {
    min-height: 100vh;
    flex-direction: row;
    padding: 0;
}

#mainScreen {
    flex-direction: column;
    min-height: 100vh;
}

/* ============ 锁定界面 — 左右分栏 ============ */
.lock-left {
    flex: 0 0 48%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: linear-gradient(160deg, 
        rgba(76, 29, 149, 0.95) 0%, 
        rgba(91, 33, 182, 0.9) 30%,
        rgba(67, 20, 120, 0.95) 100%
    );
}

.lock-left-brand {
    position: absolute;
    top: 32px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.brand-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
}

.lock-left-footer {
    position: absolute;
    bottom: 32px;
    left: 40px;
    display: flex;
    gap: 24px;
    z-index: 10;
}

.lock-left-footer a {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
    text-decoration: none;
    transition: color 0.3s;
}

.lock-left-footer a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.lock-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    border-left: 1px solid rgba(255,255,255,0.06);
    min-height: 100vh;
}

/* ============ 小玩偶场景 ============ */
.mascot-scene {
    text-align: center;
    z-index: 5;
}

.mascot-stage {
    position: relative;
    width: 280px;
    height: 250px;
    margin: 0 auto;
}

.mascot-char {
    position: absolute;
    bottom: 0;
    transition: all 0.5s ease-in-out;
    transform-origin: bottom center;
}

.char-eyes {
    position: absolute;
    display: flex;
    transition: all 0.5s ease-in-out;
}

.char-eyes-dark {
    /* 深色角色的眼睛直接用黑色圆点 */
}

.eye-ball {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: height 0.1s ease;
}

.eye-ball-sm {
    width: 15px;
    height: 15px;
}

.pupil {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #2D2D2D;
    transition: transform 0.1s ease-out;
}

.pupil-dark {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: #2D2D2D;
    transition: transform 0.1s ease-out;
}

.char-mouth {
    position: absolute;
    background-color: #2D2D2D;
    border-radius: 4px;
    transition: all 0.4s ease;
}

.mascot-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.4s;
    letter-spacing: 0.5px;
}

.mascot-hint.peeking {
    color: #E8D754;
}

/* ============ 锁定界面 — 液态玻璃登录卡片 ============ */
.lock-card {
    width: 100%;
    max-width: 420px;
    padding: 44px 36px 36px;
    text-align: center;
    animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1);

    /* 更强烈的液态玻璃效果 */
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.06) 40%,
        rgba(230, 130, 220, 0.05) 100%
    );
    backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
    -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
    border-radius: 24px;
    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.3),
        0 8px 28px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.10),
        inset 0 2px 0 rgba(255, 255, 255, 0.18),
        inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.lock-card::before {
    /* 更强的渐变边框 */
    background: linear-gradient(
        140deg,
        rgba(255, 255, 255, 0.42) 0%,
        rgba(255, 255, 255, 0.08) 25%,
        rgba(240, 160, 220, 0.22) 50%,
        rgba(255, 180, 220, 0.10) 75%,
        rgba(255, 255, 255, 0.32) 100%
    );
}

.lock-card::after {
    /* 更亮的顶部高光 */
    height: 1.5px;
    left: 12%;
    right: 12%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.60) 30%,
        rgba(240, 180, 240, 0.50) 50%,
        rgba(255, 255, 255, 0.60) 70%,
        transparent 100%
    );
}

/* 品牌区域 */
.lock-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

.brand-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 12px var(--accent-glow));
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(35px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.app-title {
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #f5d0fe 40%, #e879f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    outline: none;
    caret-color: #fff;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.app-title:focus {
    -webkit-text-fill-color: #fff;
    background: none;
}

.welcome-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.lock-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.82rem;
}

.remember-label {
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.remember-label input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent);
    cursor: pointer;
}

.forgot-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--accent-hover);
}

.lock-footer {
    margin-top: 18px;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.45;
    letter-spacing: 0.5px;
}

.setup-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

/* ============ 用户列表（多用户选择） ============ */
.user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 4px;
}

.user-chip {
    padding: 12px 22px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    position: relative;
    min-width: 90px;
    text-align: center;
}

.user-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.22),
        rgba(255, 255, 255, 0.06)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.user-chip:hover {
    transform: translateY(-3px);
    background: linear-gradient(
        135deg,
        rgba(217, 70, 239, 0.18) 0%,
        rgba(217, 70, 239, 0.06) 100%
    );
    border-color: rgba(217, 70, 239, 0.4);
    box-shadow:
        0 8px 28px rgba(217, 70, 239, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.user-chip:active {
    transform: translateY(-1px) scale(0.97);
}

.unlock-user-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
}

.unlock-user-label strong {
    color: var(--accent-hover);
    font-weight: 700;
}

/* ============ 输入框 — 液态玻璃 ============ */
.input-group {
    margin-bottom: 18px;
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.83rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.09) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    border: 1px solid transparent;
    background-clip: padding-box;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
    position: relative;

    /* 输入框内部高光 */
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    /* 输入框伪边框 */
    &::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1px;
        background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.18),
            rgba(255, 255, 255, 0.06)
        );
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
    }
}

/* 用 wrapper 方式给 input 加边框 */
.input-border-wrap {
    position: relative;
    border-radius: var(--radius-sm);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.09) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    padding: 1px;
}

.input-border-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.20) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.15) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.4s;
}

.input-border-wrap:focus-within::before {
    background: linear-gradient(
        135deg,
        rgba(217, 70, 239, 0.5) 0%,
        rgba(217, 70, 239, 0.2) 50%,
        rgba(220, 150, 240, 0.4) 100%
    );
}

.input-border-wrap input,
.input-border-wrap textarea,
.input-border-wrap select {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: block;
    width: 100%;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.09) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(217, 70, 239, 0.5);
    box-shadow:
        0 0 0 3px rgba(217, 70, 239, 0.15),
        0 0 20px rgba(217, 70, 239, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.13) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

select option {
    background: #2d0a2e;
    color: #fff;
}

textarea {
    resize: vertical;
    min-height: 64px;
}

/* 密码输入框容器 */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 84px;
}

.btn-toggle-pw,
.btn-gen-pw {
    position: absolute;
    right: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    border: 1px solid rgba(255, 255, 255, 0.10);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px 8px;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    z-index: 2;
    backdrop-filter: blur(10px);
}

.btn-toggle-pw {
    right: 48px;
}

.btn-gen-pw {
    right: 8px;
}

.btn-toggle-pw:hover,
.btn-gen-pw:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
    border-color: rgba(255, 255, 255, 0.20);
    transform: scale(1.05);
}

/* ============ 密码强度条 ============ */
.password-strength {
    height: 4px;
    border-radius: 4px;
    margin-top: 8px;
    transition: var(--transition);
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease, background 0.4s;
    width: 0%;
    box-shadow: 0 0 8px currentColor;
}

.password-strength.weak::after { width: 25%; background: var(--danger); }
.password-strength.fair::after { width: 50%; background: var(--warning); }
.password-strength.good::after { width: 75%; background: #60a5fa; }
.password-strength.strong::after { width: 100%; background: var(--success); }

/* ============ 按钮 — 液态玻璃风格 ============ */
button {
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

/* 主按钮 — 液态玻璃质感 */
.btn-primary {
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        #c026d3 60%,
        #a21caf 100%
    );
    color: #fff;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;

    box-shadow:
        0 6px 24px rgba(217, 70, 239, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    border-radius: 50%;
    z-index: 1;
}

/* 流动光泽动画 */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.18),
        transparent
    );
    transform: skewX(-20deg);
    transition: none;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow:
        0 12px 36px rgba(217, 70, 239, 0.5),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    background: linear-gradient(
        135deg,
        var(--accent-hover) 0%,
        var(--accent) 50%,
        #c026d3 100%
    );
}

.btn-primary:hover::after {
    animation: shimmer 0.8s ease forwards;
}

@keyframes shimmer {
    to { left: 150%; }
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.995);
    box-shadow:
        0 4px 16px rgba(217, 70, 239, 0.35),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary.btn-sm {
    width: auto;
    padding: 9px 20px;
    font-size: 0.85rem;
    border-radius: 10px;
}

/* 次要按钮 — 玻璃透明风格 */
.btn-secondary {
    padding: 13px 26px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.11) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    color: var(--text-primary);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.25),
        rgba(255, 255, 255, 0.08)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-secondary:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.17) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    transform: translateY(-2px);
}

.btn-outline {
    padding: 12px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: none;
}

.btn-outline::before {
    display: none;
}

.btn-outline:hover {
    border-color: rgba(217, 70, 239, 0.5);
    color: var(--accent-hover);
    background: rgba(217, 70, 239, 0.08);
    box-shadow: 0 0 20px rgba(217, 70, 239, 0.1);
    transform: translateY(-1px);
}

.btn-full { width: 100%; margin-bottom: 10px; }

/* 危险按钮 */
.btn-danger {
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(
        135deg,
        rgba(255, 77, 106, 0.15) 0%,
        rgba(255, 77, 106, 0.06) 100%
    );
    color: var(--danger);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;

    box-shadow:
        0 4px 16px rgba(255, 77, 106, 0.1),
        inset 0 1px 0 rgba(255, 77, 106, 0.1);
}

.btn-danger::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 77, 106, 0.3),
        rgba(255, 77, 106, 0.1)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-danger:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 77, 106, 0.25) 0%,
        rgba(255, 77, 106, 0.10) 100%
    );
    box-shadow: 0 6px 24px rgba(255, 77, 106, 0.2);
    transform: translateY(-2px);
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 14px;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn-link::before { display: none; }
.btn-link:hover { color: var(--danger); text-decoration: underline; text-underline-offset: 3px; }

/* 图标按钮 — 液态玻璃 */
.btn-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.btn-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.22),
        rgba(255, 255, 255, 0.06)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-icon:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.17) 0%,
        rgba(255, 255, 255, 0.07) 100%
    );
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-close {
    width: 38px;
    height: 38px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-close::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.18),
        rgba(255, 255, 255, 0.04)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-close:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 77, 106, 0.2) 0%,
        rgba(255, 77, 106, 0.08) 100%
    );
    color: var(--danger);
    box-shadow: 0 4px 16px rgba(255, 77, 106, 0.15);
    transform: rotate(90deg) scale(1.05);
}

/* ============ 顶部导航 — 液态玻璃头部 ============ */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 10;

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(240, 180, 230, 0.04) 100%
    );
    backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);

    border-bottom: 1px solid transparent;

    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* Header 渐变边框用伪元素模拟 */
.glass-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        rgba(240, 170, 225, 0.12),
        rgba(255, 255, 255, 0.15),
        transparent
    );
}

.header-title {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #f5d0fe 50%, #e879f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.header-right {
    display: flex;
    gap: 10px;
}

/* ============ 搜索栏 — 液态玻璃 ============ */
.search-wrapper {
    padding: 16px 20px 0;
}

.search-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 18px;
    border-radius: var(--radius);

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(240, 170, 225, 0.03) 100%
    );
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);

    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.search-icon-svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0.7;
}

.search-card input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 0.95rem;
    box-shadow: none !important;
}

.search-card input:focus {
    box-shadow: none !important;
    outline: none;
}

.search-card .btn-primary {
    width: auto;
    flex-shrink: 0;
}

/* ============ 分类栏 — 液态玻璃芯片 ============ */
.category-bar {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    scrollbar-width: none;
    align-items: center;
}

.category-bar::-webkit-scrollbar { display: none; }

.cat-chip {
    padding: 8px 20px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    border: 1px solid transparent;
    border-radius: 24px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    transition: all var(--transition);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cat-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.16),
        rgba(255, 255, 255, 0.04)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.cat-chip:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.cat-chip.active {
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        #c026d3 100%
    );
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow:
        0 4px 20px var(--accent-glow),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.cat-chip.active::before {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3),
        rgba(255, 255, 255, 0.1)
    );
}

.cat-chip.active:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 28px var(--accent-glow),
        0 2px 12px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* 自定义分类删除按钮 */
.cat-chip-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    padding: 0;
    margin-left: 2px;
    flex-shrink: 0;
}

.cat-chip:hover .cat-chip-delete {
    opacity: 1;
}

.cat-chip-delete:hover {
    background: rgba(255, 77, 106, 0.5);
    color: #fff;
}

.cat-chip.active .cat-chip-delete {
    background: rgba(255, 255, 255, 0.25);
}

.cat-chip.active .cat-chip-delete:hover {
    background: rgba(255, 77, 106, 0.6);
}

/* 添加分类按钮 */
.cat-add-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-secondary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition);
    position: relative;
    padding: 0;
    flex-shrink: 0;
}

.cat-add-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.16),
        rgba(255, 255, 255, 0.04)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.cat-add-btn:hover {
    background: linear-gradient(
        135deg,
        rgba(217, 70, 239, 0.2) 0%,
        rgba(217, 70, 239, 0.08) 100%
    );
    border-color: rgba(217, 70, 239, 0.4);
    color: var(--accent-hover);
    transform: scale(1.1);
    box-shadow:
        0 4px 16px rgba(217, 70, 239, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* 分类添加弹窗 */
.cat-add-popup {
    display: none;
    position: fixed;
    background: linear-gradient(
        145deg,
        rgba(30, 10, 40, 0.97) 0%,
        rgba(20, 8, 30, 0.97) 100%
    );
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(217, 70, 239, 0.3);
    border-radius: 14px;
    padding: 14px;
    z-index: 200;
    min-width: 200px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: popupIn 0.2s ease;
}

.cat-add-popup.active {
    display: block;
}

@keyframes popupIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.cat-add-popup input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.cat-add-popup input:focus {
    border-color: rgba(217, 70, 239, 0.5);
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1);
}

.cat-add-popup-actions {
    display: flex;
    gap: 8px;
}

.cat-add-popup .btn-primary {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
    flex: 1;
}

.cat-add-popup .btn-outline {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
    flex: 1;
}

/* ============ 密码列表 ============ */
.vault-container {
    flex: 1;
    padding: 0 20px 100px;
    overflow-y: auto;
}

.entry-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 密码条目卡片 — 液态玻璃 */
.entry-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.09) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(240, 180, 230, 0.03) 100%
    );
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 18px 22px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
    animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;

    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.12),
        0 1px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.entry-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.06) 30%,
        rgba(240, 170, 225, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 70%,
        rgba(255, 255, 255, 0.18) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* 卡片顶部微高光 */
.entry-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
    transition: all var(--transition);
    z-index: 3;
}

/* 分类颜色侧边条 */
.entry-card::after { pointer-events: none; }
.entry-card[data-category="social"]::after { background: linear-gradient(180deg, #f472b6, #ec4899); box-shadow: 0 0 10px rgba(244,114,182,0.4); }
.entry-card[data-category="email"]::after { background: linear-gradient(180deg, #e879f9, #d946ef); box-shadow: 0 0 10px rgba(232,121,249,0.4); }
.entry-card[data-category="finance"]::after { background: linear-gradient(180deg, #4ade80, #22c55e); box-shadow: 0 0 10px rgba(74,222,128,0.4); }
.entry-card[data-category="work"]::after { background: linear-gradient(180deg, #fbbf24, #f59e0b); box-shadow: 0 0 10px rgba(251,191,36,0.4); }
.entry-card[data-category="other"]::after { background: linear-gradient(180deg, #c084fc, #a855f7); box-shadow: 0 0 10px rgba(192,132,252,0.4); }

.entry-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.18),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04);

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.13) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(240, 180, 230, 0.05) 100%
    );
}

.entry-card:hover::before {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.34) 0%,
        rgba(255, 255, 255, 0.1) 30%,
        rgba(240, 180, 230, 0.18) 50%,
        rgba(255, 255, 255, 0.08) 70%,
        rgba(255, 255, 255, 0.28) 100%
    );
}

.entry-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 8px rgba(0,0,0,0.1);
}

.entry-info {
    flex: 1;
    min-width: 0;
}

.entry-name {
    font-weight: 650;
    font-size: 0.96rem;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entry-username {
    font-size: 0.81rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entry-actions {
    display: flex;
    gap: 5px;
    opacity: 1;
    position: relative;
    z-index: 5;
}

.entry-action-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.07) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255,255,255,0.1);
}

.entry-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.entry-action-btn:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.07));
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.entry-action-btn.delete:hover {
    background: linear-gradient(135deg, rgba(255, 77, 106, 0.2), rgba(255, 77, 106, 0.08));
    box-shadow: 0 4px 12px rgba(255, 77, 106, 0.15);
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-muted);
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 18px;
    opacity: 0.45;
    filter: blur(0.5px);
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 5px;
}

.empty-hint {
    font-size: 0.85rem !important;
    opacity: 0.55;
}

/* ============ 弹窗 — 液态玻璃 ============ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
}

.modal-card {
    width: 100%;
    max-width: 490px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1;
    border-radius: 24px;

    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.05) 40%,
        rgba(240, 180, 230, 0.05) 100%
    );
    backdrop-filter: blur(50px) saturate(210%) brightness(1.12);
    -webkit-backdrop-filter: blur(50px) saturate(210%) brightness(1.12);

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.4),
        0 10px 36px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.modal-card::before {
    background: linear-gradient(
        150deg,
        rgba(255, 255, 255, 0.38) 0%,
        rgba(255, 255, 255, 0.08) 25%,
        rgba(240, 180, 230, 0.18) 50%,
        rgba(255, 200, 230, 0.08) 75%,
        rgba(255, 255, 255, 0.30) 100%
    );
}

.modal-card::after {
    left: 12%;
    right: 12%;
    height: 1.5px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        rgba(240, 180, 240, 0.4),
        rgba(255, 255, 255, 0.5),
        transparent
    );
}

.modal-sm {
    max-width: 420px;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.93) translateY(25px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 26px 0;
    position: relative;
}

.modal-header h3 {
    font-size: 1.18rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #f5d0fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-body {
    padding: 22px 26px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 26px 26px;
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
    flex: 1;
}

/* ============ 密码生成器显示区 ============ */
.generated-pw-display {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 18px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    letter-spacing: 2.5px;
    color: var(--success);
    word-break: break-all;
    margin-bottom: 22px;
    user-select: all;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.gen-options {
    margin-bottom: 18px;
}

.gen-option {
    margin-bottom: 14px;
}

.gen-option label {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.gen-option input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    height: 4px;
}

.gen-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: background var(--transition);
}

.check-label:hover {
    background: rgba(255, 255, 255, 0.08);
}

.check-label input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

/* ============ 设置页 ============ */
.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.settings-actions::before {
    content: '';
    position: absolute;
    left: 26px;
    right: 26px;
    margin-top: -13px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* ============ 删除确认弹窗 ============ */
.confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}

.confirm-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.confirm-dialog {
    width: 90%;
    max-width: 380px;
    padding: 32px 28px 24px;
    text-align: center;
    border-radius: 20px;
    animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.confirm-icon {
    font-size: 2.4rem;
    margin-bottom: 14px;
}

.confirm-msg {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.confirm-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-actions .btn-secondary,
.confirm-actions .btn-danger {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
}

/* ============ Toast — 液态玻璃 ============ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(
        135deg,
        rgba(25, 25, 45, 0.92) 0%,
        rgba(20, 20, 38, 0.90) 100%
    );
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 14px 28px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 200;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;

    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toast::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    border-color: transparent;
    color: var(--danger);
}
.toast.error::before {
    background: linear-gradient(135deg, rgba(255,77,106,0.3), rgba(255,77,106,0.1));
}

.toast.success {
    border-color: transparent;
    color: var(--success);
}
.toast.success::before {
    background: linear-gradient(135deg, rgba(74,222,128,0.3), rgba(74,222,128,0.1));
}

/* ============ 错误提示 ============ */
.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 10px;
    min-height: 20px;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(255, 77, 106, 0.2);
}

/* ============ 隐藏元素 ============ */
.hidden { display: none !important; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    #lockScreen {
        flex-direction: column;
    }
    .lock-left {
        flex: none;
        min-height: 220px;
        padding: 50px 20px 20px;
    }
    .lock-left-brand {
        top: 16px;
        left: 20px;
    }
    .brand-icon-box {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    .brand-name {
        font-size: 0.85rem;
    }
    .lock-left-footer {
        display: none;
    }
    .mascot-stage {
        width: 200px;
        height: 170px;
    }
    .mascot-hint {
        font-size: 0.75rem;
        margin-top: 8px;
    }
    .lock-right {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.06);
        padding: 28px 20px;
        min-height: auto;
    }
}

@media (max-width: 600px) {
    .lock-card {
        padding: 32px 22px 28px;
        border-radius: 22px;
    }
    .app-title { font-size: 1.5rem; }
    .brand-icon { font-size: 1.3rem; }
    .welcome-text { font-size: 1.1rem; }
    .modal-card {
        max-width: 100%;
        border-radius: 22px 22px 0 0;
        animation: modalSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }
    @keyframes modalSlideUp {
        from { opacity: 0; transform: translateY(40px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .modal { align-items: flex-end; padding: 0; }
    .header-title { font-size: 1.1rem; }
    .entry-actions { opacity: 1; }
    .bg-blob-1 { width: 320px; height: 320px; }
    .bg-blob-2 { width: 280px; height: 280px; }
    .bg-blob-3 { width: 220px; height: 220px; }
}

/* ============ 滚动条 — 液态玻璃风格 ============ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0.08)
    );
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.25),
        rgba(255, 255, 255, 0.12)
    );
}
