@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0a0d16;
  --bg-secondary: #111625;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(26, 35, 56, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(139, 92, 246, 0.4);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --accent-glow: 0 8px 32px rgba(139, 92, 246, 0.3);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(217, 70, 239, 0.1) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #2a344d;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: rgba(14, 18, 30, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: var(--transition);
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.sidebar-open {
  overflow: hidden !important;
}

/* Sidebar Close Button */
.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-left: auto;
  flex-shrink: 0;
}
.sidebar-close-btn:hover,
.sidebar-close-btn:active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: scale(1.05);
}

.brand-section {
  padding: 24px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--glass-border);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--accent-glow);
  color: #fff;
  font-size: 22px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 7px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-radius: var(--radius-full);
  margin-top: 3px;
  font-weight: 700;
}

.sidebar-nav {
  padding: 18px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-section-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1px;
  padding: 12px 14px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  font-weight: 600;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  transition: var(--transition);
}

.nav-item.active svg {
  color: #818cf8;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.sidebar-footer {
  padding: 18px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.storage-widget {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.storage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.storage-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.storage-bar-fill {
  height: 100%;
  width: 15%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.storage-detail {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
}

.user-profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover,
.btn-icon:active,
.btn-icon:focus {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

/* Mobile Menu Button (Hamburger) */
#mobile-menu-btn {
  color: var(--text-main) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--glass-border) !important;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
#mobile-menu-btn:hover,
#mobile-menu-btn:active,
#mobile-menu-btn:focus {
  color: #fff !important;
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  height: 76px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(10, 13, 22, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 30;
  gap: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.search-box input {
  width: 100%;
  padding: 12px 18px 12px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-dim);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.45);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--glass-border);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* Page Content */
.content-area {
  padding: 32px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title-box h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-title-box p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

.pill-btn {
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.pill-btn:hover {
  color: #fff;
}

.pill-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.sort-select {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.sort-select option {
  background: #111625;
  color: #fff;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

/* Media Card */
.media-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(139, 92, 246, 0.2);
}

.media-thumb-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #000;
}

.media-thumb-wrapper img,
.media-thumb-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.media-card:hover .media-thumb-wrapper img {
  transform: scale(1.05);
}

/* Media Selection Checkbox */
.media-select-check {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  cursor: pointer;
  user-select: none;
}

.media-card:hover .media-select-check {
  border-color: #fff;
  background: rgba(15, 23, 42, 0.85);
}

.media-card.selected .media-select-check {
  background: #6366f1;
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.8);
  transform: scale(1.08);
}

/* Media Card Selected State */
.media-card.selected {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5), 0 8px 25px rgba(99, 102, 241, 0.4) !important;
  transform: scale(0.97);
}

.media-card.selected .media-thumb-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(99, 102, 241, 0.22);
  z-index: 4;
  pointer-events: none;
}

.btn-card-open {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 6;
  opacity: 0.8;
}

.btn-card-open:hover {
  opacity: 1;
  background: rgba(99, 102, 241, 0.8);
  transform: scale(1.1);
}

/* Overlay & Badges */
.media-badge-top {
  position: absolute;
  top: 10px;
  left: 46px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  z-index: 5;
}

.media-badge-top.video {
  background: rgba(236, 72, 153, 0.8);
}

.media-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 5;
}

.media-fav-btn:hover {
  background: rgba(239, 68, 68, 0.8);
  transform: scale(1.15);
}

.media-fav-btn.active {
  color: #ef4444;
  background: rgba(255, 255, 255, 0.9);
}

.media-fav-btn.active svg {
  fill: #ef4444;
}

.media-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 14px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  flex-direction: column;
  z-index: 4;
  pointer-events: none;
}

.media-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-meta {
  font-size: 11px;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

/* Play Icon for Video Card */
.play-badge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
}

.media-card:hover .play-badge-center {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--accent-gradient);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 54px;
  margin-bottom: 16px;
  opacity: 0.8;
}

.empty-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 24px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-box {
  background: #111625;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.04);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.12);
  transform: scale(1.01);
}

.dropzone-icon {
  font-size: 44px;
  color: var(--accent);
  margin-bottom: 12px;
}

.dropzone-text {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--text-dim);
}

