:root {
    --primary-color: #2196f3;
    --bg-color: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --hover-color: #f5f5f5;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: var(--bg-color);
    color: var(--text-color);
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar {
    width: 240px;
    border-right: 1px solid var(--border-color);
    padding: 20px 0 0 0; /* 移除底部内边距 */
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 30px;
}

.logo img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.logo span {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}

.sidebar nav a {
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar nav a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-text {
    transition: opacity 0.3s ease;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: var(--hover-color);
    border-left-color: var(--primary-color);
}

.sidebar nav a.logout-link {
    display: none;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
}

.content-wrapper {
    flex: 1;
    overflow: hidden; /* 改为hidden，不允许整体滚动 */
    padding: 0; /* 减少内边距，使布局更紧凑 */
    display: flex;
    flex-direction: column;
    position: relative; /* 添加相对定位，便于内部元素定位 */
}

.section {
    display: none;
    height: 100%;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
    overflow: hidden; /* Prevent section overflow */
}

.section.active {
    display: flex;
}

/* 通用内容容器，可被多个部分复用 */
.content-container {
    padding: 20px;
    overflow-y: auto;
    height: auto;
    max-height: calc(100vh - 120px); /* 限制最大高度，防止过度拉伸 */
    display: flex;
    flex-direction: column;
}

.editor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    padding: 24px;
    border-radius: 12px;
    background: var(--bg-color);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card .icon {
    font-size: 2.5em;
    margin-bottom: 16px;
}

.card h3 {
    margin: 0 0 8px 0;
    color: var(--text-color);
}

.card p {
    margin: 0;
    color: #666;
}

/* 存储管理部分的样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px; /* 添加适当的内边距 */
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

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

.header-left h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 使用更具体的选择器并添加 !important */
.search-box input[type="text"],
.search-box input#storage-search {
    padding: 6px 10px 6px 35px !important; /* 适中的左边距 */
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    border: 1px solid var(--border-color, #e0e0e0) !important;
}

/* 确保图标位置正确 */
.search-box .search-icon {
    position: absolute !important;
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    pointer-events: none !important;
    color: #999 !important; /* 默认浅灰色 */
    transition: color 0.3s ease !important;
}

/* 检查容器定位 */
.search-box {
    position: relative !important;
    display: block !important;
    width: 240px !important;
    transition: all 0.3s ease !important;
}

/* 聚焦效果 - 容器聚焦时的样式 */
.search-box:focus-within {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15) !important;
}

/* 输入框聚焦时的样式 */
.search-box input:focus {
    outline: none !important;
    border-color: var(--primary-color, #3b82f6) !important;
}

/* 输入框聚焦时图标变亮效果 */
.search-box:focus-within .search-icon {
    color: var(--primary-color, #3b82f6) !important; /* 聚焦时图标变为主题色 */
}

.search-icon {
    position: absolute;
    left: 8px; /* 调整图标位置 */
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none; /* 确保图标不会阻止点击输入框 */
    z-index: 2; /* 确保图标在输入框上方 */
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 35px; /* 优化内边距比例 */
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 14px; /* 稍微增加字体大小提高可读性 */
    transition: all 0.2s ease;
}

.view-toggle {
    display: flex;
    background: var(--hover-color);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.view-btn {
    background: transparent;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.2s ease;
    width: 32px; /* 固定宽度，使按钮大小一致 */
    height: 28px; /* 固定高度，使按钮大小一致 */
}

.view-btn:hover {
    background: rgba(33, 150, 243, 0.1);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.storage-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

.storage-view.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.storage-list,
.share-list {
    background: var(--bg-color);
    border-radius: 6px; /* 减小圆角半径，使外观更现代 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); /* 更细腻的阴影 */
    overflow-y: auto; /* 只允许垂直滚动 */
    overflow-x: hidden; /* 禁止水平滚动 */
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1;
    /* 确保内部的sticky元素可以正确定位 */
    contain: none;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--border-color) transparent; /* Firefox */
    margin-top: 0; /* 移除顶部的间距 */
}

.storage-list::-webkit-scrollbar,
.share-list::-webkit-scrollbar {
    width: 6px;
}

.storage-list::-webkit-scrollbar-track,
.share-list::-webkit-scrollbar-track {
    background: transparent;
}

.storage-list::-webkit-scrollbar-thumb,
.share-list::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 6px;
}

.storage-items {
    flex: 1;
}

/* 网格视图样式 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* 增加每个网格项的最小宽度 */
    gap: 20px; /* 增加网格间距 */
    padding: 2px; /* 添加内边距，使内容不贴边 */
    flex: 1;
    overflow-y: auto; /* 只允许垂直滚动 */
    overflow-x: hidden; /* 禁止水平滚动 */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--border-color) transparent; /* Firefox */
}

/* Webkit (Chrome, Safari, Edge) 滚动条样式 */
.grid-container::-webkit-scrollbar {
    width: 6px;
}

.grid-container::-webkit-scrollbar-track {
    background: transparent;
}

.grid-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 6px;
}

