button, input {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body.light {
    background: #f5f6fa;
    color: #2c3e50;
}

body.dark {
    background: #1a1a1a;
    color: #e0e0e0;
}

.navbar {
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body.light .navbar {
    background: white;
    border-bottom: 1px solid #e1e4e8;
}

body.dark .navbar {
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-info {
    font-size: 0.875rem;
    opacity: 0.7;
}

.theme-toggle {
    padding: 8px 16px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

body.light .theme-toggle {
    background: white;
    color: #2c3e50;
    border-color: #ddd;
}

body.light .theme-toggle:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

body.dark .theme-toggle {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark .theme-toggle:hover {
    background: #333;
    border-color: #5dade2;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.toolbar {
    border: 1px solid;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

body.light .toolbar {
    background: white;
    border-color: #ddd;
}

body.dark .toolbar {
    background: #252525;
    border-color: #404040;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid;
    border-radius: 4px;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.light .search-box input {
    background: white;
    color: #2c3e50;
    border-color: #ddd;
}

body.light .search-box input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

body.dark .search-box input {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark .search-box input:focus {
    border-color: #5dade2;
    box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.1);
}

.loading, .empty-state {
    text-align: center;
    padding: 60px 20px;
    font-size: 1rem;
    opacity: 0.6;
}

.table-container {
    border: 1px solid;
    border-radius: 6px;
    overflow: hidden;
}

body.light .table-container {
    background: white;
    border-color: #e1e4e8;
}

body.dark .table-container {
    background: #252525;
    border-color: #404040;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.light thead {
    background: #f6f8fa;
    color: #586069;
}

body.dark thead {
    background: #2d2d2d;
    color: #8b949e;
}

thead th {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid;
}

body.light thead th {
    border-color: #e1e4e8;
}

body.dark thead th {
    border-color: #404040;
}

tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

body.light tbody tr:hover {
    background: #f6f8fa;
}

body.dark tbody tr:hover {
    background: #2d2d2d;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid;
}

body.light tbody td {
    border-color: #e1e4e8;
}

body.dark tbody td {
    border-color: #404040;
}

tbody tr:last-child td {
    border-bottom: none;
}

.file-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    display: inline-block;
    min-width: 40px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

body.light .file-icon {
    background: #f1f3f5;
    color: #495057;
}

body.dark .file-icon {
    background: #2d2d2d;
    color: #adb5bd;
}

.folder-icon {
    font-weight: 700;
}

body.light .folder-icon {
    background: #e3f2fd;
    color: #1976d2;
}

body.dark .folder-icon {
    background: #1a3a52;
    color: #64b5f6;
}

.file-size, .file-date {
    font-size: 0.875rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .navbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .container {
        padding: 16px;
    }

    .toolbar {
        padding: 12px;
    }

    table {
        font-size: 0.875rem;
    }

    thead th, tbody td {
        padding: 10px 12px;
    }

    .file-name-cell {
        gap: 8px;
    }

    .file-icon {
        min-width: 35px;
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .navbar h1 {
        font-size: 1.125rem;
    }

    .theme-toggle {
        padding: 6px 12px;
        font-size: 0.8125rem;
    }

    table {
        font-size: 0.8125rem;
    }

    thead th, tbody td {
        padding: 8px 10px;
    }

    .file-size, .file-date {
        font-size: 0.8125rem;
    }
}

.copy-cell {
    text-align: center;
    padding: 8px !important;
}

.copy-btn {
    background: none;
    border: 1px solid;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

body.light .copy-btn {
    border-color: #ddd;
    color: #666;
}

body.light .copy-btn:hover {
    background: #f6f8fa;
    border-color: #3498db;
    color: #3498db;
}

body.dark .copy-btn {
    border-color: #404040;
    color: #adb5bd;
}

body.dark .copy-btn:hover {
    background: #2d2d2d;
    border-color: #5dade2;
    color: #5dade2;
}

.copy-btn.copied {
    animation: copySuccess 0.3s ease;
}

body.light .copy-btn.copied {
    background: #d4edda;
    border-color: #28a745;
    color: #28a745;
}

body.dark .copy-btn.copied {
    background: #1a3a2a;
    border-color: #40c463;
    color: #40c463;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

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

.back-btn {
    padding: 10px 16px;
    border: 1px solid;
    border-radius: 4px;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 500;
}

body.light .back-btn {
    background: white;
    color: #2c3e50;
    border-color: #ddd;
}

body.light .back-btn:hover {
    background: #f6f8fa;
    border-color: #3498db;
    color: #3498db;
}

body.dark .back-btn {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark .back-btn:hover {
    background: #333;
    border-color: #5dade2;
    color: #5dade2;
}
