/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
}

/* 应用容器 */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    gap: 20px;
}

/* 左侧标签栏 */
.sidebar {
    width: 200px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-header {
    margin-bottom: 15px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tag-list li {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tag-list li:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.tag-list li.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

/* 主内容区包装器 */
.main-wrapper {
    flex: 1;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 20px;
}

/* 筛选状态浮条 */
.filter-status {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-status span {
    font-size: 14px;
    color: #6366f1;
}

.filter-status button {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-left: 10px;
}

.filter-status button:hover {
    text-decoration: underline;
}

/* 主题切换按钮 */
.theme-toggle {
    margin-right: 10px;
}

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none;
}

/* 顶部导航栏 */
.header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.logo-letter {
    color: white;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-left: 20px;
}

.title-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.main-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.slogan {
    font-size: 14px;
    color: #4b5563;
    font-style: normal;
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-right: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #6366f1;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 快速录入区 */
.quick-input {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.search-box,
.link-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.search-box label,
.link-input label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.search-box input,
.link-input input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-box input:focus,
.link-input input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

#addBtn {
    padding: 8px 16px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#addBtn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 智能标签推荐 */
.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.tag-chip:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    transform: translateY(-1px);
}

.tag-chip.selected {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.remove-tag {
    margin-left: 6px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: bold;
    color: inherit;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.remove-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hidden {
    display: none !important;
}

/* 主内容区 - Bento Box Grid */
.main-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    min-height: 600px;
}

/* 四大功能分区 */
.section {
    height: 550px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* 分区主题色 */
.productivity-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.creativity-section {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.knowledge-section {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.miscellaneous-section {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.section h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 分区卡片容器 */
.card-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    overflow-y: auto;
    padding-right: 6px;
}

/* 滚动条样式 */
.card-container::-webkit-scrollbar {
    width: 6px;
}

.card-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.card-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
    backdrop-filter: blur(5px);
}

.card-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* 火狐浏览器滚动条样式 */
.card-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) rgba(255, 255, 255, 0.3);
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 2px dashed #e2e8f0;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 120px;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

/* 卡片 hover 效果 */
.card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* 卡片链接包装器 */
.card-link-wrapper {
    display: block;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* 卡片内容 */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}

/* 卡片头部 */
.card-header {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 2px;
}

/* 卡片图标 */
.card-favicon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* 卡片标题 */
.card-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
    color: #333;
}

/* 卡片标签 */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: auto;
    overflow: hidden;
}

/* 卡片标签样式 */
.card-tag {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    padding: 1px 5px;
    border-radius: 10px;
    font-size: 8px;
    white-space: nowrap;
    border: none;
}

/* 卡片操作按钮 */
.card-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    position: relative;
    z-index: 10;
}

/* 编辑按钮 */
.card-edit {
    background: transparent;
    border: none;
    color: #6366f1;
    cursor: pointer;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background 0.3s ease;
    position: relative;
    z-index: 10;
}

.card-edit:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* 删除按钮 */
.card-delete {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background 0.3s ease;
    position: relative;
    z-index: 10;
}

.card-delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* 占位符卡片 */
.card-placeholder {
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 占位符 hover 效果 */
.card-placeholder:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

/* 占位符内容 */
.placeholder-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 占位符加号 */
.placeholder-plus {
    font-size: 24px;
    color: rgba(0, 0, 0, 0.08);
    font-weight: 300;
    transition: color 0.3s ease;
}

/* 占位符 hover 时加号颜色变化 */
.card-placeholder:hover .placeholder-plus {
    color: rgba(99, 102, 241, 0.3);
}

/* 分区头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* 分区操作按钮 */
.section-action {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.section-action:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.05);
}

.section-action .icon {
    font-size: 14px;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

#linkForm {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

#linkForm h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.form-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cancelBtn,
#cancelEditBtn {
    background: #f1f5f9;
    color: #333;
}

#cancelBtn:hover,
#cancelEditBtn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.form-actions button[type="submit"],
#saveEditBtn {
    background: #6366f1;
    color: white;
}

.form-actions button[type="submit"]:hover,
#saveEditBtn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .app-container {
        padding: 15px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        min-height: auto;
    }
    
    .card-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .quick-input {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .header-left,
    .header-right {
        justify-content: center;
        align-items: center;
    }
    
    .header-right {
        align-items: center;
    }
    
    .quick-input {
        grid-template-columns: 1fr;
    }
    
    .card-container {
        grid-template-columns: 1fr;
    }
    
}

/* 深色模式 */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
    color: #f0f0f0;
}

