:root {
  --primary: #6366f1;
  --background: #0f172a;
  --surface: #1e293b;
  --surface-light: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --error: #ef4444;
  --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; background: var(--background); color: var(--text); line-height: 1.6; }
.header { background: var(--surface); padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--surface-light); }
.logo { font-size: 20px; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* Toolbar Tools */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.tools-group { display: flex; gap: 8px; align-items: center; }
.select-input { background: var(--surface-light); color: white; border: none; padding: 8px; border-radius: 6px; font-size: 13px; outline: none; cursor: pointer; }

.btn { padding: 8px 16px; border-radius: 8px; border: none; font-weight: 500; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: white; text-decoration: none; }
.btn-primary { background: var(--gradient); }
.btn-secondary { background: var(--surface-light); }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* Grid View (Original) */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.file-grid .file-item { background: var(--surface); border-radius: 12px; padding: 16px; text-align: center; border: 1px solid transparent; cursor: pointer; }
.file-grid .file-icon { font-size: 40px; margin-bottom: 8px; }
.file-grid .file-name { font-size: 13px; font-weight: 500; word-break: break-all; height: 40px; overflow: hidden; margin-bottom: 8px; }
.file-grid .file-actions { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }

/* List View (New) */
.file-list-mode { display: flex; flex-direction: column; gap: 8px; }
.file-list-mode .file-item { 
    background: var(--surface); 
    padding: 10px 20px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    cursor: pointer;
    border: 1px solid transparent;
}
.file-list-mode .file-item:hover { border-color: var(--primary); }
.file-list-mode .file-info { display: flex; align-items: center; gap: 15px; flex: 1; min-width: 0; }
.file-list-mode .file-icon { font-size: 24px; }
.file-list-mode .file-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; }
.file-list-mode .file-meta { font-size: 12px; color: var(--text-muted); width: 100px; text-align: right; }
.file-list-mode .file-actions { display: flex; gap: 8px; margin-left: 20px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay.active { display: flex; }
.modal { background: var(--surface); padding: 24px; border-radius: 12px; width: 300px; }
.form-input { width: 100%; padding: 10px; background: var(--background); border: 1px solid var(--surface-light); border-radius: 6px; color: white; margin: 10px 0; }
