/* 
 * VidiSEO - Premium Design System (Obsidian Dark Theme)
 */

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

:root {
  /* Color Tokens */
  --bg-primary: #09090b;
  --bg-secondary: #0f0f13;
  --bg-card: rgba(18, 18, 24, 0.7);
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glass-focus: rgba(239, 68, 68, 0.3);
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --accent-crimson: hsl(0, 85%, 55%);
  --accent-crimson-glow: rgba(239, 68, 68, 0.4);
  --accent-purple: hsl(263, 70%, 50%);
  --accent-purple-glow: rgba(139, 92, 246, 0.3);
  --accent-cyan: hsl(190, 90%, 50%);
  --accent-cyan-glow: rgba(6, 182, 212, 0.3);
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Font Families */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transition System */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Sidebar configuration */
  --sidebar-width: 280px;
}

/* Reset & Scrollbar Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  height: 100vh;
  display: flex;
}

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-crimson);
}

/* Core Layout Structure */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Animated Glowing Background Mesh */
.bg-glow-mesh {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-glow-1 {
  position: absolute;
  top: -10%;
  right: 10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-crimson-glow) 0%, transparent 70%);
  filter: blur(80px);
  animation: float-glow 15s infinite alternate ease-in-out;
}
.bg-glow-2 {
  position: absolute;
  bottom: -10%;
  left: 10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-purple-glow) 0%, transparent 70%);
  filter: blur(100px);
  animation: float-glow 20s infinite alternate-reverse ease-in-out;
}

@keyframes float-glow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, -50px) scale(1.1); }
}

/* Left Sidebar Navigation */
aside.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 10;
  position: relative;
  transition: var(--transition-normal);
}

.sidebar-brand {
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-glass);
}
.brand-logo {
  background: linear-gradient(135deg, var(--accent-crimson) 0%, var(--accent-purple) 100%);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--accent-crimson-glow);
}
.brand-logo svg {
  fill: #fff;
  width: 20px;
  height: 20px;
}
.brand-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-crimson);
  padding: 2px 6px;
  border-radius: 99px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Sidebar Navigation Items */
nav.sidebar-nav {
  flex: 1;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}
.nav-link svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  transition: var(--transition-fast);
}
.nav-link:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}
.nav-link:hover svg {
  stroke: var(--text-primary);
  transform: translateX(2px);
}
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-color: rgba(239, 68, 68, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.nav-link.active svg {
  stroke: var(--accent-crimson);
}

.sidebar-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.footer-tip {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-glass);
}

/* Main Content Panel Area */
main.main-content {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 2.5rem;
  z-index: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Tab Sections Panel Handler */
.tab-panel {
  display: none;
  animation: fade-slide-in var(--transition-normal);
  flex: 1;
  flex-direction: column;
}
.tab-panel.active {
  display: flex;
}

@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography & Headers */
.header-row {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-title-group h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.35rem;
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-title-group p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* General Layout Components (Cards, Inputs, Buttons) */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.search-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.search-wrapper {
  position: relative;
  flex: 1;
}
.search-input {
  width: 100%;
  padding: 1.15rem 1.5rem 1.15rem 3.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-fast);
  outline: none;
}
.search-input:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glass-focus);
  box-shadow: 0 0 20px var(--accent-crimson-glow);
}
.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  stroke: var(--text-muted);
  width: 22px;
  height: 22px;
  pointer-events: none;
  transition: var(--transition-fast);
}
.search-input:focus ~ .search-icon {
  stroke: var(--accent-crimson);
}

.btn {
  background: linear-gradient(135deg, var(--accent-crimson) 0%, #dc2626 100%);
  color: #fff;
  border: none;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  box-shadow: 0 4px 15px var(--accent-crimson-glow);
  transition: var(--transition-fast);
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  box-shadow: none;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

/* Tool 1: Tag Extractor UI Elements */
.extractor-results-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  margin-top: 1rem;
}
.video-card-meta {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  overflow: hidden;
  align-self: start;
}
.video-thumbnail-container {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: #000;
}
.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}
.video-duration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.video-info-body {
  padding: 1.25rem;
}
.video-title-display {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-channel-display {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.video-stats-row {
  display: flex;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.video-stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tags-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
}
.tags-heading {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.tags-count-badge {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 99px;
  margin-left: 0.5rem;
}
.actions-group {
  display: flex;
  gap: 0.75rem;
}

/* Beautiful Tag Badge Grid */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}
.tag-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}
.tag-badge:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.tag-badge.selected {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fff;
}
.tag-badge svg.tag-select-icon {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  transition: var(--transition-fast);
}
.tag-badge.selected svg.tag-select-icon {
  stroke: var(--accent-crimson);
  fill: rgba(239, 68, 68, 0.1);
}

/* Tool 2: Keyword Suggestion Table & Premium Scoring Display */
.keyword-output-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.suggestions-table-wrapper {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border-glass);
}
table.suggestions-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.suggestions-table th {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}
.suggestions-table td {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}
.suggestions-table tr:last-child td {
  border-bottom: none;
}
.suggestions-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
  color: #fff;
}

