/* ==================== 全局重置 & 高分屏适配 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: #ffffff;
    color: #202124;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 高分屏字体渲染优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body { font-size: 16px; }
    .logo { font-size: 2.8rem; }
    .search-bar-wrapper { height: 58px; } /* 稍微加大输入框 */
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    padding: 0 24px;
    margin-bottom: 24px;
    gap: 20px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4285f4;
    letter-spacing: -1px;
    margin: 0;
}
.logo i { color: #1a73e8; }

.header-actions {
    margin-top: 8px;
}

/* ==================== Hero 区域 ==================== */
.search-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
    background: #fff;
}

/* ==================== Google 风格搜索框 ==================== */
.search-bar-container {
    width: 100%;
    max-width: 680px;
    padding: 0 16px;
    margin: 0 auto;
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    height: 54px;
    background: #fff;
    border: 1px solid #dfe1e5;
    border-radius: 27px;
    box-shadow: none;
    transition: all 0.2s ease-in-out;
}
.search-bar-wrapper:hover,
.search-bar-wrapper:focus-within {
    background-color: #fff;
    box-shadow: 0 1px 6px rgba(32,33,36,0.28);
    border-color: rgba(223,225,229,0);
}

.search-icon-leading {
    padding-left: 20px;
    color: #9aa0a6;
    font-size: 1.1rem;
}

#searchInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 16px;
    font-size: 16px;
    color: #202124;
    height: 100%;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 12px;
    color: #5f6368;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    height: 100%;
    transition: color 0.2s;
}
.icon-btn:hover { color: #202124; }

.divider {
    width: 1px;
    height: 28px;
    background-color: #dfe1e5;
    margin: 0 4px;
}

.upload-btn {
    color: #5f6368;
}
.upload-btn:hover {
    color: #1967d2;
    background-color: rgba(66, 133, 244, 0.04);
    border-radius: 50%;
    width: 40px; 
    height: 40px;
    padding: 0;
    justify-content: center;
    margin-right: 4px;
}

.search-submit-btn {
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-right: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.search-submit-btn:hover {
    background-color: #3367d6;
}

.search-options {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    color: #5f6368;
    font-size: 0.9rem;
}
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}
.checkbox-label:hover {
    background-color: rgba(66, 133, 244, 0.08);
}
.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4285f4;
    cursor: pointer;
}
.checkbox-label span {
    user-select: none;
}

/* ==================== 主内容区（宽屏自适应） ==================== */
#mainContent {
    width: 100%;
    max-width: 1200px; /* 宽屏拉宽到 1200px */
    margin: 0 auto;
    padding: 0 30px 40px;
}

.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #202124;
}

.results-stats {
    font-size: 1rem;
    font-weight: 500;
    color: #5f6368;
    margin: 0;
    padding: 0;
}

.results-stats strong {
    font-weight: 600;
    color: #202124;
}

/* ==================== 历史标签 ==================== */
.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
.history-tag {
    background: #f8f9fa;
    color: #3c4043;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid #dadce0;
    font-family: 'Google Sans', Arial, sans-serif;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.history-tag:hover {
    background: #e8eaed;
    border-color: #d2e3fc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.history-tag::before {
    content: '🕐';
    font-size: 0.8rem;
}

/* ==================== 结果项（保留原表格样式 + 增强） ==================== */
.result-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}
.result-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.result-item__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.result-item__header .button {
    padding: 8px;
    min-width: 36px;
    justify-content: center;
}
.result-item__icon { font-size: 1.2rem; }
.result-item__title {
    font-weight: 600;
    font-size: 1.15rem;
    margin-right: auto;
    word-break: break-all;
}
.badge {
    background: #e8f0fe;
    color: #1967d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

.match-snippet {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 4px solid #4285f4;
    font-size: 0.95rem;
    line-height: 1.5;
}

.sheet-name {
    font-weight: 600;
    margin: 16px 0 12px;
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

/* 🎨 现代化表格样式设计 🎨 */
.result-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-height: 600px; /* 最大高度限制 */
    overflow-y: auto; /* 垂直滚动 */
    scrollbar-width: thin; /* 细线滚动条 */
    scrollbar-color: #4285f4 #f0f4f8; /* 滚动条颜色 */
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-table-wrapper:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* 滚动条美化 */
.result-table-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.result-table-wrapper::-webkit-scrollbar-track {
    background: #f0f4f8;
    border-radius: 8px;
}

.result-table-wrapper::-webkit-scrollbar-thumb {
    background: #4285f4;
    border-radius: 8px;
    border: 2px solid #f0f4f8;
}

.result-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #3367d6;
}

.result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    min-width: 600px; /* 防止表格过窄 */
    table-layout: auto; /* 自动布局，根据内容调整列宽 */
}