.grid-item {
    background: var(--bg-color);
    border-radius: 8px; /* 增加圆角半径，更现代 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* 更美观的阴影 */
    padding: 16px; /* 增加内边距，更加宽敞 */
    display: flex;
    flex-direction: column;
    align-items: center; /* 居中对齐内容 */
    justify-content: center; /* 垂直居中 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    opacity: 1; /* 默认可见 */
    cursor: pointer; /* 使用手型光标，提示可点击 */
    border: none; /* 移除边框，使用阴影代替 */
    height: 160px; /* 固定高度，保持一致性 */
}

.grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    background-color: var(--hover-color); /* 添加背景色变化 */
}

.grid-item .file-icon {
    font-size: 48px; /* 增大图标大小 */
    margin-bottom: 16px; /* 增加底部间距 */
    color: var(--primary-color);
    text-align: center;
    margin-top: auto; /* 自动上边距，帮助垂直居中 */
}

.grid-item .file-name {
    font-weight: 500;
    margin-bottom: 10px; /* 增加底部间距 */
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px; /* 调整字体大小 */
    text-align: center; /* 居中对齐 */
    width: 100%; /* 占满宽度 */
    padding: 0 4px; /* 添加水平内边距 */
}

.grid-item .file-meta {
    font-size: 12px; /* 调整字体大小 */
    color: #666;
    margin-bottom: 0; /* 移除底部间距 */
    line-height: 1.4; /* 调整行高 */
    text-align: center; /* 居中对齐 */
    background-color: rgba(0, 0, 0, 0.03); /* 添加轻微背景色 */
    padding: 4px 8px; /* 添加内边距 */
    border-radius: 4px; /* 添加圆角 */
    margin-top: auto; /* 推到底部 */
}

.grid-item .file-actions {
    margin-top: auto;
    display: flex;
    gap: 6px; /* 减小按钮间距 */
}

/* 网格视图中的操作按钮容器定位 */
.grid-item .file-actions:last-child {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
}

.grid-item .file-actions button {
    flex: 1;
    padding: 5px; /* 减小按钮内边距 */
    border: none;
    border-radius: 4px;
    background: var(--hover-color);
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 11px; /* 减小字体大小 */
    line-height: 1; /* 减小行高 */
}

.grid-item .file-actions button:hover {
    background: var(--primary-color);
    color: white;
}

/* 表格视图样式 */
.storage-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.storage-table th,
.storage-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.storage-table th {
    background: var(--hover-color);
    font-weight: 500;
}

.storage-table tr:hover {
    background: var(--hover-color);
}

.storage-table .file-actions {
    display: flex;
    gap: 8px;
}

.storage-table .file-actions button {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    background: var(--hover-color);
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 12px;
}

.storage-table .file-actions button:hover {
    background: var(--primary-color);
    color: white;
}

/* Toast提示样式 */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(33, 33, 33, 0.9);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
    animation: toastIn 0.3s ease forwards;
    pointer-events: auto;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.toast.success {
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left: 4px solid #f44336;
}

