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

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --background: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xl: 24px;
    --transition: all 0.2s ease;
    --card-elevation: 0 2px 10px rgba(0, 0, 0, 0.07);
    --card-hover-elevation: 0 8px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f7;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 头部导航 */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: none;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.app-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.search-btn {
    background: none;
    border: none;
    padding: 10px;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.search-btn:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

.search-btn:active {
    transform: scale(0.95);
}

/* 搜索容器 */
.search-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border-light);
    z-index: 200;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.search-container.active {
    transform: translateY(0);
}

.search-box {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 12px;
}

.search-input {
    flex: 1;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
    background: var(--surface);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.search-close:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

.search-close:active {
    transform: scale(0.9);
}

/* 分类标签 */
.category-tabs {
    display: flex;
    gap: 8px;
    padding: 24px 20px 20px;
    background: transparent;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: sticky;
    top: 60px;
    z-index: 50;
    justify-content: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.category-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.category-tab:hover:not(.active) {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.category-tab:active:not(.active) {
    transform: scale(0.98);
}

/* 主内容区域 */
.main-content {
    padding: 70px 20px 100px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 统计信息 */
.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.stats-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 准星网格 */
.crosshair-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.crosshair-card {
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--card-elevation);
}

.crosshair-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-elevation);
}

.crosshair-card:active {
    transform: translateY(-2px);
}

/* 卡片出现动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crosshair-card {
    animation: fadeInUp 0.5s ease-out;
}

/* 延迟加载动画 */
.crosshair-card:nth-child(n+5) { animation-delay: 0.1s; }
.crosshair-card:nth-child(n+10) { animation-delay: 0.2s; }
.crosshair-card:nth-child(n+15) { animation-delay: 0.3s; }

.crosshair-card.downloaded::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.crosshair-image {
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: white;
    padding: 24px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* 白色图标背景处理 - 在亮色模式下添加深色背景 */
body:not(.dark-mode) .crosshair-image {
    background: linear-gradient(135deg, #334155, #475569);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 深色模式下的图标背景 */
body.dark-mode .crosshair-image {
    background: var(--surface);
}

.crosshair-info {
    padding: 12px;
    background: var(--background);
}

.crosshair-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crosshair-category {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 加载更多 */
.load-more {
    text-align: center;
    margin-top: 32px;
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.load-more-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--background);
    border-top: none;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 16px;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 20px 20px 0 0;
    margin: 0 auto;
    max-width: 768px;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 12px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* 下载提示 */
.download-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 16px 20px;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    transform: translateX(400px) translateY(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    min-width: 250px;
}

/* 通用Toast样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 16px 20px;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    transform: translateX(400px) translateY(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    min-width: 250px;
}

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

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}

.toast-info {
    background: #3b82f6;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
}

.toast-text {
    font-weight: 500;
}

/* 下载进度条 */
.download-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.download-progress.show {
    transform: translateX(0);
}

.download-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    width: 0%;
    transition: width 0.2s ease;
}

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

.download-toast.success {
    background: #10b981;
}

.download-toast.error {
    background: #ef4444;
}

.download-toast.info {
    background: #3b82f6;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
}

.toast-text {
    font-weight: 500;
}

/* 模态框 */
.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: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--background);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.preview-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: white;
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
}

/* 白色图标背景处理 - 在亮色模式下添加深色背景 */
body:not(.dark-mode) .preview-image {
    background: linear-gradient(135deg, #334155, #475569);
    border: 1px solid #475569;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 深色模式下的图标背景 */
body.dark-mode .preview-image {
    background: var(--surface);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-xl);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid transparent;
    box-shadow: var(--card-elevation);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    box-shadow: var(--card-hover-elevation);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        padding: 80px 16px 100px;
    }
    
    .crosshair-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .crosshair-image {
        height: 140px;
        padding: 12px;
    }
    
    .category-tabs {
        padding: 20px 16px 16px;
        justify-content: flex-start;
    }
    
    .stats-bar {
        padding: 10px 12px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .download-toast {
        top: auto;
        bottom: 100px;
        right: 16px;
        left: 16px;
        transform: translateY(100px);
        max-width: none;
    }
    
    .download-toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .crosshair-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .crosshair-image {
        height: 120px;
    }
    
    .app-title {
        font-size: 18px;
    }
    
    .header-content {
        padding: 12px 16px;
    }
    
    .category-tabs {
        padding: 18px 12px 12px;
    }
    
    .category-tab {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --surface-hover: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --border: #334155;
        --border-light: #1e293b;
    }
    
    .crosshair-image {
        background: var(--surface);
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 设置页面样式 */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.settings-header {
    margin-bottom: 32px;
}

.settings-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.settings-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.settings-section {
    margin-bottom: 24px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 20px;
    border: 1px solid transparent;
    box-shadow: var(--card-elevation);
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.setting-item:last-child {
    border-bottom: none;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-label {
    flex: 1;
}

.settings-item-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-item-description {
    font-size: 14px;
    color: var(--text-secondary);
}

.settings-item-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 开关组件 - 全新设计 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    cursor: pointer;
}

/* 次要开关样式 - 更小尺寸 */
.toggle-switch.modern-switch {
    width: 52px;
    height: 28px;
}

.toggle-switch.modern-switch .toggle-slider::before {
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
}

.toggle-switch.modern-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-switch.modern-switch .toggle-slider::after {
    content: "✕";
    font-size: 14px;
    font-weight: bold;
    color: #6b7280;
    right: 8px;
}

.toggle-switch.modern-switch input:checked + .toggle-slider::after {
    content: "✓";
    left: 8px;
    color: #ffffff;
}

/* 自动重命名开关 */
#autoRenameToggle + .toggle-slider::after {
    content: "📝";
    font-size: 12px;
}

#autoRenameToggle:checked + .toggle-slider::after {
    content: "✅";
}

/* 下载提示开关 */
#downloadToastToggle + .toggle-slider::after {
    content: "🔔";
    font-size: 12px;
}

#downloadToastToggle:checked + .toggle-slider::after {
    content: "🔕";
}

/* 性能优化开关 */
#preloadToggle + .toggle-slider::after {
    content: "⚡";
    font-size: 14px;
}

#preloadToggle:checked + .toggle-slider::after {
    content: "🚀";
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: var(--transition);
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.toggle-slider::after {
    content: "☀️";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

input:checked + .toggle-slider::after {
    content: "🌙";
    left: 8px;
    right: auto;
    opacity: 1;
}

.toggle-switch:hover .toggle-slider {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.toggle-switch input:checked:hover + .toggle-slider {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* 已上传图标管理 */
.uploaded-icons-manager {
    margin-top: 16px;
}

.uploaded-icons-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.uploaded-icons-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.uploaded-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    min-height: 200px;
}

.uploaded-icons-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--text-secondary);
    text-align: center;
}

.uploaded-icons-empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.uploaded-icons-empty p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.uploaded-icons-empty-desc {
    font-size: 14px !important;
    opacity: 0.7;
    margin-top: 4px !important;
}

.uploaded-icon-item {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    transition: all 0.2s ease;
    position: relative;
}

.uploaded-icon-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.uploaded-icon-preview {
    width: 100%;
    height: 120px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.uploaded-icon-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.uploaded-icon-info {
    margin-bottom: 12px;
}

.uploaded-icon-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.uploaded-icon-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.uploaded-icon-actions {
    display: flex;
    gap: 8px;
}

.uploaded-icon-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

/* 删除确认对话框 */
.delete-confirm-dialog {
    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: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.delete-confirm-dialog.show {
    opacity: 1;
    visibility: visible;
}

.delete-confirm-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.delete-confirm-dialog.show .delete-confirm-content {
    transform: scale(1);
}

.delete-confirm-header {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.delete-confirm-body {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.delete-confirm-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 删除密码输入框 */
.delete-password-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.delete-password-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.delete-password-input::placeholder {
    color: var(--text-secondary);
}

/* 选择器 */
.settings-select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.settings-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 备案信息 */
.settings-footer {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.beian-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.beian-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.beian-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.beian-item a:hover {
    color: var(--primary-color);
}

.police-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* 深色模式变量 */
body.dark-mode {
    --background: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --border-light: #1e293b;
}

body.dark-mode .app-header {
    background-color: rgba(15, 23, 42, 0.95);
}

body.dark-mode .crosshair-image {
    background: var(--surface);
}

/* 设置页面响应式 */
@media (max-width: 768px) {
    .settings-container {
        padding: 16px;
    }
    
    .settings-section {
        padding: 20px;
    }
    
    .settings-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .settings-item-control {
        width: 100%;
        justify-content: space-between;
    }
    
    .beian-info {
        gap: 8px;
    }
    
    .beian-item {
        font-size: 12px;
    }
}

/* 图标上传样式 */
.upload-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.password-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.password-input-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.password-input-group input[type="password"] {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    outline: none;
    transition: var(--transition);
    background: var(--surface);
}

.password-input-group input[type="password"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.file-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-input-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.file-input-group input[type="file"] {
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--background);
    cursor: pointer;
    transition: var(--transition);
}

.file-input-group input[type="file"]:hover {
    border-color: var(--primary-color);
    background: var(--surface-hover);
}

.file-requirements {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 60px;
    padding: 12px;
    background: var(--background);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.upload-preview:empty::before {
    content: "选择的文件预览将显示在这里";
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 60px;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--surface);
}

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

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.preview-item .remove-btn:hover {
    background: rgba(220, 38, 38, 1);
}

body.dark-mode .upload-form {
    background: var(--surface-hover);
}

body.dark-mode .password-input-group input[type="password"],
body.dark-mode .file-input-group input[type="file"] {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

body.dark-mode .upload-preview {
    background: var(--surface);
}