:root {
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --secondary: #f472b6;
  --tertiary: #fb923c;
  --bg-dark: #09090b;
  --bg-card: rgba(24, 24, 27, 0.65);
  --bg-card-hover: rgba(39, 39, 42, 0.8);
  --text-main: #f8fafc;
  --text-muted: #a1a1aa;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Animation */
.aurora-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  background: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(247, 147, 30, 0.15), transparent 25%),
    radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.1), transparent 30%);
  animation: pulse 15s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* Utility Classes */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
  border-color: var(--glass-highlight);
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8, #f472b6, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Nav */
nav {
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: white;
}

/* Hero */
.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 20px;
  line-height: 1.1;
  font-weight: 800;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 40px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 80px 5%;
}

.feature-card {
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
}

.feature-card i {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 20px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 22px;
  background: #1e293b;
  color: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  border-left: 4px solid var(--primary);
  animation: slideIn 0.3s ease-out forwards;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Dashboard Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 24px 16px;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(20px);
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 12px;
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar a:hover, .sidebar a.active {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.sidebar a.active {
  background: rgba(129, 140, 248, 0.15);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(129, 140, 248, 0.2);
}

.main-content {
  padding: 30px 40px;
  max-width: 1600px;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 8px 16px;
  width: 320px;
  gap: 10px;
}

.search-bar input {
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  width: 100%;
  font-family: inherit;
}

/* Welcome Card */
.welcome-banner {
  padding: 30px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(247, 147, 30, 0.1));
  border: 1px solid rgba(255,255,255,0.15);
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(130px, auto);
  gap: 24px;
  margin-bottom: 40px;
}

.bento-item {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 28px;
  text-decoration: none;
  color: white;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.bento-item:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.bento-hero { grid-column: span 8; grid-row: span 3; }
.bento-action { grid-column: span 4; grid-row: span 3; }
.bento-small { grid-column: span 4; grid-row: span 2; }
.bento-wide { grid-column: span 8; grid-row: span 2; }

@media (max-width: 1200px) {
  .bento-hero { grid-column: span 12; }
  .bento-action { grid-column: span 12; }
  .bento-small { grid-column: span 6; }
  .bento-wide { grid-column: span 12; }
}

@media (max-width: 640px) {
  .bento-small { grid-column: span 12; }
}

.bento-item .icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: auto; /* Pushes content below it to the bottom if container is tall */
  background: rgba(255,255,255,0.05);
}

.bento-item h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
  margin-top: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.bento-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.bento-hero-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.15), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* Before / After 2.0 Split Slider */
.split-slider-container {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: 16px;
  overflow: hidden;
  user-select: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.split-image-before, .split-image-after {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
}

.split-image-after {
  width: 50%;
  border-right: 2px solid #ffffff;
  box-shadow: 5px 0 15px rgba(0,0,0,0.3);
}

.split-handle {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 4px;
  background: #ffffff;
  cursor: ew-resize;
  transform: translateX(-50%);
  z-index: 10;
}

.split-handle-button {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  font-size: 0.9rem;
}

/* Floating Job Queue Drawer */
.floating-queue-drawer {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 360px;
  z-index: 999;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  transition: all 0.3s ease;
}

.queue-header {
  padding: 14px 20px;
  background: rgba(30, 41, 59, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--glass-border);
}

.queue-body {
  max-height: 280px;
  overflow-y: auto;
  padding: 15px;
  background: rgba(15, 23, 42, 0.95);
}

.queue-item {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}

.progress-bar-bg {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 20px; }
  .floating-queue-drawer { width: calc(100% - 40px); right: 20px; }
}

/* Accordion Sidebar */
.nav-group {
  margin-bottom: 8px;
}
.nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.2s;
}
.nav-group-title:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.nav-group-title .chevron {
  transition: transform 0.3s;
  font-size: 0.8rem;
}
.nav-group.active .nav-group-title {
  color: #fff;
}
.nav-group.active .nav-group-title .chevron {
  transform: rotate(180deg);
}
.nav-group-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-left: 28px;
}
.nav-group.active .nav-group-content {
  max-height: 500px;
}
.nav-group-content a {
  padding: 8px 12px;
  margin-bottom: 2px;
  font-size: 0.9rem;
}

/* Badges */
.badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: auto;
}
.badge-new {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
}
.badge-beta {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Language Selector */
.lang-selector {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.lang-selector:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}
