:root {
  --bg-body: #f6f8fb;
  --bg-card: #ffffff;
  --text-body: #212529;
  --text-muted: #6c757d;
  --border-color: #eef0f3;
}

[data-theme="dark"] {
  --bg-body: #0f1115;
  --bg-card: #1a1d24;
  --text-body: #e9ecef;
  --text-muted: #9aa1ac;
  --border-color: #2a2e37;
}

[data-theme="dark"] body {
  background-color: var(--bg-body);
  color: var(--text-body);
}

[data-theme="dark"] .card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu {
  background-color: var(--bg-card);
  color: var(--text-body);
  border-color: var(--border-color);
}

[data-theme="dark"] .table {
  color: var(--text-body);
}

[data-theme="dark"] .table-light,
[data-theme="dark"] .table > :not(caption) > * > * {
  background-color: var(--bg-card);
  color: var(--text-body);
  border-color: var(--border-color);
}

[data-theme="dark"] .bg-light {
  background-color: var(--bg-body) !important;
}

[data-theme="dark"] .bg-white {
  background-color: var(--bg-card) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: var(--bg-card);
  color: var(--text-body);
  border-color: var(--border-color);
}

[data-theme="dark"] .feature-card {
  background-color: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] #fileTableBody tr:hover {
  background-color: #23262e;
}

[data-theme="dark"] .breadcrumb-item.active {
  color: var(--text-muted);
}

body {
  background-color: var(--bg-body);
  color: var(--text-body);
  transition: background-color 0.2s ease, color 0.2s ease;
}

main {
  min-height: 70vh;
}

.card {
  border: none;
  border-radius: 0.6rem;
  background-color: var(--bg-card);
}

#fileTableBody tr:hover {
  background-color: #f8f9fa;
  cursor: default;
}

#fileTableBody .file-name-link {
  color: #212529;
  text-decoration: none;
  cursor: pointer;
}

#fileTableBody .file-name-link:hover {
  color: #0d6efd;
  text-decoration: underline;
}

.breadcrumb-item {
  cursor: pointer;
}

.breadcrumb-item:not(.active) {
  color: #0d6efd;
}

#dropzoneOverlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 110, 253, 0.1);
  border: 4px dashed #0d6efd;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #0d6efd;
  font-weight: bold;
  pointer-events: none;
}

/* ================= Landing page — teal / violet / amber theme ================= */

.landing {
  --brand-1: #0d9488;   /* teal   */
  --brand-2: #7c3aed;   /* violet */
  --brand-3: #f59e0b;   /* amber  */
}

.landing .text-primary { color: var(--brand-1) !important; }
.landing .bg-primary { background-color: var(--brand-1) !important; }
.landing .border-primary { border-color: var(--brand-1) !important; }
.landing .btn-primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-color: var(--brand-1);
}
.landing .btn-primary:hover,
.landing .btn-primary:focus {
  background: linear-gradient(135deg, #0b7d72, #6b2fd6);
  border-color: #0b7d72;
}
.landing .btn-outline-primary {
  color: var(--brand-1);
  border-color: var(--brand-1);
}
.landing .btn-outline-primary:hover {
  background-color: var(--brand-1);
  border-color: var(--brand-1);
}
.landing .btn-light {
  color: var(--brand-2);
}

.hero-section {
  background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 55%, #4c1d95 100%);
  background-size: 200% 200%;
  animation: hero-gradient-shift 12s ease-in-out infinite;
  padding-top: 1rem;
}

@keyframes hero-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-gradient-text {
  background: linear-gradient(90deg, #ffffff, #fde68a, #ffffff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hero-text-shine 4s linear infinite;
}

@keyframes hero-text-shine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  animation: blob-float 9s ease-in-out infinite;
}

.hero-blob-1 {
  width: 420px;
  height: 420px;
  background: #ffffff;
  top: -160px;
  right: -120px;
  animation-delay: 0s;
}

.hero-blob-2 {
  width: 320px;
  height: 320px;
  background: var(--brand-3);
  bottom: -140px;
  left: -100px;
  animation-delay: -3s;
}

.hero-blob-3 {
  width: 220px;
  height: 220px;
  background: #34d399;
  top: 40%;
  left: 45%;
  opacity: 0.2;
  animation-delay: -6s;
}

@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -25px) scale(1.08); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 15% 25%, rgba(255,255,255,0.5) 50%, transparent 50%),
    radial-gradient(2px 2px at 75% 15%, rgba(255,255,255,0.4) 50%, transparent 50%),
    radial-gradient(3px 3px at 45% 65%, rgba(255,255,255,0.35) 50%, transparent 50%),
    radial-gradient(2px 2px at 85% 75%, rgba(255,255,255,0.4) 50%, transparent 50%),
    radial-gradient(2px 2px at 25% 85%, rgba(255,255,255,0.3) 50%, transparent 50%);
  animation: particles-drift 14s linear infinite;
}