.toast.info {
    border-left: 4px solid #2196f3;
}

.toast.warning {
    border-left: 4px solid #ff9800;
}

.toast.loading {
    border-left: 4px solid #9c27b0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.toast.hide {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 空数据提示 */
.empty-message {
    text-align: center;
    padding: 30px;
    color: #888;
    font-style: italic;
}

/* 没有更多数据提示 */
.end-message {
    text-align: center;
    padding: 16px;
    color: #888;
    font-size: 13px;
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 16px;
    color: #e53935;
    background-color: rgba(229, 57, 53, 0.05);
    border-radius: 8px;
    margin: 10px 0;
}

.error-message p {
    margin-bottom: 10px;
}

.error-message button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s ease;
}

.error-message button:hover {
    background: var(--primary-color-dark, #1976d2);
}

.list-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 40px; /* 增加一列用于操作按钮 */
    padding: 8px 12px; /* 减少左右内边距 */
    font-weight: 500; /* 增加字重，使标题更突出 */
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    color: #666;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 20;
    /* 移除阴影，使其与内容更加融洽 */
    box-shadow: none;
    /* 确保头部始终保持在最上层 */
    margin-top: 0;
    margin-bottom: 0;
}

.list-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 40px; /* 增加一列用于操作按钮 */
    padding: 8px 12px; /* 减少内边距，使列表更紧凑 */
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease; /* 只保留背景色过渡效果 */
    opacity: 1; /* 默认可见 */
    cursor: pointer;
    position: relative;
    align-items: center;
}

.list-item:hover {
    background: var(--hover-color);
    transform: translateX(4px);
}

.list-header span:nth-child(1) {
    text-align: left;
}

.list-header span:nth-child(2),
.list-header span:nth-child(3) {
    text-align: right;
}

.list-header span:nth-child(4) {
    text-align: center; /* 操作列居中对齐 */
}

.list-item .file-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}

.list-item .file-name-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
    flex: 1;
}

.list-item .file-name .file-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}

.list-item .file-size,
.list-item .file-time {
    color: #666;
    font-size: 13px;
    text-align: right;
}

/* 操作按钮样式 */
.list-item .file-actions,
.grid-item .file-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

.list-item .action-btn,
.grid-item .action-btn {
    width: 24px;
    height: 24px;
    opacity: 0; /* 默认隐藏 */
    border-radius: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10; /* 确保按钮在最上层 */
}

.list-item:hover .action-btn,
.grid-item:hover .action-btn {
    opacity: 1; /* 鼠标悬停时显示 */
}

.list-item .action-btn:hover,
.grid-item .action-btn:hover {
    background: var(--hover-color);
    color: var(--primary-color);
}

.list-item .action-btn svg,
.grid-item .action-btn svg {
    width: 16px;
    height: 16px;
}

/* 网格视图中的操作按钮特殊样式 */
.grid-item .grid-action-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    opacity: 0; /* 默认隐藏 */
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: #666;
}

.grid-item:hover .grid-action-btn {
    opacity: 1; /* 鼠标悬停时显示 */
    transform: translateY(0);
}

.dark-theme .grid-item .grid-action-btn {
    color: #e0e0e0;
}

.dark-theme .list-item .action-btn {
    color: #e0e0e0;
}

/* 点击效果 */
.action-btn:active {
    transform: scale(0.95);
    background-color: var(--hover-color) !important;
}

/* 右键菜单样式 */
.context-menu {
    position: absolute;
    z-index: 1000;
    background: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 160px;
    opacity: 0;
    transform: scale(0.95);
    transform-origin: top left;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    visibility: hidden;
    border: 1px solid var(--border-color);
}

.context-menu.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    visibility: visible;
}

.menu-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-item:hover,
.menu-item.hover {
    background: var(--hover-color);
}

.menu-item svg {
    color: var(--primary-color);
}

.menu-item#menu-delete {
    color: #e53935;
}

