/* ═══════════════════════════════════════════════
   CLOUD DRIVE v2 — Premium Theme System
   ═══════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── DARK THEME (default) ── */
[data-theme="dark"] {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2333;
  --bg-card: #1c2333;
  --bg-card-hover: #252d3d;
  --bg-glass: rgba(22, 27, 34, 0.85);
  --border: #2d3548;
  --border-light: #3d4a60;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #6c63ff;
  --accent-hover: #7b73ff;
  --accent-glow: rgba(108, 99, 255, 0.25);
  --accent-gradient: linear-gradient(135deg, #6c63ff, #a855f7);
  --danger: #f85149;
  --danger-hover: #ff6b63;
  --success: #3fb950;
  --warning: #d29922;
  --star-color: #f0c040;
  --scrollbar-bg: transparent;
  --scrollbar-thumb: #2d3548;
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg-primary: #f6f8fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef1f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f3f7;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --border: #d8dee4;
  --border-light: #c8d1db;
  --text-primary: #1f2328;
  --text-secondary: #656d76;
  --text-muted: #8b949e;
  --accent: #6c63ff;
  --accent-hover: #5a52e0;
  --accent-glow: rgba(108, 99, 255, 0.15);
  --accent-gradient: linear-gradient(135deg, #6c63ff, #a855f7);
  --danger: #cf222e;
  --danger-hover: #a40e26;
  --success: #1a7f37;
  --warning: #9a6700;
  --star-color: #e3a008;
  --scrollbar-bg: transparent;
  --scrollbar-thumb: #c8d1db;
}

:root {
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
  --toolbar-height: 56px;
  --player-height: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html,
body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

.hidden {
  display: none !important;
}

.mobile-only {
  display: none;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn .material-icons-round {
  font-size: 18px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-sm .material-icons-round {
  font-size: 16px;
}

/* ── INPUT ── */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 16px;
  padding-left: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  transition: border var(--transition);
  outline: none;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 20px;
  pointer-events: none;
}

.input-group:has(.input-icon) input {
  padding-left: 44px;
}

/* ──────────────────────────────────────────────
   NOTEPAD PANEL
   ────────────────────────────────────────────── */
.notepad-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notepad-panel.open {
  transform: translateX(0);
}

.notepad-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.notepad-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.notepad-header h3::before {
  content: 'description';
  font-family: 'Material Icons Round';
  color: var(--accent);
  font-size: 20px;
}

#notepad-textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  padding: 20px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  outline: none;
}

#notepad-textarea::placeholder {
  color: var(--text-muted);
}

/* Scrollbar for notepad */
#notepad-textarea::-webkit-scrollbar {
  width: 8px;
}

#notepad-textarea::-webkit-scrollbar-track {
  background: transparent;
}

#notepad-textarea::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* Save as File footer */
.notepad-footer {
  padding: 24px 20px 40px;
  /* Increased bottom padding to lift it up */
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  background: rgba(10, 20, 40, 0.6);
  backdrop-filter: blur(5px);
}

.notepad-save-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#notepad-filename {
  width: 100%;
  background: rgba(0, 30, 60, 0.4);
  border: 1px solid rgba(0, 150, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

#notepad-filename:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 136, 255, 0.2);
  background: rgba(0, 40, 80, 0.5);
}

#btn-save-note {
  width: 100%;
  justify-content: center;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 12px;
  box-shadow: 0 4px 15px rgba(0, 136, 255, 0.3);
}

#btn-save-note:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 255, 0.4);
}

.admin-only-flex {
  display: none;
}

body.admin-mode .admin-only-flex {
  display: flex;
}

#notepad-textarea::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ──────────────────────────────────────────────
   LOGIN SCREEN (Sci-Fi Theme)
   ────────────────────────────────────────────── */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  z-index: 1000;
}

.login-screen::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-card {
  position: relative;
  width: 400px;
  max-width: 90vw;
  padding: 48px 40px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.5s ease;
}