@keyframes particles-drift {
  0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 0 -40px, 0 30px, 0 -25px, 0 35px, 0 -30px; }
}

.hero-mock {
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  transform: rotate(-1.5deg);
  animation: hero-mock-bob 6s ease-in-out infinite;
}

@keyframes hero-mock-bob {
  0%, 100% { transform: rotate(-1.5deg) translateY(0); }
  50% { transform: rotate(-1.5deg) translateY(-10px); }
}

.hero-mock-bar {
  background: #f1f3f5;
  padding: 0.6rem 0.9rem;
  display: flex;
  gap: 6px;
}

.hero-mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ced4da;
  display: inline-block;
}

.hero-mock-body {
  padding: 1rem;
}

.hero-mock-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.5rem;
  border-radius: 0.4rem;
  color: #495057;
  font-size: 0.9rem;
}

.hero-mock-row:hover {
  background: #f8f9fa;
}

.hero-mock-uploading {
  color: var(--brand-1);
  font-weight: 600;
}

.hero-mock-progress {
  width: 70px;
  height: 6px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.hero-mock-progress div {
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
  animation: hero-progress 2.5s ease-in-out infinite;
}

@keyframes hero-progress {
  0% { width: 10%; }
  50% { width: 85%; }
  100% { width: 10%; }
}

/* Scroll-reveal */
.landing .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.landing .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.feature-card {
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid #eef0f3;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 0.75rem 1.5rem rgba(13, 148, 136, 0.15);
  border-color: #99f6e4;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: rotate(-6deg) scale(1.1);
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  box-shadow: 0 0.5rem 1.25rem rgba(124, 58, 237, 0.25);
}

.avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.pricing-card {
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1rem 2rem rgba(13, 148, 136, 0.15);
}

.pricing-popular {
  transform: scale(1.03);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--brand-3), #fb923c);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.cta-section {
  background: linear-gradient(135deg, #4c1d95 0%, var(--brand-2) 45%, var(--brand-1) 100%);
  background-size: 200% 200%;
  animation: hero-gradient-shift 10s ease-in-out infinite;
}

.cta-section .btn-light {
  animation: cta-btn-pulse 2.4s ease-in-out infinite;
}

@keyframes cta-btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.35); }
  50% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}

/* ================= Dashboard: grid view, selection, stars ================= */

.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.grid-item {
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  padding: 0.75rem;
  text-align: center;
  cursor: default;
  position: relative;
  background-color: var(--bg-card);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.grid-item:hover {
  box-shadow: 0 0.4rem 1rem rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.grid-item.selected {
  outline: 2px solid #0d6efd;
}

.grid-thumb {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border-radius: 0.4rem;
  background: rgba(13,110,253,0.06);
}

.grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-thumb i {
  font-size: 2.2rem;
  color: #0d6efd;
}

.grid-name {
  font-size: 0.82rem;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid-checkbox {
  position: absolute;
  top: 6px;
  left: 6px;
}

.grid-star {
  position: absolute;
  top: 6px;
  right: 6px;
  color: #dee2e6;
  cursor: pointer;
}

.grid-star.active {
  color: #ffc107;
}

.star-toggle {
  cursor: pointer;
  color: #dee2e6;
}

.star-toggle.active {
  color: #ffc107;
}

.row-checkbox {
  width: 18px;
  height: 18px;
}

.sidebar-view-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  color: var(--text-body);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.sidebar-view-link:hover {
  background-color: rgba(13,110,253,0.08);
}

.sidebar-view-link.active {
  background-color: #0d6efd;
  color: #fff;
}

.bulk-toolbar {
  display: none;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bulk-toolbar.show {
  display: flex;
}

.preview-media {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  margin: 0 auto;
}

.folder-tree-item {
  padding: 0.35rem 0.5rem;
  border-radius: 0.3rem;
  cursor: pointer;
}

.folder-tree-item:hover {
  background-color: rgba(13,110,253,0.08);
}

.folder-tree-item.selected {
  background-color: #0d6efd;
  color: #fff;
}