.result-table th,
.result-table td {
    padding: 14px 18px;
    text-align: left;
    vertical-align: middle;
    white-space: normal; /* 允许文本自动换行 */
    word-wrap: break-word; /* 长单词换行 */
    border-bottom: 1px solid #e8eaed;
    border-right: 1px solid #e8eaed;
    transition: all 0.2s ease;
}

.result-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #202124;
    position: sticky;
    top: 0;
    z-index: 10;
    position: relative;
    padding-right: 30px; /* 为调整手柄留出空间 */
    min-width: 100px; /* 最小列宽 */
    white-space: nowrap; /* 表头文本不换行 */
    background-clip: padding-box; /* 防止边框重叠 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.result-table th:first-child {
    border-top-left-radius: 12px;
}

.result-table th:last-child {
    border-top-right-radius: 12px;
    border-right: none;
}

.result-table td:first-child {
    font-weight: 500;
    color: #202124;
}

.result-table td:last-child {
    border-right: none;
}

/* 表头内容容器 */
.th-content {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 列宽调整手柄 */
.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    background-color: transparent;
    transition: all 0.2s ease;
    z-index: 2;
    border-right: 2px solid transparent;
}

.resize-handle:hover {
    background-color: rgba(66, 133, 244, 0.1);
    border-right-color: #4285f4;
}

.resize-handle:active {
    background-color: rgba(66, 133, 244, 0.2);
    border-right-color: #3367d6;
}

/* 触摸设备上的调整手柄 */
@media (hover: none) and (pointer: coarse) {
    .resize-handle {
        width: 16px;
    }
}

/* 表格行样式 */
.result-table tbody tr {
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
}

.result-table tbody tr:hover {
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.1);
    border-left-color: #4285f4;
}

/* 交替行颜色 */
.result-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.result-table tbody tr:nth-child(even):hover {
    background: #f8f9ff;
}

/* 表格底部圆角 */
.result-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.result-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* 合并单元格样式 */
.result-table th[colspan],
.result-table th[rowspan],
.result-table td[colspan],
.result-table td[rowspan] {
    background: #f8f9ff;
    font-weight: 500;
    box-shadow: inset 0 0 0 1px rgba(66, 133, 244, 0.1);
}

/* 高亮文本 */
mark {
    background-color: #fff176;
    color: #000;
    border-radius: 3px;
    padding: 0 4px;
    font-weight: 500;
}

/* ==================== 文件列表样式 ==================== */
.section-header {
    cursor: pointer;
    transition: all 0.2s ease;
}

.section-header:hover {
    opacity: 0.8;
}

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

.section-header-actions .button {
    padding: 8px;
    min-width: 36px;
    justify-content: center;
}

