/* ========================================
   个人导航 - iTab风格优化版
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    color: #333;
    user-select: none;
}
/* 背景层 - iTab极简风格 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    transition: all 0.5s ease;
}
/* 背景设置按钮区 */
.bg-settings {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
}
.btn-bg-change, .btn-bg-reset {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.btn-bg-change {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-bg-change:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}
.btn-bg-reset {
    background: rgba(255, 100, 100, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 100, 100, 0.3);
}
.btn-bg-reset:hover {
    background: rgba(255, 100, 100, 0.35);
    transform: translateY(-2px);
}
/* 顶部时间天气组件 */
.top-widgets {
    position: fixed;
    top: 30px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
    pointer-events: none;
}
.time-widget {
    text-align: left;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.time-display {
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 2px;
    line-height: 1.2;
}
.date-display {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}
.weather-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 18px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    padding: 10px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.weather-widget:hover {
    background: rgba(255, 255, 255, 0.15);
}
.weather-widget i {
    font-size: 24px;
}
.weather-temp {
    font-weight: 500;
}
/* 主内容区 */
.main {
    padding: 160px 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* 搜索容器 - 居中顶部 */
.search-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 50px;
}
.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-box:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}
.search-box:focus-within {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px) scale(1.02);
}
.engine-select {
    border: none;
    background: transparent;
    padding: 10px 15px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    outline: none;
    border-right: 1px solid #eee;
    font-weight: 500;
}
.search-box input {
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 16px;
    flex: 1;
    background: transparent;
    color: #333;
}
.search-box input::placeholder {
    color: #aaa;
}
.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.search-btn:active {
    transform: scale(0.95);
}
/* 用户区域 */
.user-area {
    position: fixed;
    top: 85px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}
.btn-login, .btn-register {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-login {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}
.btn-login:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}
.btn-register {
    background: #fff;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.username {
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.btn-logout:hover {
    background: rgba(255, 100, 100, 0.3);
}
/* 快捷方式容器 - iTab网格布局 */
.shortcuts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    width: 100%;
}
.shortcuts-grid {
    display: contents;
}
/* 快捷方式卡片 - iTab大图标风格 */
.shortcut-card {
    width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 12px 8px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.shortcut-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
}
.shortcut-card:active {
    transform: translateY(-4px) scale(0.98);
}
/* 移除原有的悬停操作按钮 */
.shortcut-actions {
    display: none !important;
}
.shortcut-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.shortcut-card:hover .shortcut-icon {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.shortcut-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}
.shortcut-icon i {
    font-size: 36px;
    color: #666;
}
.shortcut-name {
    font-size: 13px;
    color: #fff;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    font-weight: 500;
}
/* 添加按钮 */
.add-card {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}
.add-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}
.add-icon {
    background: rgba(255, 255, 255, 0.15);
}
.add-icon i {
    font-size: 36px;
    color: #fff;
}
/* 拖拽样式 */
.shortcut-card.dragging {
    opacity: 0.4;
    transform: scale(0.92) rotate(2deg);
}
.shortcut-card.drag-over {
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}
/* 图标上传区域 */
.icon-upload-area {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}
.icon-preview {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex-shrink: 0;
}
.icon-preview img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.icon-preview i {
    font-size: 28px;
    color: #666;
}
.icon-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.btn-upload-icon, .btn-use-text-icon {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.btn-upload-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.btn-upload-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.btn-use-text-icon {
    background: #e9ecef;
    color: #495057;
}
.btn-use-text-icon:hover {
    background: #dee2e6;
}
/* 右键菜单 - iTab风格 */
.context-menu {
    position: fixed;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.15s ease, transform 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.context-menu.show {
    display: block;
    opacity: 1;
    transform: scale(1);
}
.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}
.context-menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    opacity: 0.9;
}
.context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}
/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.modal.show {
    display: flex;
    opacity: 1;
}
.modal-content {
    background: #fff;
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    padding: 32px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal.show .modal-content {
    transform: scale(1) translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    color: #333;
    background: #f5f5f5;
    transform: rotate(90deg);
}
/* 表单 */
.form-group {
    margin-bottom: 22px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}
.form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}
.color-picker {
    display: flex;
    align-items: center;
    gap: 12px;
}
.color-picker input[type="color"] {
    width: 56px;
    height: 44px;
    padding: 4px;
    cursor: pointer;
    border-radius: 10px;
}
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-full {
    width: 100%;
}
.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background: #e8e8e8;
}
.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}
.modal-tip {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}
.modal-tip a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
/* 确认弹窗 */
.confirm-content {
    text-align: center;
    max-width: 360px;
}
.confirm-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirm-icon i {
    font-size: 36px;
    color: #fff;
}
.confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}
.confirm-message {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}
.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
/* 响应式适配 */
@media (max-width: 768px) {
    .bg-settings {
        top: 20px;
        right: 20px;
    }
    
    .top-widgets {
        top: 20px;
        left: 20px;
        right: 20px;
    }
    
    .time-display {
        font-size: 36px;
    }
    
    .date-display {
        font-size: 12px;
    }
    
    .user-area {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 30px;
        justify-content: center;
    }
    
    .main {
        padding: 120px 20px 40px;
    }
    
    .search-container {
        max-width: 100%;
        margin-bottom: 40px;
    }
    
    .search-box input {
        width: auto;
    }
    
    .shortcuts-container {
        gap: 16px;
    }
    
    .shortcut-card {
        width: 90px;
        padding: 10px 6px;
    }
    
    .shortcut-icon {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }
    
    .shortcut-icon img {
        width: 38px;
        height: 38px;
    }
    
    .shortcut-name {
        font-size: 12px;
    }
    
    .context-menu {
        min-width: 160px;
    }
    
    .icon-upload-area {
        flex-direction: column;
    }
    
    .icon-actions {
        width: 100%;
    }
}
@media (max-width: 480px) {
    .time-display {
        font-size: 28px;
    }
    
    .weather-widget {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .shortcut-card {
        width: 80px;
    }
    
    .shortcut-icon {
        width: 56px;
        height: 56px;
    }
}