.menu-item#menu-delete svg {
    color: #e53935;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.list-item:hover {
    background: var(--hover-color);
}

.settings-form {
    max-width: 600px;
    background: var(--bg-color);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin: 0 auto; /* 水平居中 */
    width: calc(100% - 40px); /* 考虑左右边距 */
}

.setting-item {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.setting-item label {
    font-weight: 500;
    flex-shrink: 0;
}

select,
input[type="text"],
input[type="number"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.3s;
    -webkit-appearance: none;  /* Remove default styling in Safari */
    appearance: none;
}

/* Custom select styling */
select {
    padding-right: 30px; /* Space for the arrow */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

/* Dark mode select arrow */
:root[data-theme="dark"] select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
}

/* Focus states */
select:focus,
input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

/* Update existing checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px 0;
        flex-shrink: 0;
        height: auto;
        flex-direction: row;
    }

    .main-content {
        height: calc(100vh - 60px); /* 考虑到侧边栏的高度 */
    }

    .section-header {
        padding: 0 10px;
    }

    .content-wrapper {
        padding: 0;
    }

    .content-container {
        padding: 15px;
        max-height: calc(100vh - 100px);
    }

    .editor-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .settings-form {
        padding: 15px;
        width: calc(100% - 30px);
    }

    .sidebar nav {
        flex-direction: row;
        justify-content: space-around;
        padding: 0 10px;
        flex: 1;
        overflow-x: auto;
    }

    .sidebar nav a {
        padding: 8px;
        border-left: none;
        border-bottom: 3px solid transparent;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .sidebar nav a:hover,
    .sidebar nav a.active {
        background: transparent;
        border-left: none;
        border-bottom-color: var(--primary-color);
    }

    .nav-text {
        font-size: 12px;
        opacity: 0.8;
    }

    .logo {
        padding: 0 16px;
        margin-bottom: 10px;
    }

    .sidebar nav a.logout-link {
        border-top: none;
        margin-top: 0;
        padding-top: 8px;
    }

    .sidebar nav a.logout-link:hover,
    .sidebar nav a.logout-link.active {
        background: transparent;
        border-bottom-color: #e53935;
    }
}

@media (max-width: 480px) {    .nav-text {        display: none;    }    .sidebar nav a {        padding: 8px;    }    .sidebar nav a svg {        width: 24px;        height: 24px;    }    .content-container {        padding: 10px;    }    .editor-cards {        grid-template-columns: 1fr; /* 单列显示 */        gap: 12px;    }    .card {        padding: 16px;    }    .settings-form {        padding: 12px;        width: calc(100% - 20px);    }        /* 调整文件详情界面中项目间距 */    .file-details-modal .detail-item {        margin-bottom: 3px;        padding: 4px 0;    }    .file-details-modal .modal-close-btn {        top: 12px;        right: 12px;        width: 36px;        height: 36px;        background-color: transparent;        box-shadow: none;    }    .file-details-modal .modal-close-btn svg {        width: 24px;        height: 24px;    }}

.error-message {
    text-align: center;
    padding: 20px;
    color: #e53935;
}

.error-message button {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.error-message button:hover {
    background-color: #1976d2;
}

/* Common styles */
.setting-group {
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
    padding-top: 16px;
}

.setting-group h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--text-color);
}

.hint-text {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    line-height: 1.4;
}

/* Token specific styles */
.token-field {
    display: flex;
    flex: 1;
    position: relative;
    margin-right: 12px;
}

.token-field input {
    flex: 1;
    padding: 10px 40px 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: monospace;
    transition: border-color 0.3s;
}

.token-field input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.token-field input::placeholder {
    color: #999;
}

.icon-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #666;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.icon-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.icon-btn.active {
    background: var(--primary-color);
    color: white;
}

.action-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    font-weight: 500;
    white-space: nowrap;
}

.action-btn:hover {
    background: #1976d2;
}

.action-btn:active {
    transform: translateY(1px);
}

