/* 前台样式 - 仿91sotu风格 */

:root {
    /* 亮色主题 */
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --border-color: #ebeef5;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --hover-shadow: 0 4px 16px rgba(0,0,0,0.1);
    --header-bg: #ffffff;
}

[data-theme="dark"] {
    /* 暗色主题 */
    --bg-color: #141414;
    --card-bg: #1f1f1f;
    --text-color: #e8e8e8;
    --text-secondary: #b0b0b0;
    --text-light: #808080;
    --primary-color: #177ddc;
    --primary-hover: #3c9ae8;
    --border-color: #303030;
    --shadow: 0 2px 12px rgba(0,0,0,0.3);
    --hover-shadow: 0 4px 16px rgba(0,0,0,0.4);
    --header-bg: #1f1f1f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    /* iPhone 安全区域适配 */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
}

/* 头部导航 */
.header {
    background: var(--header-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    /* iPhone 安全区域 - 顶部额外内边距 */
    padding-top: env(safe-area-inset-top);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    height: 56px;
}

/* 为超大屏幕设置合理的最大宽度 */
@media (min-width: 1920px) {
    .header-inner {
        max-width: 1920px;
    }
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.logo-desc {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-color);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--border-color);
}

/* 工具按钮组 */
.tool-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
    padding-right: 12px;
    border-right: 1px solid var(--border-color);
}

.tool-btn {
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
}

.tool-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.tool-btn.active {
    background: var(--primary-color);
    color: #fff;
}

/* 待办徽章 */
.todo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #f5222d;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 4px;
}

.tool-btn:hover .todo-badge,
.tool-btn.active .todo-badge {
    background: #fff;
    color: #f5222d;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

/* 搜索区域 - 简洁风格 */
.search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 40px;
}

[data-theme="dark"] .search-section {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

/* 待办提醒横幅 - 胶囊标签式 */
.todo-reminder {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.todo-reminder-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.reminder-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.reminder-icon {
    font-size: 18px;
}

.reminder-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.reminder-text .urgent-text {
    color: #f5222d;
    font-weight: 600;
}

.reminder-text .overdue-text {
    color: #fa8c16;
    font-weight: 600;
}

.reminder-divider {
    width: 1px;
    height: 16px;
    background: #ddd;
    margin: 0 8px;
}

.reminder-link {
    color: #1890ff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}

.reminder-link:hover {
    background: #1890ff;
    color: #fff;
}

/* 三栏布局：左时间 中搜索 右天气 - 全宽自适应 */
.search-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

/* 为超大屏幕设置合理的最大宽度 */
@media (min-width: 1920px) {
    .search-layout {
        max-width: 1920px;
    }
}

/* 左侧时间日期 */
.datetime-display {
    text-align: center;
    flex: 0 0 200px;
}

.current-time {
    font-size: 48px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.current-date {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* 中间搜索 - 居中 */
.search-wrapper {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
}

.search-title {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-align: center;
}

/* 右侧天气 */
.weather-display {
    flex: 0 0 200px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.weather-icon {
    font-size: 42px;
    line-height: 1;
}

.weather-info {
    text-align: right;
}

.weather-temp {
    font-size: 32px;
    font-weight: 300;
    color: #fff;
    line-height: 1.1;
}

.weather-detail {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    margin-top: 2px;
}

.weather-extra {
    margin-left: 6px;
    color: rgba(255,255,255,0.7);
}

.weather-city {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

.search-box {
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 46px 12px 18px;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    background: rgba(255,255,255,0.95);
    color: #333;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    background: #fff;
}

.search-box input::placeholder {
    color: #aaa;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
}

/* 主内容区 - 全宽自适应布局 */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 30px 40px;
}

/* 为超大屏幕设置合理的最大宽度 */
@media (min-width: 1920px) {
    .container {
        max-width: 1920px;
    }
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 16px;
}

/* 未登录欢迎页 - 六边形令牌 + 丰富背景 */
.welcome-page {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    overflow: hidden;
    /* 渐变背景 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    /* 突破 container 限制，铺满整个屏幕 */
    margin-left: -40px;
    margin-right: -40px;
    padding-left: 40px;
    padding-right: 40px;
}

/* 超大屏幕下突破 1920px 限制 */
@media (min-width: 1920px) {
    .welcome-page {
        margin-left: calc((100vw - 1920px) / -2 - 40px);
        margin-right: calc((100vw - 1920px) / -2 - 40px);
    }
}

/* 暗色主题背景 */
[data-theme="dark"] .welcome-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* 背景装饰层 - 多个几何图形 */
.welcome-page::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -5%;
    width: 800px;
    height: 800px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphShape1 20s ease-in-out infinite;
}

.welcome-page::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 700px;
    height: 700px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    animation: morphShape2 15s ease-in-out infinite;
}

@keyframes morphShape1 {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(0deg) scale(1);
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
        transform: rotate(180deg) scale(1.1);
    }
}

@keyframes morphShape2 {
    0%, 100% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
        transform: rotate(0deg) scale(1);
    }
    50% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(-180deg) scale(1.15);
    }
}

/* 六边形令牌卡片 */
.welcome-content {
    text-align: center;
    /* 六边形形状 */
    width: 400px;
    height: 460px;
    position: relative;
    /* 毛玻璃效果 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    /* 使用 clip-path 创建六边形 */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    /* 多层阴影 */
    box-shadow: 
        0 0 60px rgba(255, 255, 255, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.15);
    /* 内容居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 50px;
    z-index: 10;
    /* 进入动画 */
    animation: hexagonFadeIn 1s ease-out;
    /* GPU 加速 */
    transform: translateZ(0);
}

/* 暗色主题令牌 */
[data-theme="dark"] .welcome-content {
    background: rgba(30, 30, 40, 0.95);
    box-shadow: 
        0 0 60px rgba(102, 126, 234, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.4);
}

@keyframes hexagonFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) translateZ(0);
    }
}


