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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.header .description {
    color: #666;
    font-size: 0.95rem;
    margin-top: 8px;
}

/* Breadcrumb */
.breadcrumb {
    background: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: #0066cc;
    cursor: pointer;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: #004499;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
    margin: 0 8px;
}

/* File list container */
.file-browser {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* File items */
.file-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

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

.file-item:hover {
    background: #f8f9fa;
}

.file-item.folder:hover {
    background: #e8f4ff;
}

.file-icon {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder .file-name {
    font-weight: 500;
    color: #0066cc;
}

.file-size {
    color: #666;
    font-size: 0.85rem;
    margin-left: 12px;
}

/* Loading state */
.loading {
    padding: 40px;
    text-align: center;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Error state */
.error {
    background: #fee;
    color: #c00;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

/* Empty folder */
.empty-message {
    padding: 40px;
    text-align: center;
    color: #999;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .file-item {
        padding: 10px 15px;
    }

    .file-size {
        display: none;
    }
}