.action-btn.loading {
    opacity: 0.8;
    cursor: wait;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .setting-item {
        flex-direction: column;
        align-items: stretch;
    }

    .token-field {
        margin-right: 0;
        margin-bottom: 12px;
    }

    /* 选择器样式 */
    .setting-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .setting-item label {
        min-width: 40px;
        margin-right: 10px;
        flex-shrink: 0;
        font-weight: 500;
    }
}

@media (max-width: 480px) {
    .radio-group {
        width: auto;
    }

    .radio-label {
        width: 30px;
        height: 30px;
    }

    .radio-label svg {
        width: 16px;
        height: 16px;
    }

    .setting-item label {
        min-width: 36px;
        font-size: 14px;
        margin-right: 6px;
    }

    .setting-item {
        margin-bottom: 16px;
    }
}

/* Ensure dark mode compatibility - add theme attribute handling */
html[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --border-color: #333;
    --hover-color: #2a2a2a;
}

@-moz-document url-prefix() {
    select {
        color: var(--text-color);
        background-color: var(--bg-color);
    }

    select option {
        color: var(--text-color);
        background-color: var(--bg-color);
    }
}

/* 添加深色主题变量 */
html.dark-theme {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --border-color: #333333;
    --hover-color: #2a2a2a;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* 主题过渡效果 */
.theme-transition {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-transition * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 表单控件样式 - 确保在深色模式正常显示 */
select {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    padding-right: 30px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(128, 128, 128, 0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

/* 添加 loading 状态样式 */
select.loading {
    opacity: 0.7;
    cursor: wait;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(128, 128, 128, 0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83'%3E%3Canimate attributeName='stroke-dasharray' values='0 80;40 40;80 0' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-80;-80' dur='1.5s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
}

/* Toast 提示样式 */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    padding: 10px 16px;
    margin-top: 10px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.toast.success {
    background-color: #4caf50;
}

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

.toast.hide {
    animation: slideOut 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* 选择器样式 */
.radio-group {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--hover-color);
    border: 1px solid var(--border-color);
    padding: 0;
    width: max-content;
    position: relative;
    margin-left: auto;
}

/* 添加滑块效果 */
.theme-selector .radio-group .slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(33.33% - 4px);
    height: calc(100% - 8px);
    background-color: var(--bg-color);
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 0;
    pointer-events: none; /* 确保滑块不会干扰点击 */
}

/* 滑块位置 - 根据选中的选项移动 */
.theme-selector .radio-group input[type="radio"]:nth-of-type(1):checked ~ .slider {
    transform: translateX(0);
}

.theme-selector .radio-group input[type="radio"]:nth-of-type(2):checked ~ .slider {
    transform: translateX(100%);
}

.theme-selector .radio-group input[type="radio"]:nth-of-type(3):checked ~ .slider {
    transform: translateX(200%);
}

.radio-option {
    position: relative;
    margin: 0;
    padding: 0;
    display: flex;
    z-index: 1; /* 确保在动画层上方 */
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    -webkit-appearance: none; /* iOS 支持 */
    appearance: none;
}

/* 标签样式 */
.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

/* 选中状态效果 */
.radio-option input[type="radio"]:checked + .radio-label {
    background-color: var(--bg-color);
}

.radio-option input[type="radio"]:checked + .radio-label svg {
    stroke-width: 2px;
    transform: scale(1.1); /* 保留图标轻微放大效果 */
}

/* 活跃状态 */
.radio-label.active-theme svg {
    stroke-width: 2.5px;
}

/* 移除editor选项的粗线条效果 */
.editor-radio-group .radio-label svg {
    stroke-width: 2px;
}

/* 确保选中状态统一 */
.editor-radio-group .radio-option:nth-child(2) .radio-label svg {
    stroke-width: 2px !important;
}

/* 确保Code编辑器图标的stroke-width为2 */
.editor-radio-group .radio-option input[type="radio"]:checked + .radio-label svg {
    stroke-width: 2px;
    transform: scale(1.1); /* 保留图标轻微放大效果 */
}

/* 点击动画 */
.radio-label.radio-clicked {
    animation: pulse 0.3s cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1.05); }
}

/* 添加触摸反馈 */
.radio-option input[type="radio"]:active + .radio-label {
    transform: scale(0.95); /* 按下时缩小效果 */
}

/* 图标样式 */
.radio-label svg {
    transition: all 0.2s ease;
    stroke-width: 2px;
    width: 18px;
    height: 18px;
}

/* iOS 特定优化 */
@supports (-webkit-touch-callout: none) {
    .radio-group, .radio-label {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .radio-label {
        overflow: hidden;
    }

    .radio-label svg {
        max-width: 18px;
        max-height: 18px;
    }
}

/* 移动端适配 */
@media (max-width: 480px) {
    .radio-label {
        width: 30px;
        height: 30px;
    }

    .radio-label svg {
        width: 16px;
        height: 16px;
    }

    /* 确保标签更紧凑 */
    .setting-item.theme-selector label,
    .setting-item.editor-selector label {
        min-width: 36px;
        font-size: 14px;
        margin-right: 6px;
    }

    /* 存储管理移动端适配 */
    .content-wrapper {
        padding: 0; /* 移动端上减少内边距 */
    }

    .section-header {
        padding: 10px; /* 移动端上减少头部内边距 */
        flex-wrap: nowrap; /* 不允许换行，保持在一条直线上 */
        gap: 8px;
        justify-content: space-between; /* 确保左右对齐 */
        align-items: center; /* 垂直居中 */
    }

    .header-left {
        flex-wrap: nowrap; /* 不允许换行 */
        gap: 8px;
        width: auto; /* 自动宽度，而不是100% */
        flex: 1; /* 占用可用空间 */
    }

    .header-right {
        flex-shrink: 0; /* 防止被压缩 */
    }

    .header-left h2 {
        font-size: 16px;
    }

    .search-box {
        width: 140px; /* 移动端上设置固定宽度 */
        max-width: none;
        margin-top: 0; /* 移除上边距 */
    }

    .search-box input {
        height: 26px; /* 移动端上减小高度 */
        padding: 0 8px 0 32px; /* 增加左侧内边距，确保文字起始位置在图标之后 */
        font-size: 12px;
    }

    .view-toggle {
        margin-left: 8px; /* 添加左边距，与搜索框保持间距 */
    }

    .view-btn {
        width: 28px; /* 减小按钮宽度 */
        height: 26px; /* 减小按钮高度 */
        padding: 4px; /* 减小内边距 */
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* 移动端上调整网格项宽度 */
        gap: 12px; /* 调整间距 */
        padding: 12px; /* 移动端上减小内边距 */
    }

    .grid-item {
        height: 140px; /* 移动端上减小高度 */
        padding: 12px; /* 移动端上减小内边距 */
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* 内容从顶部开始排列 */
        border-radius: 12px; /* 增大圆角，更现代 */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); /* 增强阴影效果 */
    }

    .grid-item .file-icon {
        font-size: 24px; /* 减小图标大小 */
        margin-bottom: auto; /* 自动计算底部边距，将图标推到顶部 */
        margin-top: 24px; /* 增加上边距，使图标下移，避免与操作按钮平行 */
    }

    .grid-item .file-name {
        font-size: 12px;
        margin-bottom: 4px;
        -webkit-line-clamp: 1; /* 只显示一行 */
        margin-top: auto; /* 自动计算上边距，将文件名推到底部 */
        text-align: center; /* 居中对齐 */
    }

    .grid-item .file-meta {
        font-size: 10px;
        margin-bottom: 2px;
        padding: 3px 6px; /* 减小内边距 */
        background-color: rgba(0, 0, 0, 0.04); /* 增强背景色 */
        border-radius: 4px; /* 添加圆角 */
        text-align: center; /* 居中对齐 */
    }

    /* 移动端上的网格操作按钮 */
    .grid-item .grid-action-btn {
        width: 24px;
        height: 24px;
        opacity: 1; /* 移动端上始终显示 */
        top: 6px;
        right: 6px;
    }

    .list-header,
    .list-item {
        padding: 6px 10px; /* 移动端上减小列表项内边距 */
        grid-template-columns: 2fr 1fr 1fr 32px; /* 移动端上调整列宽度 */
    }

    .list-item .action-btn,
    .grid-item .action-btn {
        opacity: 1; /* 移动端上始终显示操作按钮，因为没有悬停效果 */
        width: 20px;
        height: 20px;
    }

    .list-item .action-btn svg,
    .grid-item .action-btn svg {
        width: 14px;
        height: 14px;
    }

    .storage-table th,
    .storage-table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    /* 隐藏表格视图中的某些列 */
    .storage-table th:nth-child(2),
    .storage-table td:nth-child(2),
    .storage-table th:nth-child(4),
    .storage-table td:nth-child(4) {
        display: none;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .page-buttons {
        align-self: center;
    }
}

/* 用户信息区域样式 */
.user-profile {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
    transition: background-color 0.3s ease;
}

.user-profile:hover {
    background-color: var(--hover-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--hover-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0; /* 确保文本可以进行省略 */
}

.username {
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 添加 sidebar-footer 的基本样式定位 */
.sidebar-footer {
    margin-top: auto;
    margin-bottom: 10%; /* 添加底部边距，让退出登录按钮完全可见 */
    display: flex;
    flex-direction: column;
}

.sidebar-footer .logout-link {
    padding: 12px 20px;
    color: #e53935;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-footer .logout-link:hover {
    background: rgba(229, 57, 53, 0.1);
    border-left-color: #e53935;
}

.sidebar-footer .logout-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .sidebar-footer {
        border-top: none;
        border-left: 1px solid var(--border-color);
        padding: 0;
        display: flex;
        align-items: center;
        margin-top: 0;
        margin-bottom: 0; /* 重置桌面端的底部边距 */
        flex-direction: row; /* 在移动端恢复为横向布局 */
    }

    /* 其他移动端样式保持不变 */
}

@media (max-width: 480px) {
    .user-info {
        display: none;
    }

    .user-profile {
        padding: 8px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .sidebar-footer .logout-link .nav-text {
        display: none;
    }

    .sidebar-footer .logout-link {
        padding: 8px;
    }

    .sidebar-footer .logout-link svg {
        width: 24px;
        height: 24px;
    }
}

/* Token field interactive styling */
.token-interactive {
    transition: all 0.3s ease;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--text-color);
    font-family: monospace;
    position: relative;
}

.token-interactive:hover {
    border-color: var(--primary-color);
    background-color: rgba(33, 150, 243, 0.05);
}

.token-interactive.loading {
    background-image: linear-gradient(90deg, 
        var(--bg-color) 0%, 
        rgba(33, 150, 243, 0.1) 50%, 
        var(--bg-color) 100%);
    background-size: 200% 100%;
    animation: loading-animation 1.5s infinite linear;
}

.token-interactive.flash {
    animation: flash-animation 0.6s ease;
}

@keyframes loading-animation {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@keyframes flash-animation {
    0% { background-color: var(--bg-color); }
    30% { background-color: rgba(33, 150, 243, 0.2); }
    100% { background-color: var(--bg-color); }
}

/* 模态框样式 */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 0 16px; /* Add horizontal padding to the container */
    box-sizing: border-box;
}

.modal-container.visible {
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background-color: var(--bg-color);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.modal-container.visible .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.modal-close-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

.modal-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border-color);
}

.modal-action-btn {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-action-btn:hover {
    background-color: #1976d2;
}

.modal-close-action-btn {
    padding: 8px 16px;
    background-color: var(--hover-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-close-action-btn:hover {
    background-color: #e0e0e0;
}

.dark-theme .modal-close-action-btn:hover {
    background-color: #333;
}

/* 文件详情样式 */
.file-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-label {
    width: 80px;
    flex-shrink: 0;
    font-weight: 500;
    color: #666;
}

.dark-theme .detail-label {
    color: #aaa;
}

.detail-value {
    flex: 1;
    word-break: break-word;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .modal-container {
        padding: 0 16px; /* Explicit horizontal padding for mobile */
    }
    
    .file-details-modal {
        width: 100%; /* Full width of the container */
        padding: 20px 24px;
        border-radius: 10px;
    }
    
    .detail-label, .detail-value {
        font-size: 14px;
    }
    
    .file-details-content {
        gap: 4px;
    }
    
    .details-column {
        gap: 8px;
        padding: 0 2px;
    }
    
    .file-details-modal .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        background-color: transparent;
        box-shadow: none;
    }
    
    .file-details-modal .modal-close-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .file-title {
        padding: 0 12px;
        max-width: 94%;
        font-size: 16px;
    }
}

/* 文件详情模态框样式 */
.file-details-modal {    padding: 28px 32px;    max-width: 500px;    width: 100%; /* Change from percentage to full width */    position: relative;    border-radius: 12px;    box-sizing: border-box;    overflow-y: auto; /* 确保内容可滚动 */}

.file-details-modal .modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: transparent;
    box-sizing: border-box;
    border-radius: 50%;
    color: var(--text-color);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.file-details-modal .modal-close-btn svg {
    width: 24px;
    height: 24px;
}

.file-details-modal .modal-close-btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    opacity: 1;
}

.file-details-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
    text-align: center;
}

.file-icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 88px;
    height: 88px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.file-icon-container svg {
    width: 64px;
    height: 64px;
}

.file-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    max-width: 100%;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 20px;
}

.file-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.details-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
    font-size: 13px;
}

.detail-value {
    word-break: break-word;
    color: var(--text-color);
}

.dark-theme .detail-label {
    color: #aaa;
}

/* 移动端适配 */
@media (max-width: 600px) {    .file-details-content {        grid-template-columns: 1fr;        gap: 10px;    }        .file-details-modal {        padding: 20px;    }        .file-icon-container {        width: 64px;        height: 64px;        margin-bottom: 12px;    }        .file-icon-container svg {        width: 48px;        height: 48px;    }        .file-title {        font-size: 18px;    }        .detail-item {        margin-bottom: 6px;    }}

@media (max-width: 480px) {    .detail-value {        font-size: 14px;    }        .file-details-modal {        width: 100%; /* Full width of the container */        padding: 20px 24px;        border-radius: 10px;        margin: 0 auto;    }        /* 调整文件详情中各项的间距 */    .file-details-content {        gap: 6px;    }        .details-column {        gap: 4px;    }        .detail-item {        margin-bottom: 2px;    }        .detail-label {        margin-bottom: 2px;    }}

/* 移动端适配 */
@media (max-width: 600px) {
    .file-details-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .file-details-modal {
        width: 92%;
        padding: 24px;
        max-height: 85vh;
    }
    
    .file-icon-container {
        width: 72px;
        height: 72px;
        margin-bottom: 16px;
    }
    
    .file-icon-container svg {
        width: 56px;
        height: 56px;
    }
    
    .file-title {
        font-size: 18px;
        max-width: 90%;
    }
    
    .file-details-header {
        margin-bottom: 24px;
    }
    
    .detail-item {
        margin-bottom: 2px;
        padding: 8px 0;
    }
    
    .detail-label {
        margin-bottom: 2px;
    }
}

@media (max-width: 480px) {
    .file-details-modal {
        width: 88%;
        padding: 20px 24px;
        border-radius: 10px;
        margin: 0 auto;
    }
    
    .detail-label, .detail-value {
        font-size: 14px;
    }
    
    .file-details-content {
        gap: 4px;
    }
    
    .details-column {
        gap: 8px;
        padding: 0 2px;
    }
    
    .file-details-modal .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        background-color: transparent;
        box-shadow: none;
    }
    
    .file-details-modal .modal-close-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .file-title {
        padding: 0 12px;
        max-width: 94%;
        font-size: 16px;
    }
}