.welcome-icon {
    margin-bottom: 20px;
}

.lock-icon {
    font-size: 52px;
    display: inline-block;
    /* 增强呼吸动画 + 发光效果 */
    animation: breatheGlow 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 16px rgba(102, 126, 234, 0.4));
}

@keyframes breatheGlow {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1;
        filter: drop-shadow(0 4px 16px rgba(102, 126, 234, 0.4));
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.9;
        filter: drop-shadow(0 6px 24px rgba(102, 126, 234, 0.6));
    }
}

.welcome-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: none; /* 隐藏标题 */
}

/* 前台登录表单 */
.front-login-form {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.login-input-group {
    margin-bottom: 14px;
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 0 14px;
    transition: all 0.3s;
}

[data-theme="dark"] .login-input-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
}

.login-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

[data-theme="dark"] .login-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.login-input-wrapper .input-icon {
    font-size: 16px;
    margin-right: 10px;
    opacity: 0.6;
}

.login-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-color);
    outline: none;
}

.login-input-wrapper input::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.login-error-msg {
    margin-top: 12px;
    font-size: 13px;
    color: #f5222d;
    text-align: center;
}

.welcome-quote {
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 18px;
    line-height: 1.8;
    display: none; /* 隐藏不用的文字 */
}

.welcome-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #667eea);
    margin: 0 auto 18px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    animation: dividerPulse 3s ease-in-out infinite;
    display: none; /* 隐藏不用的分割线 */
}

@keyframes dividerPulse {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }
    50% { 
        opacity: 0.8;
        box-shadow: 0 2px 12px rgba(102, 126, 234, 0.6);
    }
}

.welcome-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    display: none; /* 隐藏不用的文字 */
}

.welcome-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 36px;
    margin-top: 6px;
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(24, 144, 255, 0.3),
        0 2px 8px rgba(24, 144, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* 按钮涟漪效果 */
.welcome-login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.welcome-login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.welcome-login-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(24, 144, 255, 0.4),
        0 4px 12px rgba(24, 144, 255, 0.3);
}

.welcome-login-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.welcome-login-btn .btn-arrow {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.welcome-login-btn:hover .btn-arrow {
    transform: translateX(6px);
}

/* 装饰性浮动光球 - 填充带鱼屏空白 */
.welcome-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.floating-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(40px);
    will-change: transform;
}