/* Upload Queue */
.upload-queue {
  margin-top: 20px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.upload-queue-name {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-queue-status {
  font-size: 12px;
  font-weight: 600;
}

/* Lightbox Fullscreen Viewer */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(24px);
  z-index: 200;
  display: none;
  flex-direction: column;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-topbar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

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

.lightbox-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.lightbox-content-box {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content-box img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.lightbox-content-box video {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-sm);
  outline: none;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 20px;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-btn.prev { left: 24px; }
.lightbox-nav-btn.next { right: 24px; }

/* Quick Camera Button */
.btn-camera-quick {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.btn-camera-quick:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.btn-camera-quick:active {
  transform: translateY(0) scale(0.97);
}

/* Upload Options Grid (Camera vs Video vs Gallery) */
.upload-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.upload-opt-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-main);
  outline: none;
  position: relative;
  overflow: hidden;
}

.upload-opt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.upload-opt-card.camera:hover, .upload-opt-card.camera:active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
}
.upload-opt-card.camera::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.upload-opt-card.video:hover, .upload-opt-card.video:active {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.2);
}
.upload-opt-card.video::before {
  background: linear-gradient(90deg, #ec4899, #f43f5e);
}

.upload-opt-card.gallery:hover, .upload-opt-card.gallery:active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}
.upload-opt-card.gallery::before {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.upload-opt-card .opt-icon {
  font-size: 32px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.25s ease;
}

.upload-opt-card:hover .opt-icon {
  transform: scale(1.15);
}

.upload-opt-card .opt-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.upload-opt-card .opt-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
  margin-bottom: 10px;
}

.upload-opt-card .opt-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.camera-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.video-badge {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.gallery-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Hidden File Inputs (Kept in active DOM render tree for native mobile camera/gallery triggers) */
.hidden-file-input {
  position: fixed !important;
  top: -2000px !important;
  left: -2000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0.01 !important;
  pointer-events: none !important;
  z-index: -999 !important;
}

/* Floating Action Button (FAB) for Mobile */
.mobile-fab-container {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 99;
  display: none;
  pointer-events: none;
}

.fab-btn-camera {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5), 0 0 20px rgba(16, 185, 129, 0.3);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  animation: pulse-camera 3s infinite;
  pointer-events: auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

@keyframes pulse-camera {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5), 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.6), 0 0 0 12px rgba(16, 185, 129, 0);
  }
}

.fab-btn-camera:active {
  transform: scale(0.9);
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 50;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 14px 0 40px rgba(0, 0, 0, 0.85);
  }
  .sidebar-close-btn {
    display: inline-flex;
  }
  .main-wrapper {
    margin-left: 0;
  }
  #mobile-menu-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  .mobile-fab-container {
    display: flex;
  }
  .topbar {
    padding: 12px 16px;
    gap: 8px;
  }
  .topbar-actions {
    gap: 8px;
  }
  .content-area {
    padding: 16px 16px 90px;
  }
  .upload-options-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .upload-opt-card {
    flex-direction: row;
    padding: 14px 16px;
    gap: 14px;
    text-align: left;
  }
  .upload-opt-card .opt-icon {
    margin-bottom: 0;
    font-size: 28px;
  }
  .upload-opt-card .opt-desc {
    margin-bottom: 0;
  }
  .upload-opt-card .opt-badge {
    margin-left: auto;
  }
  .search-box {
    max-width: 140px;
  }
  .btn-camera-quick span {
    display: none;
  }
  .btn-camera-quick {
    padding: 8px 12px;
  }
  .storage-pill {
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .storage-pill {
    display: none;
  }
  .search-box {
    max-width: none;
    flex: 1;
  }
}

/* Floating Instant Upload Toast Overlay */
.upload-toast-overlay {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 90%;
  max-width: 440px;
}

.upload-toast-overlay.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.upload-toast-card {
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.3);
}

.upload-toast-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #34d399;
  border-radius: 50%;
  animation: toast-spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.upload-toast-content {
  flex: 1;
  overflow: hidden;
}

.upload-toast-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-toast-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Floating Selection Action Bar */
.selection-action-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(140px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 92%;
  max-width: 620px;
}

.selection-action-bar.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.selection-bar-card {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(99, 102, 241, 0.45);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(99, 102, 241, 0.3);
}

.selection-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

.selection-badge {
  background: var(--accent-gradient);
  color: #fff;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 14px !important;
  font-size: 13px !important;
  border-radius: var(--radius-full) !important;
}

.selection-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.selection-close-btn:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
}

@media (max-width: 600px) {
  .selection-action-bar {
    bottom: 18px;
    width: 95%;
  }
  .selection-bar-card {
    padding: 8px 12px;
    gap: 6px;
  }
  .selection-info {
    font-size: 12px;
  }
  .selection-text {
    display: none;
  }
  .selection-actions {
    gap: 6px;
  }
  .selection-actions .btn {
    padding: 6px 9px !important;
    font-size: 12px !important;
  }
}