.file-list {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-list-header {
    display: grid;
    grid-template-columns: 1fr 100px 100px 180px 120px;
    gap: 12px;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 14px;
}

.file-list-header-item {
    display: flex;
    align-items: center;
}

.file-list-header-name {
    grid-column: 1;
}

.file-list-header-type {
    grid-column: 2;
}

.file-list-header-size {
    grid-column: 3;
}

.file-list-header-date {
    grid-column: 4;
}

.file-list-header-actions {
    grid-column: 5;
    text-align: center;
}

.file-list-body {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.file-list-body::-webkit-scrollbar {
    width: 6px;
}

.file-list-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.file-list-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.file-list-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.file-list-item {
    display: grid;
    grid-template-columns: 1fr 100px 100px 180px 120px;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.file-list-item:hover {
    background: #f8fafc;
    transform: translateX(2px);
}

.file-list-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-list-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ffffff;
    flex-shrink: 0;
}

.file-list-item-icon--excel { background: linear-gradient(135deg, #107c10, #38b000); }
.file-list-item-icon--word { background: linear-gradient(135deg, #0078d4, #2b88d8); }
.file-list-item-icon--pdf { background: linear-gradient(135deg, #d83b01, #ff6b35); }
.file-list-item-icon--other { background: linear-gradient(135deg, #6f42c1, #8a5cf6); }

.file-list-item-name {
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list-item-type,
.file-list-item-size,
.file-list-item-date {
    font-size: 14px;
    color: #64748b;
}

.file-list-item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.icon-button {
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    font-size: 14px;
}

.icon-button:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.icon-button--danger:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* ==================== 按钮通用样式 ==================== */
.button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.button--outline {
    background: transparent;
    border: 1px solid var(--c-border, #ddd);
    color: var(--c-text-light, #555);
}
.button--outline:hover {
    border-color: #4285f4;
    color: #4285f4;
    background: #e8f0fe;
}
.button--sm {
    padding: 6px 14px;
    font-size: 0.88rem;
}
.button--danger {
    background-color: #f44336;
    color: white;
}
.button--danger:hover {
    background-color: #d32f2f;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: #757575;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.icon-button:hover {
    background: #f1f1f1;
    color: #202124;
}
.icon-button--danger:hover {
    background: #ffebee;
    color: #d32f2f;
}

/* ==================== 加载遮罩 ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}
.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4285f4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 10px;
    background: #323232;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    z-index: 1000;
    animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-out 3s forwards;
}
.toast.success { background: #4caf50; }
.toast.error { background: #f44336; }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateX(100%); }
}

/* ==================== 现代模态框 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 36px;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    position: relative;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: #202124;
}

.modal-content p {
    font-size: 1.05rem;
    color: #5f6368;
    line-height: 1.7;
    margin-bottom: 28px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 28px;
}

.modal-actions .button {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: #757575;
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #e0e0e0;
}
.empty-state p {
    font-size: 1.1rem;
    margin-top: 12px;
}

/* ==================== 头部操作区 ==================== */
.header-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    justify-content: flex-end;
    padding: 0;
    background: transparent;
    border: none;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.user-info span {
    font-weight: 500;
    color: #202124;
}

#logoutBtn {
    padding: 6px;
    min-width: 32px;
    justify-content: center;
    background: transparent;
    border: none;
    color: #5f6368;
    transition: color 0.2s;
}

#logoutBtn:hover {
    color: #202124;
    background: #f1f3f4;
}

/* ==================== 认证模态框 ==================== */
.auth-modal-content {
    max-width: 420px;
    padding: 32px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #202124;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #5f6368;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f1f3f4;
    color: #202124;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #e8eaed;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #5f6368;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: #202124;
}

.auth-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #5f6368;
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.button--full {
    width: 100%;
}

/* ==================== 权限选择 ==================== */
.permission-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.permission-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.permission-option:hover {
    border-color: #d2e3fc;
    background: #f8f9fa;
}

.permission-option input[type="radio"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    accent-color: #1a73e8;
}

.permission-option-content {
    display: flex;
    gap: 12px;
    flex: 1;
}

.permission-option-content i {
    font-size: 1.5rem;
    color: #5f6368;
}

.permission-option-text {
    flex: 1;
}

.permission-option-title {
    font-weight: 600;
    color: #202124;
    margin-bottom: 4px;
}

.permission-option-desc {
    font-size: 0.9rem;
    color: #5f6368;
    line-height: 1.4;
}

/* ==================== 文件列表扩展 ==================== */
.file-list-header-owner,
.file-list-header-permission {
    flex: 0 0 100px;
}

.file-list-item-owner,
.file-list-item-permission {
    flex: 0 0 100px;
    font-size: 0.9rem;
    color: #5f6368;
}

.file-list-item-permission {
    display: flex;
    align-items: center;
    gap: 4px;
}

.file-list-item-permission i {
    font-size: 0.9rem;
}

.file-list-item-permission i.fa-globe {
    color: #1a73e8;
}

.file-list-item-permission i.fa-lock {
    color: #fbbc05;
}

/* ==================== 手机端彻底优化 ==================== */
@media (max-width: 768px) {
    /* 简化头部操作 */
    .header-actions {
        padding: 0;
        background: transparent;
        border: none;
        justify-content: flex-end;
        gap: 8px;
        margin: 0;
        align-items: flex-start;
    }

    .hero-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding: 0 16px;
        margin-bottom: 16px;
        width: 100%;
    }

    .logo {
        font-size: 1.8rem;
        margin: 0;
        align-self: center;
    }

    .header-actions {
        margin: 0;
        align-self: flex-end;
        align-items: flex-start;
    }

    .header-actions .button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .user-info {
        gap: 8px;
    }

    .user-info span {
        font-size: 0.85rem;
    }

    #logoutBtn {
        padding: 6px;
        min-width: 28px;
    }

    .logo {
        font-size: 1.8rem;
        margin-bottom: 16px;
    }

    /* 简化Hero区域 */
    .search-hero {
        padding-top: 20px;
        padding-bottom: 20px;
        min-height: auto;
    }

    /* 紧凑搜索栏 */
    .search-bar-container {
        padding: 0 12px;
        max-width: 100%;
    }

    .search-bar-wrapper {
        height: 44px;
        border-radius: 22px;
    }

    .search-icon-leading {
        padding-left: 16px;
        font-size: 1rem;
    }

    #searchInput {
        padding: 0 12px;
        font-size: 14px;
    }

    .icon-btn {
        padding: 0 8px;
        font-size: 1rem;
    }

    .divider {
        height: 24px;
    }

    .search-submit-btn {
        width: 36px;
        height: 36px;
        margin-right: 6px;
    }

    /* 简化搜索选项 */
    .search-options {
        margin-top: 12px;
        font-size: 0.85rem;
    }

    .checkbox-label {
        padding: 6px 12px;
        gap: 6px;
    }

    /* 主内容区 */
    #mainContent {
        padding: 0 12px 20px;
        max-width: 100%;
    }

    .section {
        margin-bottom: 24px;
    }

    .section-header {
        margin-bottom: 12px;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    /* 简化文件列表 */
    .file-list {
        margin-top: 12px;
    }

    .file-list-header {
        display: none; /* 隐藏表头，使用更简单的移动布局 */
    }

    .file-list-item {
        display: block;
        padding: 12px;
        border-bottom: 1px solid #f1f5f9;
    }

    .file-list-item-content {
        margin-bottom: 8px;
    }

    .file-list-item-name {
        font-size: 1rem;
        font-weight: 500;
    }

    /* 移动文件信息行 */
    .file-list-item-type,
    .file-list-item-size,
    .file-list-item-owner,
    .file-list-item-permission {
        display: inline-block;
        font-size: 0.8rem;
        color: #64748b;
        margin-right: 12px;
        margin-bottom: 4px;
        padding: 2px 6px;
        background: #f1f5f9;
        border-radius: 4px;
    }

    .file-list-item-actions {
        margin-top: 8px;
        justify-content: flex-start;
    }

    .icon-button {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    /* 简化结果项 */
    .result-item {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 8px;
    }

    .result-item__header {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
        align-items: center;
    }

    .result-item__icon {
        flex: 0 0 auto;
        font-size: 1.1rem;
    }

    .result-item__title {
        font-size: 1rem;
        flex: 1 1 auto;
        margin-right: 0;
        min-width: 0;
    }

    .badge {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-width: auto;
    }

    .result-item__header .button {
        padding: 6px;
        font-size: 0.8rem;
        min-width: 32px;
        justify-content: center;
    }

    /* 简化历史标签 */
    .history-list {
        padding: 12px;
        gap: 8px;
    }
    
    .history-tag {
        padding: 6px 12px;
        font-size: 0.85rem;
        border-radius: 16px;
    }
    
    .history-tag::before {
        font-size: 0.7rem;
    }

    /* 简化表格 */
    .result-table-wrapper {
        margin: 0 -12px 16px;
        padding: 0 12px;
        max-height: 300px;
        border-radius: 6px;
    }

    .result-table {
        min-width: 600px;
        font-size: 0.75rem;
    }

    .result-table th,
    .result-table td {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .result-table th {
        padding-right: 20px;
        min-width: 60px;
        font-size: 0.7rem;
    }

    .sheet-name {
        font-size: 0.9rem;
        margin: 12px 0 8px;
    }

    /* 简化模态框 */
    .modal-content {
        padding: 20px 16px;
        margin: 12px;
        border-radius: 12px;
    }

    .modal-content h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .modal-content p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 8px;
    }

    .modal-actions .button {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }

    /* 简化Toast */
    .toast {
        top: 60px;
        right: 12px;
        left: 12px;
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    /* 简化权限选择 */
    .permission-option {
        padding: 12px;
        gap: 8px;
    }

    .permission-option-content {
        gap: 8px;
    }

    .permission-option-content i {
        font-size: 1.2rem;
    }

    .permission-option-title {
        font-size: 0.95rem;
    }

    .permission-option-desc {
        font-size: 0.8rem;
    }

    /* 触摸设备优化 */
    @media (hover: none) and (pointer: coarse) {
        /* 增大触摸目标 */
        .icon-button,
        .button,
        .modal-close,
        .auth-tab,
        .permission-option {
            min-height: 44px;
        }

        /* 表格触摸优化 */
        .result-table-wrapper {
            scrollbar-width: thin;
            scrollbar-color: #4285f4 #f0f4f8;
        }

        .result-table tbody tr {
            transition: all 0.15s ease;
        }

        .result-table tbody tr:active {
            background: #f8f9ff;
            transform: translateY(-1px);
        }
    }
}

/* ==================== 超宽屏优化 (>=1920px) ==================== */
@media (min-width: 1920px) {
    #mainContent {
        max-width: 1400px;
        padding: 0 40px 50px;
    }

    .result-table {
        font-size: 1rem;
    }

    .result-table th,
    .result-table td {
        padding: 14px 20px;
    }

    .file-list-header,
    .file-list-item {
        grid-template-columns: 1fr 120px 120px 200px 140px;
        gap: 16px;
    }
    
    .file-list-header-item {
        font-size: 15px;
    }
    
    .file-list-item-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .file-list-item-name {
        font-size: 15px;
    }
    
    .file-list-item-type,
    .file-list-item-size,
    .file-list-item-date {
        font-size: 15px;
    }
    
    .icon-button {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }
}

/* ==================== 4K 超高分屏优化 (>=2560px) ==================== */
@media (min-width: 2560px) {
    #mainContent {
        max-width: 1600px;
        padding: 0 60px 60px;
    }

    .logo { font-size: 3.2rem; }

    .search-bar-container { max-width: 800px; }

    .search-bar-wrapper { height: 64px; }

    .result-item {
        padding: 32px;
        font-size: 1.05rem;
    }

    .result-item__title { font-size: 1.25rem; }

    .result-table {
        font-size: 1.05rem;
    }

    .result-table th,
    .result-table td {
        padding: 16px 24px;
    }

    .file-list-header,
    .file-list-item {
        grid-template-columns: 1fr 140px 140px 240px 160px;
        gap: 20px;
    }
    
    .file-list-header-item {
        font-size: 16px;
    }
    
    .file-list-item-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .file-list-item-name {
        font-size: 16px;
    }
    
    .file-list-item-type,
    .file-list-item-size,
    .file-list-item-date {
        font-size: 16px;
    }
    
    .icon-button {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .button {
        padding: 12px 26px;
        font-size: 1.05rem;
    }
}