body.dark-mode .app-container {
    background: transparent;
}

body.dark-mode .sidebar {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .sidebar-header h3 {
    color: #f0f0f0;
}

body.dark-mode .tag-list li {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
}

body.dark-mode .tag-list li:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

body.dark-mode .tag-list li.active {
    background: rgba(99, 102, 241, 0.3);
    border-color: #6366f1;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

body.dark-mode .header {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .main-title {
    background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .slogan {
    color: #9ca3af;
}

body.dark-mode .quick-input {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .search-box label,
body.dark-mode .link-input label {
    color: #f0f0f0;
}

body.dark-mode .search-box input,
body.dark-mode .link-input input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f0f0f0;
}

body.dark-mode .search-box input::placeholder,
body.dark-mode .link-input input::placeholder {
    color: #999;
}

body.dark-mode #addBtn {
    background: rgba(99, 102, 241, 0.8);
    color: white;
}

body.dark-mode #addBtn:hover {
    background: rgba(99, 102, 241, 1);
}

body.dark-mode .section {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .section h2 {
    color: #f0f0f0;
}

body.dark-mode .card {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

body.dark-mode .card-title {
    color: #f0f0f0;
}

body.dark-mode .card-description {
    color: #ccc;
}

body.dark-mode .card-tags {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .card-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
}

body.dark-mode .card-actions button {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
}

body.dark-mode .card-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .card-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .placeholder-plus {
    color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .stats-widget {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .stats-widget h4 {
    color: #f0f0f0;
}

body.dark-mode .stat-label {
    color: #ccc;
}

body.dark-mode .stat-value {
    color: #f0f0f0;
}

body.dark-mode .modal {
    background: rgba(0, 0, 0, 0.8);
}

body.dark-mode .modal-content {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
}

body.dark-mode .modal-content h3 {
    color: #f0f0f0;
}

body.dark-mode .form-group label {
    color: #f0f0f0;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea,
body.dark-mode .form-group select {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f0f0f0;
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: #999;
}

body.dark-mode .form-actions button {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
}

body.dark-mode .form-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .filter-status {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

body.dark-mode .filter-status span {
    color: #a5b4fc;
}

body.dark-mode .filter-status button {
    color: #a5b4fc;
}

body.dark-mode .batch-toolbar {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .batch-toolbar h4 {
    color: #f0f0f0;
}

body.dark-mode .toolbar-button {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
}

body.dark-mode .toolbar-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .card.selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.2);
}

body.dark-mode .card.selected::after {
    background: #6366f1;
    color: white;
}

body.dark-mode .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
    .modal-content,
    #linkForm {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 10px;
    }
    
    .header-left h1 {
        font-size: 16px;
    }
    
    .section {
        padding: 12px;
    }
    
    .card {
        padding: 10px;
    }
    
    .tag-chip {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* 数据统计小组件 */
.stats-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    transition: all 0.3s ease;
}

.stats-widget h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: 600;
    color: #333;
}

/* 空状态 */
.empty-search {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 12px;
    text-align: center;
    padding: 20px;
    transition: all 0.3s ease;
}

/* 过渡动画 */
.card {
    transition: all 0.3s ease;
}

.card-container {
    transition: all 0.3s ease;
}

/* 全屏样式 */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    overflow-y: auto;
}

/* Toast 提示样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background-color: #52c41a;
}

.toast-error {
    background-color: #ff4d4f;
}

.fullscreen .card-container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* 批量管理操作条 */
.batch-toolbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.toolbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar-content h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.toolbar-button {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.toolbar-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.toolbar-close {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.toolbar-close:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* 头像输入容器 */
.avatar-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.avatar-input-container input[type="file"] {
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-input-container input[type="file"]:hover {
    background: rgba(255, 255, 255, 0.9);
}

.form-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    margin-bottom: 0;
}

/* 卡片选中状态 */
.card.selected {
    border: 2px solid #6366f1;
    background: rgba(99, 102, 241, 0.1);
    position: relative;
}

.card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #6366f1;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* URL 输入容器样式 */
.url-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.url-input-container input {
    flex: 1;
}

/* 自动获取按钮样式 */
.auto-fetch-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.auto-fetch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auto-fetch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .url-input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .auto-fetch-btn {
        align-self: flex-start;
        margin-top: 5px;
    }
}