.dot-1 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(102, 126, 234, 0.5));
    top: 10%;
    left: 5%;
    animation: floatOrb1 15s ease-in-out infinite;
}

.dot-2 {
    width: 320px;
    height: 320px;
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.8), rgba(118, 75, 162, 0.5));
    top: 50%;
    right: 8%;
    animation: floatOrb2 12s ease-in-out infinite;
}

.dot-3 {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.7), rgba(24, 144, 255, 0.4));
    bottom: 15%;
    left: 12%;
    animation: floatOrb3 18s ease-in-out infinite;
}

/* 为带鱼屏添加更多装饰光球 */
@media (min-width: 1920px) {
    .floating-dot.dot-4 {
        display: block;
        width: 300px;
        height: 300px;
        background: linear-gradient(135deg, rgba(255, 107, 107, 0.7), rgba(255, 107, 107, 0.4));
        top: 25%;
        left: 15%;
        animation: floatOrb4 14s ease-in-out infinite;
    }
    
    .floating-dot.dot-5 {
        display: block;
        width: 260px;
        height: 260px;
        background: linear-gradient(135deg, rgba(78, 205, 196, 0.7), rgba(78, 205, 196, 0.4));
        bottom: 25%;
        right: 12%;
        animation: floatOrb5 16s ease-in-out infinite;
    }
    
    .floating-dot.dot-6 {
        display: block;
        width: 240px;
        height: 240px;
        background: linear-gradient(135deg, rgba(255, 195, 113, 0.7), rgba(255, 195, 113, 0.4));
        top: 60%;
        left: 8%;
        animation: floatOrb6 13s ease-in-out infinite;
    }
}

@keyframes floatOrb1 {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    33% { 
        transform: translate(60px, -50px) scale(1.2);
        opacity: 0.6;
    }
    66% { 
        transform: translate(-40px, 60px) scale(0.9);
        opacity: 0.4;
    }
}

@keyframes floatOrb2 {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    33% { 
        transform: translate(-70px, 40px) scale(1.15);
        opacity: 0.6;
    }
    66% { 
        transform: translate(50px, -60px) scale(0.95);
        opacity: 0.4;
    }
}

@keyframes floatOrb3 {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    33% { 
        transform: translate(50px, 70px) scale(1.25);
        opacity: 0.6;
    }
    66% { 
        transform: translate(-60px, -40px) scale(0.85);
        opacity: 0.4;
    }
}

@keyframes floatOrb4 {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.5;
    }
    50% { 
        transform: translate(40px, 50px) scale(1.1) rotate(180deg);
        opacity: 0.55;
    }
}

@keyframes floatOrb5 {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-50px, -40px) scale(1.15) rotate(-180deg);
        opacity: 0.55;
    }
}

@keyframes floatOrb6 {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.5;
    }
    50% { 
        transform: translate(60px, -30px) scale(1.2) rotate(180deg);
        opacity: 0.55;
    }
}

.floating-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.25;
    filter: blur(60px);
    will-change: transform;
}

.dot-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(102, 126, 234, 0.3));
    top: 15%;
    left: 8%;
    animation: floatOrb1 15s ease-in-out infinite;
}

.dot-2 {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.6), rgba(118, 75, 162, 0.3));
    top: 55%;
    right: 10%;
    animation: floatOrb2 12s ease-in-out infinite;
}

.dot-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.5), rgba(24, 144, 255, 0.2));
    bottom: 20%;
    left: 15%;
    animation: floatOrb3 18s ease-in-out infinite;
}

@keyframes floatOrb1 {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.25;
    }
    33% { 
        transform: translate(50px, -40px) scale(1.15);
        opacity: 0.3;
    }
    66% { 
        transform: translate(-30px, 50px) scale(0.9);
        opacity: 0.2;
    }
}

@keyframes floatOrb2 {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.25;
    }
    33% { 
        transform: translate(-60px, 30px) scale(1.1);
        opacity: 0.3;
    }
    66% { 
        transform: translate(40px, -50px) scale(0.95);
        opacity: 0.2;
    }
}

