* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f0f0;
}

header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.breadcrumb {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    margin-right: 5px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #666;
    margin: 0 5px;
}

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.view-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.view-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.view-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.file-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.file-item.list-view {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 15px 20px;
}

.file-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.list-view .file-icon {
    font-size: 32px;
    margin-bottom: 0;
    margin-right: 15px;
}

.file-name {
    font-size: 14px;
    color: #333;
    word-break: break-word;
    font-weight: 500;
}

.list-view .file-name {
    flex: 1;
    margin-right: 15px;
}

.file-size {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.list-view .file-size {
    margin-top: 0;
    min-width: 80px;
    text-align: right;
}

.folder-item {
    background: #fff3cd;
    border-color: #ffc107;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #667eea;
}

/* 下载按钮 */
.download-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #5568d3;
}

/* Google Drive 标识 */
.google-drive-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #4285F4;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 5px;
    vertical-align: middle;
}

.file-item.google-drive-file {
    border-color: #4285F4;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f0fe 100%);
}

.file-item.google-drive-file .file-name::after {
    content: '☁️';
    margin-left: 5px;
}

/* Toast 提示 */
.toast {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}
