* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #5d92ec 0%, #fad7a0 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 28px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.path-info {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.path-segment {
    display: inline-flex;
    align-items: center;
}

.path-segment a {
    color: white;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.path-segment a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.path-info .fa-chevron-right {
    margin: 0 8px;
    font-size: 12px;
    opacity: 0.7;
}

main {
    background-color: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background-color: #f8fafc;
    border-bottom: 1px solid #eaeaea;
}

.file-stats {
    display: flex;
    gap: 25px;
}

.file-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-weight: 500;
}

.actions button {
    background-color: #4a6ee0;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.actions button:hover {
    background-color: #3a5bc7;
}

.file-list {
    padding: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    cursor: pointer;
}

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

.file-item.selected {
    background-color: #f0f7ff;
}

.file-main {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

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

.file-details {
    display: flex;
    align-items: center;
    gap: 25px;
    color: #777;
    font-size: 14px;
}

/* 文件类型标签样式 */
.file-type-tag {
    background-color: #e8f4ff;
    color: #2d7dd2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 仅保留 file-size 的样式 */
.file-size {
    min-width: 60px; 
    text-align: right;
}

.folder-item .file-info {
    background-color: #e8f4ff;
    color: #2d7dd2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.folder-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.folder-link:hover {
    color: #4a6ee0;
}

.fa-folder {
    color: #ffb347;
    font-size: 20px;
}

.fa-file {
    color: #a0a0a0;
}

.fa-file-pdf {
    color: #e74c3c;
}

.fa-file-word {
    color: #2b579a;
}

.fa-file-excel {
    color: #1d6f42;
}

.fa-file-powerpoint {
    color: #d24726;
}

.fa-file-image {
    color: #9b59b6;
}

.fa-file-archive {
    color: #f39c12;
}

.fa-file-code {
    color: #3498db;
}

.fa-android {
    color: #0DBD1C;
}

.fa-file-alt, .fa-file-audio, .fa-file-video {
    color: #7f8c8d;
}

.fa-level-up-alt {
    color: #3498db;
}

/* LNK文件图标样式 */
.fa-external-link-alt {
    color: #3498db;
}

.empty-folder, .error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #95a5a6;
    text-align: center;
}

.empty-folder i, .error-message i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.error-message i {
    color: #e74c3c;
}

.error-message p {
    color: #e74c3c;
    font-weight: 500;
}

footer {
    text-align: center;
    margin-top: 25px;
    color: #7f8c8d;
    font-size: 14px;
    padding: 15px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.fullscreen .modal-content {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    width: 50%;
    max-width: 90%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-bottom: 1px solid #eaeaea;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: white;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #f0f0f0;
}

.modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

#txtContent {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    max-height: calc(80vh - 140px);
    overflow-y: auto;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 22px;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .file-stats {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-details {
        width: 100%;
        justify-content: space-between;
        margin-left: 35px;
    }
    
    /* 移动端调整 file-size 宽度 */
    .file-size {
        min-width: initial;
        text-align: left;
    }
    
    /* 移动端弹窗样式 */
    .modal-content {
        width: 95%;
        max-height: 95%;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    #txtContent {
        font-size: 13px;
        padding: 8px;
    }
}

@media (orientation: portrait) {
    /* 竖屏时弹窗全屏 */
    .modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}