@keyframes floatOrb3 {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.25;
    }
    33% { 
        transform: translate(40px, 60px) scale(1.2);
        opacity: 0.3;
    }
    66% { 
        transform: translate(-50px, -30px) scale(0.85);
        opacity: 0.2;
    }
}

/* 带鱼屏专属 - 添加实体几何装饰 */
@media (min-width: 1920px) {
    .welcome-page::before {
        box-shadow: 0 0 100px rgba(255, 255, 255, 0.15);
    }
    
    .welcome-page::after {
        box-shadow: 0 0 80px rgba(255, 255, 255, 0.1);
    }
    
    /* 左侧装饰图形 */
    .welcome-decoration::before {
        content: '';
        position: absolute;
        left: 10%;
        top: 30%;
        width: 150px;
        height: 150px;
        border: 3px solid rgba(255, 255, 255, 0.2);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        animation: rotateShape1 20s linear infinite;
    }
    
    /* 右侧装饰图形 */
    .welcome-decoration::after {
        content: '';
        position: absolute;
        right: 12%;
        bottom: 25%;
        width: 120px;
        height: 120px;
        border: 3px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        animation: rotateShape2 15s linear infinite reverse;
    }
}

@keyframes rotateShape1 {
    0% { 
        transform: rotate(0deg);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    100% { 
        transform: rotate(360deg);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

@keyframes rotateShape2 {
    0% { 
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% { 
        transform: rotate(360deg) scale(1);
    }
}

/* 减少动画效果（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    .floating-dot,
    .lock-icon,
    .welcome-divider {
        animation: none;
    }
    .welcome-content {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* 保留旧样式兼容 */
.login-prompt {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    max-width: 400px;
    margin: 60px auto;
}

.login-prompt-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.login-prompt h3 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 12px;
}

.login-prompt p {
    color: var(--text-light);
    margin-bottom: 24px;
}

.login-prompt .btn-primary {
    padding: 12px 32px;
    font-size: 16px;
}

/* 分类区块 */
.category-section {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

/* 分类标题链接 */
.category-title-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.category-title-link:hover {
    opacity: 0.8;
}

.category-title-link:hover .category-title {
    color: var(--primary-color);
}

/* 查看全部链接 */
.view-all-link {
    margin-left: auto;
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.view-all-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.category-count {
    margin-left: 12px;
}

/* 搜索结果样式 */
.search-results-section {
    margin-bottom: 24px;
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.search-results-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.clear-search-btn {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-search-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.search-category {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.search-category-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.02);
}

[data-theme="dark"] .search-category-header {
    background: rgba(255,255,255,0.02);
}

.search-category-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.search-category-count {
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-light);
}

/* 搜索高亮 */
.link-title mark,
.link-desc mark {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

[data-theme="dark"] .link-title mark,
[data-theme="dark"] .link-desc mark {
    background: #5a4a00;
    color: #ffd700;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.category-icon {
    font-size: 20px;
}

.category-count {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-light);
}

/* 链接网格 - 响应式自适应列数 */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0;
}

/* 根据屏幕宽度优化列数 */
@media (min-width: 1400px) {
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (min-width: 1920px) {
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* 链接卡片 */
.link-card {
    position: relative;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    transition: background 0.2s;
}

.link-card:hover {
    background: var(--bg-color);
}

.link-card.hidden {
    display: none;
}

/* 拖拽排序样式 */
.link-card[draggable="true"] {
    cursor: grab;
}

.link-card[draggable="true"]:active {
    cursor: grabbing;
}

.link-card.dragging {
    opacity: 0;
    pointer-events: none;
}

/* 拖拽占位符 - 显示目标位置 */
.link-card.drag-placeholder {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(24, 144, 255, 0.05) 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    visibility: visible !important;
}

/* 拖拽时其他卡片的样式 */
.links-grid.is-dragging .link-card:not(.dragging):not(.drag-placeholder) {
    transition: transform 0.15s ease;
}

.link-main {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.link-favicon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.link-favicon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.link-favicon .default-icon {
    font-size: 18px;
}

.link-favicon .custom-icon {
    font-size: 22px;
    line-height: 1;
}

.link-info {
    flex: 1;
    min-width: 0;
}

.link-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-desc {
    font-size: 12px;
    color: var(--text-light);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.private-badge {
    font-size: 11px;
    margin-left: 4px;
}

/* 链接操作按钮 */
.link-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.link-card:hover .link-actions {
    opacity: 1;
}

.action-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.modal-sm {
    max-width: 380px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-color);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary-color);
    color: #fff;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* 表单内容区域可滚动 */
.modal-form-body {
    overflow-y: auto;
    flex: 1;
    padding: 10px 0;
    max-height: calc(85vh - 130px);
}

/* 表单样式 */
.form-group {
    margin: 0 20px 14px;
}

.form-group:first-of-type {
    margin-top: 10px;
}

.form-group:last-of-type {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 50px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
    flex-shrink: 0;
}

/* 备注内容 */
#noteContent {
    background: var(--bg-color);
    padding: 16px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 14px;
    line-height: 1.6;
    max-height: 250px;
    overflow-y: auto;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 24px 20px;
    color: var(--text-light);
    font-size: 13px;
    margin-top: 20px;
}

/* 响应式 */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 16px;
    }
    
    .search-section {
        padding: 24px 16px;
    }
    
    .search-layout {
        flex-direction: column;
        gap: 16px;
    }
    
    .datetime-display {
        flex: none;
        text-align: center;
    }
    
    .current-time {
        font-size: 36px;
    }
    
    .current-date {
        font-size: 12px;
    }
    
    .search-wrapper {
        width: 100%;
        max-width: 100%;
        order: 3;
    }
    
    .search-title {
        font-size: 13px;
    }
    
    .weather-display {
        flex: none;
        justify-content: center;
        order: 2;
    }
    
    .weather-icon {
        font-size: 32px;
    }
    
    .weather-temp {
        font-size: 24px;
    }
    
    .weather-info {
        text-align: left;
    }
    
    .container {
        padding: 16px;
    }
    
    /* 移动端六边形适配 */
    .welcome-page {
        min-height: 60vh;
        padding: 40px 16px;
        /* 移动端重置负边距，避免横向滚动 */
        margin-left: 0;
        margin-right: 0;
    }
    
    .welcome-content {
        width: 300px;
        height: 400px;
        padding: 45px 30px;
    }
    
    .welcome-icon {
        margin-bottom: 16px;
    }
    
    .welcome-title {
        font-size: 22px;
        margin-bottom: 24px;
    }
    
    .lock-icon {
        font-size: 44px;
    }
    
    .front-login-form {
        max-width: 100%;
    }
    
    .login-input-group {
        margin-bottom: 12px;
    }
    
    .login-input-wrapper {
        padding: 0 12px;
    }
    
    .login-input-wrapper input {
        padding: 11px 0;
        font-size: 13px;
    }
    
    .welcome-login-btn {
        padding: 11px 24px;
        font-size: 14px;
        margin-top: 4px;
    }
    
    /* 简化背景效果 */
    .floating-dot {
        display: none;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .link-card {
        border-right: none;
    }
    
    .link-actions {
        opacity: 1;
    }
}

@media (min-width: 1600px) {
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (min-width: 1920px) {
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}


/* Toast 提示动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}


/* 账号密码区域样式 */
.credentials-section {
    margin: 0 20px 16px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.credentials-section .section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.credentials-section .form-row {
    display: flex;
    gap: 10px;
}

.credentials-section .form-row .form-group {
    flex: 1;
    margin: 0;
    min-width: 0;
}

.credentials-section .form-group label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 带操作按钮的输入框 */
.input-with-action {
    display: flex;
    gap: 4px;
}

.input-with-action input {
    flex: 1;
    min-width: 0;
}

.copy-btn,
.toggle-pwd-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.copy-btn:hover,
.toggle-pwd-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 20px;
}

.strength-bar {
    flex: 1;
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.strength-text {
    font-size: 11px;
    min-width: 36px;
}

/* 密码强度等级颜色 */
.strength-weak .strength-fill { width: 25%; background: #e74c3c; }
.strength-weak .strength-text { color: #e74c3c; }

.strength-fair .strength-fill { width: 50%; background: #f39c12; }
.strength-fair .strength-text { color: #f39c12; }

.strength-good .strength-fill { width: 75%; background: #3498db; }
.strength-good .strength-text { color: #3498db; }

.strength-strong .strength-fill { width: 100%; background: #27ae60; }
.strength-strong .strength-text { color: #27ae60; }

/* 备注查看弹窗样式 */
.credential-item {
    margin-bottom: 16px;
}

.credential-item:last-child {
    margin-bottom: 0;
}

.credential-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.credential-value {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-color);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    word-break: break-all;
}

.credential-value span {
    flex: 1;
}

.password-hidden {
    letter-spacing: 2px;
}

.copy-btn-sm,
.toggle-btn-sm {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.copy-btn-sm:hover,
.toggle-btn-sm:hover {
    background: var(--primary-color);
}

#noteContent {
    margin: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .credentials-section .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}


/* ========== 最近访问区域 ========== */
.recent-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 40px 0;
}

.recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.recent-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.recent-icon {
    font-size: 18px;
}

.recent-toggle {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-light);
}

.recent-toggle:hover {
    background: var(--border-color);
    color: var(--text-color);
}

/* 显示最近访问的提示条 */
.recent-show-bar {
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 40px;
    text-align: center;
}

.recent-show-bar span {
    display: inline-block;
    padding: 8px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.recent-show-bar span:hover {
    color: var(--primary-color);
    box-shadow: var(--hover-shadow);
}

.recent-links {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.recent-links::-webkit-scrollbar {
    height: 6px;
}

.recent-links::-webkit-scrollbar-track {
    background: transparent;
}

.recent-links::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.recent-links::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.recent-link-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--card-bg);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    flex-shrink: 0;
    min-width: 140px;
    max-width: 200px;
}

.recent-link-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.recent-link-favicon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.recent-link-favicon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.recent-link-favicon .default-icon {
    font-size: 16px;
}

.recent-link-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.recent-link-card .private-badge {
    font-size: 10px;
    flex-shrink: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .recent-section {
        padding: 16px 16px 0;
    }
    
    .recent-link-card {
        min-width: 120px;
        padding: 8px 12px;
    }
    
    .recent-link-favicon {
        width: 28px;
        height: 28px;
    }
    
    .recent-link-title {
        font-size: 12px;
    }
}


/* ========== 链接预览卡片 ========== */
.link-preview {
    position: fixed;
    z-index: 1000;
    width: 340px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    pointer-events: none;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* 网站截图区域 */
.preview-screenshot {
    width: 100%;
    height: 180px;
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.preview-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.preview-screenshot .screenshot-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-light);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.preview-screenshot .screenshot-loading::before {
    content: '🖼️';
    font-size: 32px;
    opacity: 0.5;
}

.preview-screenshot .screenshot-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--border-color) 100%);
    color: var(--text-light);
    font-size: 13px;
}

.preview-screenshot .screenshot-error::before {
    content: '🌐';
    font-size: 40px;
    margin-bottom: 8px;
    opacity: 0.6;
}

/* 预览内容区域 */
.preview-content {
    padding: 14px 16px;
}

.link-preview.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.preview-favicon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.preview-favicon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    word-break: break-word;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-url {
    font-size: 11px;
    color: var(--primary-color);
    margin-bottom: 8px;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-light);
}

.preview-category {
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-clicks {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 移动端隐藏预览（触摸设备不需要悬停预览） */
@media (max-width: 768px) {
    .link-preview {
        display: none !important;
    }
}


/* ========== 前台编辑 - 自定义图标选择器 ========== */
.custom-icon-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.icon-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
}

.preview-icon,
#editPreviewIconDisplay {
    font-size: 32px;
    line-height: 1;
}

.preview-text {
    font-size: 11px;
    color: var(--text-secondary);
}

.icon-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-select,
.btn-icon-clear {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-color);
    transition: all 0.2s;
}

.btn-icon-select:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-icon-clear:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.emoji-picker {
    margin-top: 12px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.emoji-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.emoji-tab {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.emoji-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.emoji-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
}

.emoji-item {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.emoji-item:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .custom-icon-section {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ========== 前台密码生成器样式 ========== */
.generate-pwd-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.generate-pwd-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.password-generator-front {
    margin-top: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.generator-header-front {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 500;
}

.generator-header-front button {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.generator-header-front button:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.generator-body-front {
    padding: 12px;
}

.generator-option-front {
    margin-bottom: 10px;
}

.generator-option-front label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.generator-option-front input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
}

.generator-option-front input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.generator-option-front input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.generator-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.generator-checks label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px 8px;
    background: var(--bg-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.generator-checks label:hover {
    background: var(--border-color);
}

.generator-checks input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

.generator-preview-front {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.generator-preview-front input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Consolas', 'Monaco', monospace;
    background: var(--bg-color);
    color: var(--text-color);
}

.generator-preview-front button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.generator-preview-front button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.generator-actions-front {
    display: flex;
    justify-content: flex-end;
}

.generator-actions-front .btn {
    padding: 6px 14px;
    font-size: 12px;
}

/* 暗色主题适配 */
[data-theme="dark"] .password-generator-front {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}


/* 密码工具栏 */
.password-tools {
    margin-top: 6px;
}

.generate-link {
    font-size: 12px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.generate-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}


/* 密码历史记录 */
.password-history {
    margin: 10px 0;
    padding: 8px;
    background: var(--bg-color);
    border-radius: 6px;
    border: 1px dashed var(--border-color);
}

.history-title {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: var(--card-bg);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: var(--primary-color);
    color: #fff;
}

.history-pwd {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.history-use {
    font-size: 11px;
    color: var(--primary-color);
    margin-left: 8px;
}

.history-item:hover .history-use {
    color: #fff;
}


/* ========== 拖拽排序动画 ========== */

/* 分类区域拖拽高亮 */
.category-section {
    transition: box-shadow 0.2s ease;
    border-radius: 8px;
}

/* 移动端拖拽优化 */
@media (max-width: 768px) {
    .link-card.drag-placeholder {
        min-height: 50px;
    }
}


/* ========== 分类详情页样式 ========== */
.category-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 40px;
}

[data-theme="dark"] .category-hero {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.category-hero-inner {
    max-width: 1600px;
    margin: 0 auto;
}

.back-home {
    display: inline-block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.back-home:hover {
    color: #fff;
}

.category-hero-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.category-hero-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.category-hero-title h1 {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.category-hero-count {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 12px;
}

.category-hero-tip {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

/* 空分类提示 */
.empty-category {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    max-width: 400px;
    margin: 40px auto;
}

.empty-category .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-category p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 16px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .category-hero {
        padding: 20px 16px;
    }
    
    .category-hero-title h1 {
        font-size: 22px;
    }
    
    .category-hero-icon {
        font-size: 28px;
    }
    
    .category-hero-count {
        font-size: 12px;
    }
}


/* ========== 移动端响应式优化 ========== */

/* 汉堡菜单按钮 */
.hamburger-btn {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: 8px;
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: var(--bg-color);
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--text-color);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* 汉堡按钮激活状态（X形） */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 桌面端隐藏类 */
.desktop-only {
    display: inline-flex;
}

/* 移动端侧边菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--card-bg);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-menu.open {
    right: 0;
}

/* 菜单头部 */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.mobile-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-color);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 菜单导航区 */
.mobile-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.mobile-menu-item:hover {
    background: var(--bg-color);
}

.mobile-menu-item.active {
    background: rgba(24, 144, 255, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.mobile-menu-item .menu-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.mobile-menu-item .menu-text {
    font-size: 15px;
    font-weight: 500;
}

/* 移动端待办徽章 */
.mobile-badge {
    margin-left: auto;
}

/* 菜单底部 */
.mobile-menu-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--primary-hover);
}

.mobile-menu-btn.secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.mobile-menu-btn.secondary:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 遮罩层 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 移动端响应式断点 */
@media (max-width: 767px) {
    /* 显示汉堡按钮 */
    .hamburger-btn {
        display: flex;
    }
    
    /* 隐藏桌面端元素 */
    .tool-buttons {
        display: none;
    }
    
    .desktop-only {
        display: none;
    }
    
    /* 头部调整 */
    .header-inner {
        padding: 0 12px;
        height: 52px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo-desc {
        display: none;
    }
    
    /* 搜索区域优化 - 隐藏时间和天气，只保留搜索框 */
    .search-section {
        padding: 16px 12px;
    }
    
    .search-layout {
        flex-direction: column;
        gap: 12px;
        justify-content: center;
        align-items: center;
    }
    
    /* 隐藏时间显示 - 手机本身有时间 */
    .datetime-display {
        display: none;
    }
    
    /* 隐藏天气显示 - 手机本身有天气 */
    .weather-display {
        display: none;
    }
    
    /* 搜索框居中全宽 */
    .search-wrapper {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .search-title {
        display: none;
    }
    
    .search-box input {
        padding: 10px 40px 10px 14px;
        font-size: 14px;
    }
    
    /* 待办提醒优化 */
    .todo-reminder-inner {
        padding: 8px 14px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .reminder-text {
        font-size: 13px;
    }
    
    /* 主内容区 */
    .container {
        padding: 16px 12px;
    }
    
    /* 最近访问区域 */
    .recent-section {
        padding: 12px 12px 0;
    }
    
    /* 分类区块 */
    .category-header {
        padding: 12px 14px;
    }
    
    .category-title {
        font-size: 15px;
    }
    
    /* 链接卡片优化 */
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .link-card {
        padding: 12px 14px;
        border-right: none;
    }
    
    .link-favicon {
        width: 32px;
        height: 32px;
    }
    
    .link-favicon img {
        width: 20px;
        height: 20px;
    }
    
    .link-title {
        font-size: 13px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .link-desc {
        display: none;
    }
    
    .link-actions {
        opacity: 1;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
    }
    
    /* 模态框优化 */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
    
    .modal-header {
        padding: 14px 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .form-group {
        margin: 0 0 12px;
    }
    
    .form-actions {
        padding: 14px 16px;
    }
    
    /* 页脚 */
    .footer {
        padding: 20px 12px;
        font-size: 12px;
    }
}

/* 平板端响应式 (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .header-inner {
        padding: 0 20px;
    }
    
    .search-section {
        padding: 24px 20px;
    }
    
    /* 平板端搜索区域：隐藏时间和天气，只显示搜索框 */
    .search-layout {
        justify-content: center;
    }
    
    /* 隐藏时间显示 - 平板本身有时间 */
    .datetime-display {
        display: none;
    }
    
    /* 隐藏天气显示 - 平板本身有天气 */
    .weather-display {
        display: none;
    }
    
    /* 搜索框居中显示 */
    .search-wrapper {
        width: 100%;
        max-width: 600px;
    }
    
    /* 平板端六边形适配 */
    .welcome-content {
        width: 360px;
        height: 440px;
        padding: 55px 40px;
    }
    
    .welcome-title {
        font-size: 24px;
        margin-bottom: 28px;
    }
    
    .lock-icon {
        font-size: 48px;
    }
    
    .front-login-form {
        max-width: 260px;
    }
    
    .search-title {
        display: block;
        text-align: center;
    }
    
    .container {
        padding: 24px 20px;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 小平板/大手机横屏 (600px - 767px) - 同样隐藏时间和天气 */
@media (min-width: 600px) and (max-width: 767px) {
    .search-layout {
        justify-content: center;
    }
    
    /* 隐藏时间和天气 */
    .datetime-display {
        display: none;
    }
    
    .weather-display {
        display: none;
    }
    
    /* 搜索框居中 */
    .search-wrapper {
        width: 100%;
        max-width: 500px;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .link-title {
        white-space: nowrap;
    }
    
    .link-desc {
        display: block;
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 767px) {
    .back-to-top {
        bottom: 16px;
        right: 16px;
    }
}
