/* Design Tokens & Variables */
:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #12131a;
  --bg-tertiary: #1a1c27;
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #06b6d4;
  --accent-secondary-hover: #0891b2;
  
  --gradient-main: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-glow: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(10, 11, 16, 0) 70%);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-color: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
  
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

body.dark-mode {
  background-image: var(--gradient-glow);
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100% 800px;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-secondary-hover);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 13.5px;
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background-color: var(--danger);
  color: #fff;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 6px;
}
.btn-icon:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.06);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-title);
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}

.input-icon input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.input-icon input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Custom Checkbox Toggle */
.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  font-size: 13.5px;
  user-select: none;
  color: var(--text-primary);
  font-weight: 500;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 1px;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--border-hover);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Alert Boxes */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert.error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
.alert.info {
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

/* Views Management */
.view {
  display: none;
  min-height: 100vh;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view.active {
  display: flex;
}

#view-dashboard.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

/* 1. Loading View */
.loader-container {
  text-align: center;
}

.glow-logo {
  font-family: var(--font-title);
  font-size: 40px;
  font-weight: 800;
  width: 80px;
  height: 80px;
  line-height: 80px;
  border-radius: 50%;
  background: var(--gradient-main);
  margin: 0 auto 24px;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
  animation: pulseLogo 2s infinite ease-in-out;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-secondary);
  animation: spin 1s linear infinite;
  margin: 16px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulseLogo {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(6, 182, 212, 0.6); }
}

/* 2 & 3. Auth Views (Setup & Login) */
.auth-card {
  width: 100%;
  max-width: 420px;
  margin: 40px 24px;
}

.logo-icon {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  width: 50px;
  height: 50px;
  line-height: 50px;
  border-radius: 12px;
  font-size: 20px;
  margin: 0 auto 20px;
  text-align: center;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.card-header {
  text-align: center;
  margin-bottom: 28px;
}

.card-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.card-header p {
  color: var(--text-secondary);
  font-size: 13.5px;
}

/* 4. Navbar */
.navbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

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

.logo-circle {
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  background: var(--gradient-main);
  font-weight: 700;
  font-family: var(--font-title);
  font-size: 15px;
}

.brand-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-badge {
  background-color: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-family: var(--font-title);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-tab:hover, .nav-tab.active {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid var(--border-color);
  padding-left: 20px;
}

.user-profile span {
  color: var(--text-secondary);
  font-size: 13px;
}

.btn-logout {
  color: var(--text-muted);
}
.btn-logout:hover {
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Dashboard Layout */
.dashboard-content {
  padding-top: 32px;
  padding-bottom: 60px;
}

.dashboard-tab {
  display: none;
}

.dashboard-tab.active {
  display: block;
}

/* File Explorer Layout */
.explorer-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.explorer-layout.drawer-open {
  grid-template-columns: 1fr 380px;
}

@media (max-width: 1024px) {
  .explorer-layout.drawer-open {
    grid-template-columns: 1fr;
  }
}

.explorer-main {
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

/* Explorer Toolbar */
.explorer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-size: 15px;
}

.breadcrumb-item {
  cursor: pointer;
  transition: color 0.2s ease;
}
.breadcrumb-item:hover {
  color: var(--text-primary);
}

.breadcrumb-item:not(:last-child):after {
  content: "/";
  margin-left: 8px;
  color: var(--text-muted);
}

.action-buttons {
  display: flex;
  gap: 12px;
}

/* Explorer Table View */
.explorer-view {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.explorer-headers {
  display: grid;
  grid-template-columns: 2fr 100px 140px 140px 120px;
  padding: 12px 16px;
  background-color: var(--bg-tertiary);
  border-radius: 8px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .explorer-headers {
    grid-template-columns: 1fr 100px;
  }
  .col-created, .col-status {
    display: none;
  }
}

.explorer-items {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.explorer-item {
  display: grid;
  grid-template-columns: 2fr 100px 140px 140px 120px;
  padding: 12px 16px;
  align-items: center;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.explorer-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--border-hover);
}

@media (max-width: 768px) {
  .explorer-item {
    grid-template-columns: 1fr 100px;
  }
  .item-col-created, .item-col-status {
    display: none;
  }
}

.item-col-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.item-icon.folder { color: #f59e0b; }
.item-icon.file-image { color: #10b981; }
.item-icon.file-pdf { color: #ef4444; }
.item-icon.file-code { color: #3b82f6; }
.item-icon.file-3d { color: #a855f7; }
.item-icon.file-generic { color: var(--text-secondary); }

.item-col-size {
  color: var(--text-secondary);
}

.item-col-created {
  color: var(--text-muted);
}

.item-col-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-col-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.explorer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.explorer-empty i {
  font-size: 48px;
  margin-bottom: 16px;
}

/* Uploader Drawer */
.explorer-drawer {
  display: none;
  flex-direction: column;
  min-height: 500px;
}

.explorer-layout.drawer-open .explorer-drawer {
  display: flex;
  animation: slideInRight 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

/* Drag and Drop */
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--bg-primary);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent-primary);
  background-color: rgba(99, 102, 241, 0.03);
}

.drop-icon {
  font-size: 38px;
  color: var(--text-muted);
  margin-bottom: 16px;
  transition: color 0.2s ease;
}
.drop-zone:hover .drop-icon, .drop-zone.dragover .drop-icon {
  color: var(--accent-secondary);
}

.drop-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.drop-subtitle {
  color: var(--text-muted);
  font-size: 12px;
}

/* Upload Config & Toggles */
.upload-config {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.selected-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
}

.selected-file-icon {
  font-size: 24px;
  color: var(--accent-primary);
}

.selected-file-info {
  flex-grow: 1;
  overflow: hidden;
}
.selected-file-info .file-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selected-file-info .file-size {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.btn-cancel {
  color: var(--text-muted);
}
.btn-cancel:hover {
  color: var(--danger);
}

.vanity-input-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.vanity-domain {
  padding: 12px 0 12px 14px;
  color: var(--text-muted);
  font-size: 13px;
  user-select: none;
  font-weight: 500;
}

.vanity-input-wrapper input {
  flex-grow: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 12px 14px;
  font-family: var(--font-body);
}
.vanity-input-wrapper input:focus {
  outline: none;
}

.vanity-input-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-toggle-group {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.toggle-content {
  margin-top: 12px;
  animation: slideDown 0.2s cubic-bezier(0, 0, 0.2, 1);
}

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

/* Upload Progress Bar */
.upload-progress-container {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}

.progress-bar-bg {
  height: 6px;
  background-color: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 3px;
  transition: width 0.1s linear;
}

/* Share Link Generated Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal {
  width: 90%;
  max-width: 500px;
  padding: 0;
  overflow: hidden;
  animation: zoomIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--success);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.generated-link-container {
  display: flex;
  margin-top: 16px;
  margin-bottom: 20px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.generated-link-container input {
  flex-grow: 1;
  background: none;
  border: none;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13.5px;
}
.generated-link-container input:focus {
  outline: none;
}

/* Move Modal Explorer Tree */
.move-folder-tree {
  max-height: 250px;
  overflow-y: auto;
  margin-top: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  background-color: var(--bg-primary);
}

.move-folder-node {
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.15s ease;
}

.move-folder-node:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.move-folder-node.selected {
  background-color: rgba(99, 102, 241, 0.2);
  color: #fff;
  font-weight: 500;
}

/* Access Logs View */
.logs-view {
  min-height: 350px;
  display: flex;
  flex-direction: column;
}

.logs-headers {
  display: grid;
  grid-template-columns: 180px 2fr 180px 2fr;
  padding: 12px 16px;
  background-color: var(--bg-tertiary);
  border-radius: 8px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 13px;
}

.logs-items {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-item {
  display: grid;
  grid-template-columns: 180px 2fr 180px 2fr;
  padding: 12px 16px;
  align-items: center;
  border-radius: 8px;
  border-bottom: 1px solid var(--border-color);
}

.log-col-time, .log-item-time {
  color: var(--text-muted);
}
.log-item-file {
  font-weight: 500;
}
.log-item-vanity {
  color: var(--accent-secondary);
}
.log-item-agent {
  color: var(--text-secondary);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.logs-empty i {
  font-size: 40px;
  margin-bottom: 16px;
}

/* 5. DOWNLOAD LANDING PAGE */
.download-card {
  width: 90%;
  max-width: 600px;
  margin: 40px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(18, 19, 26, 0.85);
  backdrop-filter: blur(20px);
}

.download-state {
  animation: fadeIn 0.3s ease-out;
}

.lock-icon, .error-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  width: 60px;
  height: 60px;
  line-height: 60px;
  border-radius: 50%;
  font-size: 24px;
  margin: 10px auto 24px;
  text-align: center;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.lock-icon {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  border-color: rgba(99, 102, 241, 0.2);
}

.download-state h2 {
  font-size: 22px;
  margin-bottom: 10px;
}
.download-state p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* File Ready Container */
.file-details-container {
  display: flex;
  gap: 20px;
  align-items: center;
  background-color: var(--bg-tertiary);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.file-preview-icon {
  font-size: 36px;
  width: 60px;
  height: 60px;
  line-height: 60px;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  text-align: center;
  color: var(--accent-secondary);
}

.file-meta-info {
  flex-grow: 1;
  overflow: hidden;
}
.ready-title {
  font-size: 18px !important;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-stats-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.file-stats-badges .badge {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

/* Rich Preview Section */
.preview-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.preview-header {
  padding: 10px 16px;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.preview-container {
  padding: 16px;
  max-height: 380px;
  overflow-y: auto;
  background-color: #0b0c10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Specific Preview Renderers */
.preview-image {
  max-width: 100%;
  max-height: 340px;
  border-radius: 6px;
  object-fit: contain;
}

.preview-pdf {
  width: 100%;
  height: 340px;
  border: none;
  border-radius: 6px;
}

.preview-text {
  width: 100%;
  color: #38bdf8;
  font-family: Consolas, Monaco, monospace;
  font-size: 12.5px;
  white-space: pre-wrap;
  text-align: left;
  line-height: 1.6;
}

.preview-audio {
  width: 100%;
  padding: 12px;
}

.preview-video {
  max-width: 100%;
  max-height: 340px;
  border-radius: 6px;
}

/* Model-viewer styling for 3D files */
model-viewer {
  width: 100%;
  height: 340px;
  background-color: #0d0e12;
  border-radius: 6px;
}

.preview-generic {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.preview-generic i {
  font-size: 40px;
  margin-bottom: 12px;
}

.download-actions {
  margin-top: 24px;
}
.download-info-footer {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 14px;
}