.login-icon .material-icons-round {
  font-size: 56px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 12px 0 4px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.login-card .input-group {
  margin-bottom: 16px;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
  min-height: 18px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════════ */
.app {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  z-index: 999;
  /* Force above absolutely everything in main content */
  position: relative;
  transition: transform 0.3s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 16px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo {
  font-size: 28px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-title {
  font-size: 17px;
  font-weight: 700;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: auto;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 8px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.sidebar-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.sidebar-btn .material-icons-round {
  font-size: 20px;
}

.sidebar-btn-danger:hover {
  color: var(--danger);
}

.nav-btn.active {
  background: var(--bg-tertiary);
  color: var(--accent);
}

.sidebar-stats {
  padding: 14px;
  margin: 8px 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.stats-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stats-label .material-icons-round {
  font-size: 16px;
}

.stats-bar {
  height: 5px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.stats-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.stats-text {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-footer {
  padding-top: 8px;
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ── TOOLBAR ── */
.toolbar {
  height: var(--toolbar-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.toolbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.toolbar-icon-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.toolbar-icon-btn.active {
  color: var(--accent);
}

.toolbar-icon-btn .material-icons-round {
  font-size: 20px;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background-color: var(--border);
  margin: 0 4px;
}

.text-danger {
  color: var(--danger) !important;
}

.text-danger:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.breadcrumb-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.breadcrumb-item:last-child {
  color: var(--text-primary);
}

.breadcrumb-item .material-icons-round {
  font-size: 18px;
}

.breadcrumb-sep {
  color: var(--text-muted);
  font-size: 13px;
  flex-shrink: 0;
}

/* Search */
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 34px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box .material-icons-round {
  font-size: 18px;
  color: var(--text-muted);
}

.search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  width: 160px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
}

.search-clear:hover {
  color: var(--text-primary);
}

.search-clear .material-icons-round {
  font-size: 16px;
}

/* Sort dropdown */
.sort-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
  animation: fadeInDown 0.15s ease;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 9px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}

.dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.dropdown-item.active {
  color: var(--accent);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-toggle {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

/* ── SELECTION TOOLBAR ── */
.selection-toolbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

.selection-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.selection-info .toolbar-icon-btn {
  color: #fff;
}

.selection-info .toolbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.selection-actions {
  display: flex;
  gap: 4px;
}

.sel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-xs);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
}

.sel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sel-btn .material-icons-round {
  font-size: 20px;
}

.sel-btn-danger:hover {
  background: rgba(248, 81, 73, 0.5);
}

/* ── TRASH BANNER ── */
.trash-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.trash-banner .material-icons-round {
  font-size: 20px;
  color: var(--text-muted);
}

/* ── SHARED HEADER ── */
.shared-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.shared-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.shared-header h2 .material-icons-round {
  font-size: 22px;
  color: var(--accent);
}

/* ── DROP OVERLAY ── */
.drop-overlay {
  position: absolute;
  inset: var(--toolbar-height) 0 0 0;
  background: rgba(108, 99, 255, 0.08);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border: 3px dashed var(--accent);
  animation: pulseOverlay 2s infinite;
}

.drop-overlay-content {
  text-align: center;
  color: var(--accent);
}

.drop-overlay-content .material-icons-round {
  font-size: 64px;
  margin-bottom: 12px;
}

.drop-overlay-content p {
  font-size: 18px;
  font-weight: 600;
}

@keyframes pulseOverlay {

  0%,
  100% {
    border-color: var(--accent);
  }

  50% {
    border-color: rgba(108, 99, 255, 0.3);
  }
}

/* ══════════════════════════════════════════════
   FILE CONTAINER + CARDS
   ══════════════════════════════════════════════ */
.file-container {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  overflow-x: hidden;
}

.file-container.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  align-content: start;
}

.file-container.list-view {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state .material-icons-round {
  font-size: 72px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
}

.loading-skeleton {
  display: contents;
}

.skeleton-card {
  height: 160px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.8;
  }

  100% {
    opacity: 0.5;
  }
}

/* File Card (Grid) */
.file-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.file-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

.file-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.file-card:hover::before {
  opacity: 0.04;
}

.file-card.selected {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

.file-card.drag-over-folder {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.file-card .file-icon {
  position: relative;
  font-size: 44px;
  margin-bottom: 10px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.file-card:hover .file-icon {
  color: var(--accent);
}

.file-card .file-icon.folder-icon {
  color: #f0c040;
}

.file-card:hover .file-icon.folder-icon {
  color: #f5d060;
}

.file-card .file-name {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  color: var(--text-primary);
  word-break: break-word;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-card .file-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.file-card .file-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
  position: relative;
}

.file-card .file-fav {
  position: absolute;
  top: 6px;
  right: 36px;
  font-size: 16px;
  color: var(--star-color);
  z-index: 2;
}

.file-card .file-select-cb {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 4px;
  z-index: 2;
  opacity: 0;
  transition: opacity var(--transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-card:hover .file-select-cb,
.file-card.selected .file-select-cb {
  opacity: 1;
}

.file-card.selected .file-select-cb {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.file-card .file-options-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  z-index: 3;
  display: none !important;
  /* Hidden by default on PC, users right click */
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.file-card .file-options-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.file-card .file-options-btn .material-icons-round {
  font-size: 18px;
}

@media screen and (max-width: 768px),
(hover: none) and (pointer: coarse) {
  .file-card .file-options-btn {
    display: flex !important;
    /* Force visible on mobile */
    opacity: 1 !important;
  }
}


/* FILE CARD (List) */
.list-view .file-card {
  flex-direction: row;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  gap: 10px;
}

.list-view .file-card:hover {
  transform: none;
}

.list-view .file-card .file-icon {
  font-size: 22px;
  margin-bottom: 0;
}

.list-view .file-card .file-thumb {
  width: 28px;
  height: 28px;
  margin-bottom: 0;
  border-radius: 4px;
}

.list-view .file-card .file-name {
  text-align: left;
  flex: 1;
}

.list-view .file-card .file-meta {
  margin-top: 0;
  margin-left: auto;
  white-space: nowrap;
}

.list-view .file-card .file-date {
  font-size: 12px;
  color: var(--text-muted);
  width: 130px;
  text-align: right;
}

.list-view .file-card .file-fav {
  position: static;
  margin-left: 8px;
}

.list-view .file-card .file-select-cb {
  position: static;
  margin-right: 4px;
  flex-shrink: 0;
}

.list-view .file-card .file-options-btn {
  position: static;
  margin-left: 4px;
}

/* ══════════════════════════════════════════════
   CONTEXT MENU
   ══════════════════════════════════════════════ */
.context-menu {
  position: fixed;
  min-width: 200px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 500;
  overflow: hidden;
  animation: fadeInDown 0.12s ease;
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.ctx-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.ctx-item .material-icons-round {
  font-size: 18px;
}

.ctx-item-danger:hover {
  color: var(--danger);
}

.ctx-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

/* ══════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  width: 560px;
  max-width: 94vw;
  max-height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: modalIn 0.25s ease;
}

.dialog-content {
  width: 420px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}

.modal-header h2 .material-icons-round {
  font-size: 20px;
  color: var(--accent);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
}

/* Upload modal */
.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.05);
}

.upload-dropzone .material-icons-round {
  font-size: 44px;
  color: var(--accent);
  margin-bottom: 10px;
}

.upload-dropzone p {
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.upload-or {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  max-height: 180px;
  overflow-y: auto;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-xs);
}

.upload-item .material-icons-round {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.upload-item-name {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item-size {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.upload-item-remove {
  display: flex;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.upload-item-remove:hover {
  color: var(--danger);
}

.upload-item-remove .material-icons-round {
  font-size: 16px;
}

/* Preview modal */
.preview-modal-content {
  width: 95vw;
  max-width: 1400px;
  height: 95vh;
  max-height: 95vh;
}

.preview-actions {
  display: flex;
  gap: 4px;
}

.preview-body {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.preview-body img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.preview-body video,
.preview-body audio {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-sm);
}

.preview-body iframe {
  width: 100%;
  height: 100% !important;
  border: none;
  border-radius: var(--radius-sm);
  background: #fff;
}

.preview-body pre {
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--text-primary);
  font-family: 'Cascadia Code', 'Fira Code', monospace;
}

.preview-body .markdown-body {
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  padding: 24px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  line-height: 1.7;
  font-size: 14px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin: 16px 0 8px;
}

.markdown-body p {
  margin: 8px 0;
}

.markdown-body code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.markdown-body pre {
  background: var(--bg-tertiary);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
}

.markdown-body pre code {
  background: none;
  padding: 0;
}

.markdown-body img {
  max-width: 100%;
  border-radius: 8px;
}

.markdown-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--text-secondary);
  margin: 8px 0;
}

.markdown-body a {
  color: var(--accent);
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 24px;
}

.preview-unsupported {
  text-align: center;
  color: var(--text-muted);
}

.preview-unsupported .material-icons-round {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
}

/* ── SHARE MODAL ── */
.share-file-name {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.share-options {
  margin-bottom: 16px;
}

.share-expiry-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.share-expiry-group select {
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.share-result {
  margin-top: 16px;
}

.share-link-box {
  display: flex;
  gap: 8px;
}

.share-link-box input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
}

/* ── MOVE-TO DIALOG ── */
.move-breadcrumb {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.move-breadcrumb button {
  padding: 4px 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
}

.move-breadcrumb button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.move-breadcrumb button:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.move-folder-list {
  max-height: 300px;
  overflow-y: auto;
}

.move-folder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.move-folder-item:hover {
  background: var(--bg-tertiary);
}

.move-folder-item .material-icons-round {
  font-size: 20px;
  color: #f0c040;
}

/* ── VERSIONS PANEL ── */
.versions-panel {
  position: fixed;
  right: 0;
  top: 0;
  width: 340px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
  z-index: 300;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

.versions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.versions-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.versions-header h3 .material-icons-round {
  font-size: 20px;
  color: var(--accent);
}

.versions-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-xs);
  font-size: 13px;
}

.version-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.version-num {
  font-weight: 600;
  font-size: 13px;
}

.version-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.version-restore {
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.version-restore:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── SHARED FILES LIST ── */
.share-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  width: 100%;
}

.grid-view .share-list-item,
.grid-view .trash-card {
  grid-column: 1 / -1;
  width: 100%;
}

.share-list-info {
  flex: 1;
}

.share-list-name {
  font-size: 14px;
  font-weight: 500;
}

.share-list-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.share-list-actions {
  display: flex;
  gap: 4px;
}

.share-list-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.share-list-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.share-list-btn .material-icons-round {
  font-size: 18px;
}

/* ── TRASH FILE CARD ── */
.trash-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: default;
}

.trash-card .file-icon {
  font-size: 24px;
  color: var(--text-muted);
}

.trash-card .file-icon.folder-icon {
  color: #f0c040;
}

.trash-card-info {
  flex: 1;
}

.trash-card-name {
  font-size: 13px;
  font-weight: 500;
}

.trash-card-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.trash-card-actions {
  display: flex;
  gap: 4px;
}

/* ══════════════════════════════════════════════
   IMAGE EDITOR
   ══════════════════════════════════════════════ */
.image-editor-content {
  width: 80vw;
  max-width: 900px;
}

.editor-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 16px;
  min-height: 350px;
  overflow: hidden;
}

.editor-canvas-wrap canvas {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.editor-toolbar {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}

.editor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.editor-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.editor-btn .material-icons-round {
  font-size: 20px;
}

.editor-separator {
  width: 1px;
  background: var(--border);
  margin: 0 4px;
}

/* ══════════════════════════════════════════════
   MUSIC PLAYER
   ══════════════════════════════════════════════ */
.music-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 200;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 200px;
  flex-shrink: 0;
}

.player-icon {
  color: var(--accent);
  font-size: 28px;
}

.player-text {
  overflow: hidden;
}

.player-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.player-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.player-btn .material-icons-round {
  font-size: 24px;
}

.player-btn-main {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  color: #fff;
}

.player-btn-main:hover {
  color: #fff;
  transform: scale(1.05);
  background: var(--accent-gradient);
}

.player-btn-main .material-icons-round {
  font-size: 28px;
}

.player-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.player-time {
  font-size: 11px;
  color: var(--text-muted);
  width: 40px;
  text-align: center;
}

.player-seek,
.player-volume {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.player-seek {
  flex: 1;
}

.player-volume {
  width: 80px;
}

.player-seek::-webkit-slider-thumb,
.player-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.player-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ══════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  animation: toastIn 0.3s ease;
  max-width: 340px;
}

.toast .material-icons-round {
  font-size: 20px;
}

.toast.toast-success .material-icons-round {
  color: var(--success);
}

.toast.toast-error .material-icons-round {
  color: var(--danger);
}

.toast.toast-info .material-icons-round {
  color: var(--accent);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .mobile-only {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .search-box input {
    width: 100px;
  }

  .file-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .toolbar {
    padding: 0 12px;
  }

  .preview-modal-content {
    width: 95vw;
  }

  .versions-panel {
    width: 100%;
  }

  .music-player {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 8px;
  }

  .player-info {
    width: auto;
    flex: 1;
  }

  .player-progress {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .file-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .search-box {
    display: none;
  }
}

/* Adjust file container when music player is visible */
body.player-active .file-container {
  padding-bottom: calc(var(--player-height) + 16px);
}

body.player-active .toast-container {
  bottom: calc(var(--player-height) + 24px);
}

/* ══════════════════════════════════════════════
   VIEWER ROLE (Read-Only Mode)
   ══════════════════════════════════════════════ */
body.viewer-mode #btn-new-folder,
body.viewer-mode #btn-upload,
body.viewer-mode .nav-btn[data-view="trash"],
body.viewer-mode .nav-btn[data-view="shared"],
body.viewer-mode #drop-overlay,
body.viewer-mode #ctx-rename,
body.viewer-mode #ctx-move,
body.viewer-mode #ctx-delete,
body.viewer-mode #ctx-share,
body.viewer-mode #ctx-edit-image,
body.viewer-mode #sel-delete {
  display: none !important;
}

/* ══════════════════════════════════════════════
   SCI-FI FUTURISTIC LOGIN THEME (HUD STYLE)
   ══════════════════════════════════════════════ */
.scifi-theme {
  background-color: #0b1021 !important;
  background-image:
    radial-gradient(circle at 50% 120%, rgba(0, 150, 255, 0.15) 0%, transparent 60%),
    linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font);
  pointer-events: none;
  /* Add this to stop background click blocking */
}

.scifi-theme::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20zM20 0h20v20H20V0z' fill='%230055ff' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Outer Tech Border */
.scifi-frame {
  position: relative;
  width: 600px;
  max-width: 90vw;
  padding: 4px;
  background: rgba(0, 80, 150, 0.1);
  border: 1px solid rgba(0, 200, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 150, 255, 0.1), inset 0 0 20px rgba(0, 150, 255, 0.05);
  margin-top: 0;
  margin: auto;
}

/* Angled Edge Accents */
.frame-edge {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid #00ffff;
  z-index: 10;
}

.frame-edge.top-left {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
  border-color: #00ffff;
  box-shadow: -2px -2px 10px rgba(0, 255, 255, 0.5);
}

.frame-edge.top-right {
  top: -2px;
  right: -2px;
  border-left: none;
  border-bottom: none;
  border-color: #0088ff;
}

.frame-edge.bottom-left {
  bottom: -2px;
  left: -2px;
  border-right: none;
  border-top: none;
  border-color: #00ffff;
}

.frame-edge.bottom-right {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
  border-color: #00ffff;
  box-shadow: 2px 2px 10px rgba(0, 255, 255, 0.5);
}

/* Decorative HUD Elements */
.frame-deco {
  position: absolute;
  display: flex;
  gap: 4px;
  align-items: center;
}

.deco-bar {
  background: #00ffff;
  height: 4px;
  width: 15px;
  opacity: 0.7;
  transform: skewX(-30deg);
}

.deco-top {
  top: -20px;
  left: 30%;
}

.deco-bottom {
  bottom: -2px;
  left: 20%;
}

.deco-bottom .deco-bar {
  width: 25px;
  height: 6px;
  background: #0088ff;
}

.deco-circle {
  width: 16px;
  height: 16px;
  border: 4px solid #0088ff;
  border-radius: 50%;
  margin-left: 10px;
  box-shadow: 0 0 10px rgba(0, 136, 255, 0.8), inset 0 0 5px rgba(0, 136, 255, 0.5);
}

/* Radar Target Bottom Right */
.deco-right-bottom {
  bottom: 20px;
  right: 20px;
}

.target-circle {
  position: relative;
  width: 50px;
  height: 50px;
  border: 2px dashed rgba(0, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 10s linear infinite;
}

.target-inner {
  width: 20px;
  height: 20px;
  background: rgba(0, 255, 255, 0.2);
  border: 2px solid #00ffff;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ffff;
}

.target-dots {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px dotted rgba(0, 136, 255, 0.3);
  border-radius: 50%;
  animation: spin 15s linear infinite reverse;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile Adjustments for Decor */
@media screen and (max-width: 600px) {
  .frame-deco {
    display: none;
  }

  .deco-right-bottom {
    display: none;
  }

  .scifi-frame {
    margin: 20px;
    width: auto;
  }
}

@media screen and (max-height: 500px) {
  .frame-deco {
    display: none;
  }

  .deco-right-bottom {
    display: none;
  }
}

/* Inner Content Area */
.scifi-inner {
  background: rgba(4, 25, 50, 0.8);
  padding: 50px 40px;
  text-align: center;
  border: 1px solid rgba(0, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  /* Re-enable for the actual form */
}

.scifi-title {
  color: #00ffff;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 6px;
  margin-bottom: 40px;
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.scifi-form {
  max-width: 350px;
  margin: 0 auto;
}

/* Glowing Input Field */
.scifi-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 100, 200, 0.2);
  border: 1px solid rgba(0, 150, 255, 0.4);
  margin-bottom: 25px;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.scifi-input-group:focus-within {
  background: rgba(0, 120, 220, 0.3);
  border-color: #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.scifi-icon {
  color: #00ffff;
  padding: 0 15px;
  font-size: 20px;
  opacity: 0.8;
}

.scifi-input {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  padding: 15px 15px 15px 0 !important;
  width: 100%;
  font-size: 16px !important;
  outline: none !important;
  box-shadow: none !important;
  letter-spacing: 4px;
  font-family: inherit;
}

.scifi-input::placeholder {
  color: rgba(0, 150, 255, 0.5) !important;
  letter-spacing: 2px;
}

/* Hologram Button */
.scifi-btn {
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 150, 255, 0.4), transparent);
  border: 1px solid #0088ff;
  color: #00ffff;
  padding: 15px;
  font-size: 16px;
  letter-spacing: 4px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.scifi-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.4), transparent);
  transform: skewX(-45deg);
  transition: all 0.5s ease;
}

.scifi-btn:hover {
  background: rgba(0, 150, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 136, 255, 0.5);
  border-color: #00ffff;
  color: #fff;
  text-shadow: 0 0 5px #00ffff;
}

.scifi-btn:hover::before {
  left: 200%;
}

.scifi-error {
  color: #ff3366;
  margin-top: 20px;
  font-size: 14px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

/* ── SHARE LOGS MODAL STYLES ── */
.log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.log-item:last-child {
  border-bottom: none;
}

.log-item:hover {
  background: var(--bg-card-hover);
}

.log-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-ip {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
}

.log-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.log-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* [END OF CSS] */