.keyword-cell {
  font-weight: 600;
  color: #fff;
}

/* Progressive Score Indicators (Circular, Pill shape, progress line) */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 140px;
}
.progress-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1s ease-out;
}
.score-badge {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  min-width: 36px;
}

/* Scoring classes */
.score-excellent {
  color: #10b981;
}
.score-excellent-bg {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.score-good {
  color: #34d399;
}
.score-good-bg {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
}
.score-average {
  color: #f59e0b;
}
.score-average-bg {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.score-poor {
  color: #ef4444;
}
.score-poor-bg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Tool 3: Title & Description Optimizer Layout */
.optimizer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}
.input-group {
  margin-bottom: 1.5rem;
}
.input-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.input-textarea {
  width: 100%;
  padding: 1.15rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-fast);
  outline: none;
  resize: vertical;
}
.input-textarea:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glass-focus);
  box-shadow: 0 0 20px var(--accent-crimson-glow);
}

.char-counter {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.audit-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.radial-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.circle-chart {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 1rem;
}
.circle-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 8;
}
.circle-fill {
  fill: none;
  stroke: url(#score-gradient);
  stroke-width: 8;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}
.circle-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
}

.checks-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
}
.check-icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.check-success {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.02);
}
.check-success .check-icon {
  stroke: #10b981;
}
.check-warning {
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.02);
}
.check-warning .check-icon {
  stroke: #f59e0b;
}

/* Tool 4: Description Template Builder Elements */
.template-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.template-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-input {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}
.form-input:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glass-focus);
}

.timestamp-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.timestamp-input-row input {
  padding: 0.65rem 0.85rem;
}
.timestamp-time {
  width: 100px;
}
.timestamp-label {
  flex: 1;
}

/* Preview Box styled like standard copy-paste */
.preview-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.preview-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.preview-box {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-y: auto;
  color: var(--text-primary);
  max-height: 520px;
}

/* Tool 5: Rank Checker Layout */
.rank-display-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
}
.rank-badge-huge {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.rank-badge-huge::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  border: 4px solid var(--accent-crimson);
  opacity: 0.2;
}
.rank-badge-glow {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.02) 80%);
  color: var(--accent-crimson);
  box-shadow: 0 0 40px var(--accent-crimson-glow);
}
.rank-badge-green {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.02) 80%);
  color: #10b981;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}
.rank-badge-green::after {
  border-color: #10b981;
}
.rank-badge-muted {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
}
.rank-badge-muted::after {
  display: none;
}

.rank-headline {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.rank-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 480px;
  line-height: 1.5;
}

/* Premium Dashboard Panel Layout (Main entry point) */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.stat-card-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.welcome-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-crimson-glow) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}
.welcome-logo {
  background: linear-gradient(135deg, var(--accent-crimson) 0%, var(--accent-purple) 100%);
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--accent-crimson-glow);
  flex-shrink: 0;
}
.welcome-logo svg {
  width: 35px;
  height: 35px;
  fill: #fff;
}
.welcome-text h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}
.welcome-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.dashboard-sections-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}
.recent-searches-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.recent-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: var(--transition-fast);
}
.recent-search-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}
.recent-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.recent-icon {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
}
.recent-title {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.recent-arrow {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  transition: var(--transition-fast);
}
.recent-search-item:hover .recent-arrow {
  stroke: var(--text-primary);
  transform: translateX(3px);
}

/* Elite Toast Notification UI Components */
.toast-container {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
}
.toast {
  background: rgba(15, 15, 20, 0.9);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-icon {
  width: 20px;
  height: 20px;
}
.toast-success {
  border-color: rgba(16, 185, 129, 0.3);
}
.toast-success .toast-icon {
  stroke: #10b981;
}
.toast-error {
  border-color: rgba(239, 68, 68, 0.3);
}
.toast-error .toast-icon {
  stroke: #ef4444;
}

/* Beautiful Smooth Loading Animations */
.skeleton-loader {
  background: linear-gradient(90deg, rgba(255,255,255,0.01) 25%, rgba(255,255,255,0.05) 37%, rgba(255,255,255,0.01) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: 12px;
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
}
.loading-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .extractor-results-grid {
    grid-template-columns: 1fr;
  }
  .optimizer-grid, .template-builder-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-sections-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  .app-container {
    flex-direction: column;
  }
  aside.sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
  }
  .sidebar-brand {
    padding: 1.25rem;
  }
  nav.sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  .nav-link {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .sidebar-footer {
    display: none;
  }
  main.main-content {
    padding: 1.5rem;
  }
  .header-row {
    margin-bottom: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .search-container {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Admin DB Panel Styling */
.admin-db-table th {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.5px;
}
.admin-db-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  font-size: 0.95rem;
}
.admin-db-table tr:hover {
  background: rgba(255, 255, 255, 0.015);
}
.admin-video-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.admin-video-thumb {
  width: 90px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}
.admin-video-title {
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.admin-action-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.admin-btn-delete {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: rgb(248, 113, 113);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.admin-btn-delete:hover {
  background: rgb(239, 68, 68);
  border-color: rgb(239, 68, 68);
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}
