@font-face {
  font-family: 'AutoCode Noto Sans';
  src: url('/assets/fonts/NotoSans-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 500;
  font-display: swap;
}

@font-face {
  font-family: 'AutoCode Noto Sans';
  src: url('/assets/fonts/NotoSans-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}

@font-face {
  font-family: 'AutoCode Noto Sans';
  src: url('/assets/fonts/NotoSans-Italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 100 500;
  font-display: swap;
}

@font-face {
  font-family: 'AutoCode Noto Sans';
  src: url('/assets/fonts/NotoSans-BoldItalic.ttf') format('truetype');
  font-style: italic;
  font-weight: 600 900;
  font-display: swap;
}

:root {
  --bg-color: #03010c;
  --bg-glass: rgba(13, 11, 28, 0.45);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-glow: rgba(236, 72, 153, 0.35);
  --bg-input: rgba(255, 255, 255, 0.04);

  --primary: #ec4899;
  --primary-glow: rgba(236, 72, 153, 0.4);
  --secondary: #6366f1;
  --secondary-glow: rgba(99, 102, 241, 0.25);
  --tertiary: #06b6d4;

  --text-main: #ffffff;
  --text-muted: #e2e8f0; /* slate-200 for higher contrast */
  --text-dark: #94a3b8; /* slate-400 */

  --success: #10b981; /* standard emerald */
  --error: #ef4444; /* standard red */
  --warn: #f59e0b; /* standard gold */

  --font-family: 'Inter', 'Poppins', 'Roboto', -apple-system, BlinkMacSystemFont, "SF Pro", sans-serif;
  --font-mono: 'JetBrains Mono', 'Inter', monospace;
  --radius: 20px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 50% 0%, #0d082d 0%, var(--bg-color) 80%);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Elegant custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(3, 0, 20, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 72, 153, 0.3);
}

/* Cosmic Glow Backgrounds */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 75%, rgba(6, 182, 212, 0.12) 0%, transparent 60%);
  filter: blur(90px);
  animation: glow-pulse 25s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
  0% {
    opacity: 0.8;
    transform: scale(1) translate(0px, 0px) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.08) translate(30px, -20px) rotate(5deg);
  }
  100% {
    opacity: 0.8;
    transform: scale(0.95) translate(-10px, 15px) rotate(-3deg);
  }
}

.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Styles */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 24px;
}

.app-header .actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.app-header .actions .btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand:hover {
  opacity: 0.9;
  transform: translateY(-0.5px);
}

.logo-icon {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-text h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-text h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Grid Layout */
.app-main {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.studio-layout-columns {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  flex: 1;
}

@media (max-width: 1024px) {
  .studio-layout-columns {
    grid-template-columns: 1fr;
  }
}

/* Panel Card - Glassmorphism */
.panel-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.panel-card:hover {
  border-color: var(--border-glass-glow);
  box-shadow: 0 24px 48px 0 rgba(0, 0, 0, 0.6), 0 0 20px rgba(168, 85, 247, 0.15);
  transform: translateY(-2px);
}

.panel-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
  background: linear-gradient(135deg, #ffffff, #a5f3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 13px;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Textarea inputs */
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

textarea:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2), 0 0 15px rgba(168, 85, 247, 0.1);
}

/* Select inputs */
select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 12px 36px 12px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba%28255%2C%20255%2C%20255%2C%200.6%29' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

select:focus {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2), 0 0 15px rgba(168, 85, 247, 0.1);
}

select option {
  background-color: #0b0918;
  color: var(--text-main);
  padding: 10px;
}

/* Prompt Presets */
.prompt-presets {
  margin: 20px 0 28px 0;
}

.preset-label {
  font-size: 12px;
  color: var(--text-dark);
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.presets-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-tag {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.5;
}

.preset-tag:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(59, 130, 246, 0.08));
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.15);
  transform: translateX(2px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.55), 0 0 15px rgba(59, 130, 246, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

.btn-block {
  width: 100%;
  padding: 16px;
  font-size: 15px;
}

/* Micro-animations: Spin */
.icon-spin {
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Step Progress styles */
.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
}

.workflow-steps::before {
  content: "";
  position: absolute;
  left: 36px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 0;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  position: relative;
  z-index: 1;
  transition: var(--transition-smooth);
}

.step-item.active {
  border-color: var(--primary);
  background: rgba(236, 72, 153, 0.04);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.08);
  transform: translateX(4px);
}

.step-item.completed {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.02);
}

.step-item.failed {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.02);
}

.step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #090616;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  position: relative;
  z-index: 2;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.step-item.active .step-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
  animation: pulse-border 1.5s infinite;
}

.step-item.completed .step-icon {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.step-item.failed .step-icon {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(236, 72, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

.step-info {
  flex: 1;
}

.step-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
  color: #fff;
}

.step-info p {
  font-size: 12px;
  color: var(--text-dark);
  line-height: 1.4;
}

.step-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.step-item.active .step-status {
  color: var(--primary);
}

.step-item.completed .step-status {
  color: var(--success);
}

.step-item.failed .step-status {
  color: var(--error);
}

/* Console Box */
.console-box {
  background: #05040d;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.8), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.console-header {
  background: rgba(255, 255, 255, 0.01);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.dot.red { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.dot.yellow { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.dot.green { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }

.console-title {
  font-size: 11px;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 8px;
}

.console-tabs {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.console-tab {
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  letter-spacing: 0.3px;
}

.console-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.console-tab.active {
  background: rgba(168, 85, 247, 0.12);
  color: var(--primary);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.console-body {
  padding: 18px;
  height: 240px;
  overflow-y: auto;
}

.console-content {
  display: none;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: #a5f3fc;
  white-space: pre-wrap;
  word-break: break-all;
}

.console-content.active {
  display: block;
}

/* AI trace chat */
.btn-ai-trace {
  border-color: rgba(34, 211, 238, 0.28);
  color: #a5f3fc;
}

.btn-ai-trace:hover {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.12);
}

.ai-trace-modal-content {
  max-width: 1120px;
  width: 96%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.ai-trace-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.015);
}

.ai-trace-title {
  color: var(--text-main);
  font-weight: 750;
  font-size: 13px;
}

.ai-trace-subtitle {
  color: var(--text-dark);
  font-size: 12px;
  margin-top: 3px;
}

.ai-chat-panel {
  height: min(68vh, 680px);
  overflow-y: auto;
  padding: 22px 24px;
  background: #05040d;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ai-chat-empty {
  color: var(--text-dark);
  font-style: italic;
  padding: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.ai-log-entry {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-log-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-dark);
  font-size: 11px;
  padding: 0 4px;
}

.ai-log-type {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.24);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 750;
}

.ai-log-model,
.ai-log-time,
.ai-log-tokens {
  color: #94a3b8;
  font-family: var(--font-mono);
}

.ai-chat-row {
  display: flex;
  width: 100%;
}

.ai-chat-row.prompt {
  justify-content: flex-end;
}

.ai-chat-row.response {
  justify-content: flex-start;
}

.ai-chat-bubble {
  width: min(780px, 82%);
  border-radius: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.ai-chat-row.prompt .ai-chat-bubble {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.08));
  border-color: rgba(96, 165, 250, 0.24);
}

.ai-chat-row.response .ai-chat-bubble {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(20, 184, 166, 0.06));
  border-color: rgba(94, 234, 212, 0.20);
}

.ai-chat-row.response.pending .ai-chat-bubble {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(251, 191, 36, 0.05));
  border-color: rgba(251, 191, 36, 0.24);
}

.ai-bubble-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ai-bubble-time {
  color: #94a3b8;
  font-family: var(--font-mono);
  text-transform: none;
  font-weight: 500;
}

.ai-prompt-block,
.ai-response-block {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
}

.ai-prompt-block {
  color: #dbeafe;
}

.ai-response-block {
  color: #ccfbf1;
}

.ai-role-label {
  color: #fbbf24;
  font-weight: 900;
}

.ai-role-label.user {
  color: #93c5fd;
}

.ai-role-label.assistant {
  color: #86efac;
}

.ai-stream-cursor::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -2px;
  background: currentColor;
  animation: ai-cursor-blink 0.9s steps(2, start) infinite;
}

@keyframes ai-cursor-blink {
  0%, 42% { opacity: 1; }
  43%, 100% { opacity: 0; }
}

/* Custom override for Prism Tomorrow */
pre.console-content code[class*="language-"],
pre.console-content[class*="language-"] {
  background: transparent !important;
  text-shadow: none !important;
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  padding: 0 !important;
  margin: 0 !important;
  white-space: pre-wrap !important;
  word-break: break-all !important;
  max-width: 100% !important;
}

/* Standby Showcase Card */
.standby-card {
  flex: 1;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 40px;
  min-height: 480px;
}

.standby-content {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.illustration {
  animation: float 4s ease-in-out infinite;
  position: relative;
}

.illustration circle {
  transform-origin: center;
  animation: rotate-dashed 25s linear infinite;
}

.illustration path {
  filter: drop-shadow(0 0 15px rgba(181, 111, 252, 0.4));
}

@keyframes rotate-dashed {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

.standby-content h3 {
  font-size: 20px;
  font-weight: 700;
}

.standby-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Result Video Card */
.result-card {
  flex: 1;
  min-height: 480px;
  gap: 16px;
}

.video-preview-wrapper {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #020108;
  border: 4px solid #141125;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.08);
  position: relative;
  aspect-ratio: 16/9;
}

.video-preview-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  z-index: 2;
}

.video-preview-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.video-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-glass);
}

@media (max-width: 640px) {
  .video-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 11px;
  color: var(--text-dark);
  font-weight: 600;
  text-transform: uppercase;
}

.meta-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.result-actions {
  display: flex;
  justify-content: flex-end;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 0, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: #080617;
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  animation: scale-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scale-up {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.close {
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}

.close:hover {
  color: #fff;
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

fieldset {
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(255, 255, 255, 0.01);
}

legend {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  padding: 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-col-full {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

input {
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2), 0 0 15px rgba(168, 85, 247, 0.1);
}

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
}

/* Collection assignment list item styles */
.assign-col-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.assign-col-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.assign-col-item.active {
  background: rgba(124, 92, 255, 0.12) !important;
  border-color: rgba(124, 92, 255, 0.4) !important;
  box-shadow: 0 0 10px rgba(124, 92, 255, 0.1);
}

/* Viewer Tabs & Studio integration */
.viewer-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.viewer-tab {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-dark);
  border-radius: 18px;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.viewer-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.viewer-tab.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(59, 130, 246, 0.15));
  border-color: var(--primary);
  color: var(--text-main);
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.studio-card {
  flex: 1;
  min-height: 520px;
}

.studio-iframe-wrapper {
  width: 100%;
  height: 580px;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-glass);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.studio-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Project Selection and Management styling */
.project-selector-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 0 16px;
  height: 42px;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-selector-container:hover {
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.active-project-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dark);
  letter-spacing: 0.5px;
}

.btn-project {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 13px;
  outline: none;
  box-shadow: none !important;
}

.btn-project:hover {
  color: var(--primary) !important;
}

.project-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

/* Project Card styles consolidated under Rich Project Cards section */

.badge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.badge.active-indicator {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.badge.status-running {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
  animation: pulse-badge 1.5s infinite;
}

.badge.status-paused {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge.status-completed {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge.status-failed {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge.status-draft {
  background: rgba(255, 255, 255, 0.05);
  color: #a1a1aa;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge.status-favorite {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge.status-posted {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge.has-video {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge.has-comp {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.project-card .delete-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.project-card .delete-btn:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

@keyframes pulse-badge {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Copy Button Styling */
.btn-copy {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-copy svg {
  display: inline-block;
}

.btn-codex-brief {
  border-color: rgba(34, 211, 238, 0.28);
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.07);
}

.btn-codex-brief:hover {
  border-color: rgba(34, 211, 238, 0.48);
  color: #cffafe;
  background: rgba(34, 211, 238, 0.14);
}

.codex-brief-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  color: var(--text-main);
}

.codex-brief-preview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.codex-brief-preview-header strong {
  color: #67e8f9;
  font-size: 13px;
}

.codex-brief-preview pre {
  margin: 0;
  padding: 14px;
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.62);
  color: #dbeafe;
  font: 12px/1.55 'JetBrains Mono', 'Consolas', monospace;
}

/* Color styling for CLI log highlights */
.log-tag-job {
  color: #c084fc !important; /* Purple */
  font-weight: 700;
}
.log-tag-scraper {
  color: #38bdf8 !important; /* Sky Blue */
  font-weight: 700;
}
.log-tag-capture {
  color: #fb923c !important; /* Orange */
  font-weight: 700;
}
.log-tag-render {
  color: #f472b6 !important; /* Pink */
  font-weight: 700;
}
.log-tag-capture-stdout {
  color: #fbbf24 !important; /* Yellow */
  font-weight: 500;
}
.log-tag-render-stdout {
  color: #a78bfa !important; /* Lavender */
  font-weight: 500;
}
.log-tag-render-stderr {
  color: #f87171 !important; /* Red */
  font-weight: 500;
}
.log-text-success {
  color: #4ade80 !important; /* Neon Green */
  font-weight: 600;
}
.log-text-danger {
  color: #f87171 !important; /* Bright Red */
  font-weight: 600;
}
.log-text-warning {
  color: #fbbf24 !important; /* Gold */
  font-weight: 600;
}

/* Styling for Edit Button Tab */
.btn-edit-video {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-edit-video:hover {
  background: rgba(168, 85, 247, 0.2) !important;
  color: #e9d5ff !important;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.25);
}

/* Selection trigger buttons */
.select-trigger-btn {
  text-align: left;
  justify-content: flex-start;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  font-weight: 500;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.select-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.18);
}

.select-trigger-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

/* Modal selection lists */
.selection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.selection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.selection-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.selection-item.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(59, 130, 246, 0.06));
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.selection-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.selection-item p {
  font-size: 12px;
  color: var(--text-dark);
  line-height: 1.4;
}

.selection-item .item-info {
  flex: 1;
}

.selection-item .item-action {
  margin-left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.layout-template-item {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border-color: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
}

.layout-template-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: none;
}

.layout-template-item.active {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: none;
}

.layout-template-name {
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
}

.layout-template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #888;
  font-size: 11px;
}

.layout-template-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  font-size: 11px;
  font-weight: 600;
}

.layout-template-tag.is-detail {
  padding: 2px 8px;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.12);
}

.btn-project-manage-toggle:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.btn-layout-close:hover {
  color: #fff !important;
}

.btn-duplicate-cleanup-all:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
}

/* Play preview button */
.btn-play-preview {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.btn-play-preview:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--primary-glow);
}

.btn-play-preview.playing {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

/* Live Caption Preview Box */
.caption-preview-box {
  --caption-preview-font: 'AutoCode Noto Sans', sans-serif;
  background: rgba(3, 0, 18, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  position: relative;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.4);
}

.caption-preview-box,
.caption-preview-box * {
  font-family: var(--caption-preview-font) !important;
  font-synthesis: none;
}

.caption-preview-box .preview-title {
  position: absolute;
  top: 10px;
  left: 16px;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: 1px;
}

.caption-font-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
}

.caption-font-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.caption-font-panel-head label {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
}

.caption-font-panel-head span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.caption-font-select {
  width: 100%;
  color: var(--text-main);
  background: rgba(5, 7, 15, 0.76);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

.caption-font-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.caption-font-preview-card {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.18);
}

.caption-font-preview-label {
  margin-bottom: 7px;
  color: var(--text-dark);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.caption-font-preview-text {
  min-height: 52px;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  font-synthesis: none;
}

.preview-text-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.smart-caption-preview-line {
  max-width: 460px;
  min-height: 1.24em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.18em 0.26em;
  padding: 0.36em 0.72em 0.42em;
  border-radius: 18px;
  background: rgba(6, 9, 20, 0.72);
  color: #ffffff;
  font-size: 25px;
  font-weight: 850;
  line-height: 1.16;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -webkit-text-stroke: 0.012em rgba(0, 0, 0, 0.62);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 7px 18px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(0, 0, 0, 0.56);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
}

.smart-caption-preview-line[data-tone="light"] {
  background: rgba(255, 255, 255, 0.84);
  color: #06111f;
  -webkit-text-stroke: 0;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.62),
    0 8px 22px rgba(255, 255, 255, 0.32);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(6, 17, 31, 0.12);
}

.smart-caption-preview-line .caption-word {
  display: inline-block;
  white-space: nowrap;
  opacity: 0.66;
  color: inherit;
  transform: translate3d(0, 0, 0);
}

.smart-caption-preview-line .caption-word.is-past {
  opacity: 0.82;
}

.smart-caption-preview-line .caption-word.is-active {
  opacity: 1;
  color: #ffe66d;
  -webkit-text-stroke: 0.018em rgba(0, 0, 0, 0.66);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.64),
    0 0 24px rgba(255, 230, 109, 0.62),
    0 10px 28px rgba(0, 0, 0, 0.68);
  transform: translate3d(0, -0.03em, 0) scale(1.055);
}

.smart-caption-preview-line[data-tone="light"] .caption-word.is-active {
  color: #064ee4;
  -webkit-text-stroke: 0;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 18px rgba(6, 78, 228, 0.22);
}

.smart-caption-preview-line[data-caption-mode="line"] .caption-word {
  opacity: 1;
}

/* Preview Caption Style animations */
.caption-preview-default {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  animation: preview-default-anim 2s infinite ease-in-out;
}

@keyframes preview-default-anim {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.caption-preview-neon {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 8px #b56ffc, 0 0 15px #b56ffc, 0 0 30px #4f8ff7;
  animation: preview-neon-anim 1.2s infinite alternate ease-in-out;
}

@keyframes preview-neon-anim {
  0% { text-shadow: 0 0 5px #b56ffc, 0 0 10px #b56ffc, 0 0 20px #4f8ff7; transform: scale(0.98); }
  100% { text-shadow: 0 0 12px #b56ffc, 0 0 20px #b56ffc, 0 0 40px #4f8ff7; transform: scale(1.02); }
}

.caption-preview-wipe-word {
  font-size: 24px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
  display: inline-block;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.caption-preview-wipe-word.active {
  color: #a855f7;
  transform: scale(1.15);
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.caption-preview-highlight-word {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-block;
}

.caption-preview-highlight-word.active {
  color: #000;
  background: #fbbf24;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.caption-preview-neon-word {
  font-size: 24px;
  font-weight: 900;
  color: rgba(0, 255, 240, 0.15);
  text-transform: uppercase;
  transition: all 0.2s ease;
  display: inline-block;
}

.caption-preview-neon-word.active {
  color: #00fff0;
  text-shadow: 0 0 8px #00fff0, 0 0 20px #00fff0, 0 0 40px #ff0099;
  transform: scale(1.1);
}

.caption-preview-neon-word.active.kw {
  color: #ff0099;
  text-shadow: 0 0 8px #ff0099, 0 0 20px #ff0099, 0 0 40px #00fff0;
}

/* Weight Shift Preview */
.caption-preview-ws-word {
  font-size: 24px;
  font-weight: 300;
  color: #fff;
  transition: font-weight 0.15s ease, transform 0.15s ease;
  display: inline-block;
  text-transform: lowercase;
}

.caption-preview-ws-word.active {
  font-weight: 700;
  transform: scale(1.08);
}

/* Neon Accent Preview */
.caption-preview-na-word {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  display: inline-block;
  transition: all 0.15s ease;
}

.caption-preview-na-word.active {
  transform: scale(1.1);
  text-shadow: 0 4px 8px rgba(0,0,0,0.8), 0 0 10px #na-glow;
}

.caption-preview-na-word.active.accent {
  transform: scale(1.22);
}

.caption-preview-na-word.active.accent-0 {
  color: #53FF01;
  text-shadow: 0 4px 8px rgba(0,0,0,0.8), 0 0 10px #53FF01, 0 0 20px #53FF01;
}

.caption-preview-na-word.active.accent-1 {
  color: #FF0002;
  text-shadow: 0 4px 8px rgba(0,0,0,0.8), 0 0 10px #FF0002, 0 0 20px #FF0002;
}

.caption-preview-na-word.active.accent-2 {
  color: #FCFF00;
  text-shadow: 0 4px 8px rgba(0,0,0,0.8), 0 0 10px #FCFF00, 0 0 20px #FCFF00;
}

/* Matrix Decode Preview */
.caption-preview-md-word {
  font-size: 24px;
  font-weight: 700;
  color: rgba(0, 255, 65, 0.2);
  text-transform: uppercase;
  display: inline-block;
  transition: color 0.15s ease;
}

.caption-preview-md-word.active {
  color: #00ff41;
  text-shadow: 0 0 8px #00ff41, 0 0 15px rgba(0, 255, 65, 0.5);
}

/* Kinetic Slam Preview */
.caption-preview-ks-word {
  font-size: 26px;
  font-weight: 400;
  color: #fff;
  text-transform: uppercase;
  display: inline-block;
  opacity: 0.15;
}

.caption-preview-ks-word.kw {
  color: #FFD700;
}

.caption-preview-ks-word.active {
  opacity: 1;
  animation: ks-slam-anim 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes ks-slam-anim {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Gradient Fill Preview */
.caption-preview-gr-word {
  font-size: 24px;
  font-weight: 900;
  display: inline-block;
  background: linear-gradient(90deg, #fe9f1b 0%, #f76e49 10%, #ff2063 20%, #fd56cb 30%, #ef7aff 40%, #fe9f1b 50%, white 50.5%, white 100%);
  background-size: 350% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: all 0.2s ease;
}

.caption-preview-gr-word.active {
  background-position: 0% 0;
  transform: scale(1.06);
}

/* Emoji Pop Preview */
.caption-preview-ep-word {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  display: inline-block;
  -webkit-text-stroke: 1.5px #000;
  paint-order: stroke fill;
  text-shadow: 0 4px 8px rgba(0,0,0,0.7);
  transition: transform 0.1s ease, color 0.1s ease;
}

.caption-preview-ep-word.active {
  transform: scale(1.18) rotate(2deg);
  color: #FF76FF;
  text-shadow: 0 4px 8px rgba(0,0,0,0.7), 0 0 8px rgba(255, 118, 255, 0.6);
}

/* Glitch RGB Preview */
.caption-preview-gl-word {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  display: inline-block;
  transition: all 0.1s ease;
}

.caption-preview-gl-word.active {
  color: #fff;
  animation: gl-glitch-anim 0.2s steps(2, start) infinite;
}

@keyframes gl-glitch-anim {
  0% { transform: translate(-2px, 0); text-shadow: 2px 0 #ff003c, -2px 0 #00e5ff, 0 4px 10px rgba(0,0,0,0.5); }
  50% { transform: translate(2px, 0); text-shadow: -2px 0 #ff003c, 2px 0 #00e5ff, 0 4px 10px rgba(0,0,0,0.5); }
  100% { transform: translate(0, 0); text-shadow: 0 5px 18px rgba(0,0,0,0.5); }
}

/* Pill Karaoke Preview */
.caption-preview-pk-word {
  font-size: 16px;
  font-weight: 700;
  color: #A6A6A6;
  background: rgba(231, 229, 231, 0.2);
  padding: 6px 12px;
  border-radius: 12px;
  display: inline-block;
  margin: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.15s ease;
}

.caption-preview-pk-word.active {
  color: #1C1E1D;
  background: #e7e5e7;
  border-color: #e7e5e7;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

/* Editorial Emphasis Preview */
.caption-preview-ee-word {
  font-size: 18px;
  color: #f5f0d0;
  opacity: 0.65;
  display: inline-block;
  transition: all 0.15s ease;
}

.caption-preview-ee-word.active {
  opacity: 1;
  transform: scale(1.05);
}

.caption-preview-ee-word.italic {
  font-style: italic;
}

.caption-preview-ee-word.kw {
  font-weight: 800;
  font-size: 26px;
  font-style: italic;
  color: #f5f0d0;
  line-height: 0.9;
}

/* Parallax Layers Preview */
.caption-preview-pl-word {
  font-size: 20px;
  color: #eeeeee;
  opacity: 0.6;
  display: inline-block;
  transition: all 0.15s ease;
}

.caption-preview-pl-word.active {
  opacity: 1;
  transform: scale(1.06);
}

.caption-preview-pl-word.kw {
  font-size: 28px;
  color: #e50914;
  -webkit-text-stroke: 0.8px #e50914;
  font-weight: bold;
  text-shadow: 1px 2px 2px #a30610;
}

/* Particle Burst Preview */
.caption-preview-pb-word {
  font-size: 20px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.45);
  display: inline-block;
  transition: all 0.1s ease;
}

.caption-preview-pb-word.active {
  color: #ffffff;
  transform: scale(1.05);
}

.caption-preview-pb-word.active.kw {
  color: #FFD700;
  transform: scale(1.12);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Texture Preview */
.caption-preview-tx-word {
  font-size: 22px;
  color: #ffd0a0;
  opacity: 0.55;
  display: inline-block;
  transition: all 0.15s ease;
}

.caption-preview-tx-word.active {
  opacity: 1;
  transform: scale(1.1);
  background: linear-gradient(135deg, #ffd0a0 0%, #ff8c00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(255, 100, 20, 0.45);
}

/* Blend Difference Preview */
.caption-preview-bd-word {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  opacity: 0.5;
  display: inline-block;
  transition: all 0.15s ease;
}

.caption-preview-bd-word.active {
  opacity: 1;
  color: #121212;
  background: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
}

.studio-render-settings-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.42);
}

.studio-render-settings-header,
.studio-render-setting-row,
.studio-render-setting-actions {
  display: flex;
  align-items: center;
}

.studio-render-settings-header,
.studio-render-setting-row {
  justify-content: space-between;
  gap: 12px;
}

.studio-render-settings-title {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
}

.studio-render-settings-desc,
.studio-render-setting-value {
  color: var(--text-dark);
  font-size: 11px;
  line-height: 1.4;
}

.studio-render-settings-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.studio-render-setting-row {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.studio-render-setting-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.studio-render-setting-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.studio-render-setting-actions .caption-toggle-wrapper {
  margin: 0;
  padding: 0;
}

.studio-render-setting-btn {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
}

.studio-render-apply-btn {
  margin-top: 2px;
  border-color: rgba(34, 211, 238, 0.3);
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.08);
}

/* Custom Checkbox Styling */
input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================================================
   NAVIGATION & VIEWS OVERHAUL
   ========================================================================== */

/* Navigation Header Menu */
.app-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 4px;
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dark);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  height: 38px;
}

.nav-item svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-item:hover svg {
  opacity: 1;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(236, 72, 153, 0.25);
  color: #fff;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.08);
}

.nav-item.active svg {
  opacity: 1;
  color: #f472b6;
}

.active-project-indicator-header {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  margin-right: 12px;
}

/* Page views transitions */
.app-view {
  display: none;
  flex: 1;
  flex-direction: column;
}

.app-view.active {
  display: flex;
  animation: fade-in-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fade-in-slide-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-header {
  margin-bottom: 24px;
}

.view-header h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffffff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
}

/* Projects screen layouts */
.projects-view-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
  flex: 1;
}

@media (max-width: 1024px) {
  .projects-view-grid {
    grid-template-columns: 1fr;
  }
}

/* Active Processes Panel */
.active-processes-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.active-processes-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

/* Process Item Card */
.process-item {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.process-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #c084fc, #3b82f6);
  border-radius: 3px 0 0 3px;
}

.process-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(168, 85, 247, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.1);
}

.process-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

.process-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.btn-cancel-process {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cancel-process:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.process-status-text {
  font-size: 12px;
  color: var(--text-dark);
  margin-bottom: 12px;
}

/* Premium Visual Stepper */
.process-steps-wrapper {
  position: relative;
  padding: 6px 0;
  margin-top: 14px;
}

.process-steps-connector {
  position: absolute;
  top: 9px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.process-steps-progress {
  position: absolute;
  top: 9px;
  left: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, #34d399, #c084fc);
  z-index: 1;
  transition: width 0.5s ease;
}

.process-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 25%;
  color: var(--text-dark);
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

.process-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 6px;
  border: 1px solid #100b26;
  transition: all 0.3s ease;
}

.process-step.active {
  color: #c084fc;
  font-weight: 700;
}

.process-step.active .process-step-dot {
  background: #c084fc;
  box-shadow: 0 0 10px #c084fc, 0 0 20px rgba(168, 85, 247, 0.4);
  transform: scale(1.4);
}

.process-step.completed {
  color: #34d399;
}

.process-step.completed .process-step-dot {
  background: #34d399;
  transform: scale(1.1);
}

/* Empty State for Processes */
.processes-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.005);
}

.processes-empty-icon {
  font-size: 28px;
  margin-bottom: 12px;
  opacity: 0.6;
  animation: float-icon 3s ease-in-out infinite alternate;
}

@keyframes float-icon {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

.processes-empty-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.processes-empty-subtext {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Asset library layout */
.assets-view-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  flex: 1;
}

@media (max-width: 900px) {
  .assets-view-grid {
    grid-template-columns: 1fr;
  }
}

.assets-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}

.assets-content {
  flex: 1;
}

/* Upload drag & drop */
.upload-dropzone {
  background: rgba(168, 85, 247, 0.01);
  border: 2px dashed rgba(168, 85, 247, 0.2);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.12);
}

.upload-dropzone span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.upload-dropzone .upload-subtext {
  font-size: 10px;
  color: var(--text-dark);
  line-height: 1.4;
}

/* Filter buttons styling */
.asset-filters {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
}

.asset-filters h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(59, 130, 246, 0.1));
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(168, 85, 247, 0.05);
}

/* Assets card grid */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 6px;
}

.no-assets-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dark);
  font-size: 13px;
}

/* Asset Card Glass */
.asset-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.asset-card:hover {
  border-color: var(--border-glass-glow);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(168, 85, 247, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.asset-preview-area {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #04020a;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.asset-preview-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.asset-preview-area video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Category Badge inside Card */
.asset-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.asset-badge.image { background: rgba(59, 130, 246, 0.85); color: #fff; }
.asset-badge.video { background: rgba(168, 85, 247, 0.85); color: #fff; }
.asset-badge.audio { background: rgba(6, 182, 212, 0.85); color: #fff; }

.asset-details {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.asset-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-desc {
  font-size: 11px;
  color: var(--text-dark);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* AI Metadata Styling */
.asset-ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.asset-ai-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  font-weight: 500;
  padding: 1.5px 5px;
  border-radius: 4px;
}

.asset-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
}

.asset-colors-container {
  display: flex;
  gap: 6px;
  align-items: center;
}

.asset-metadata-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  margin-top: auto;
}

.asset-meta-row {
  display: flex;
  justify-content: space-between;
}

.asset-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.asset-actions .btn {
  flex: 1;
  padding: 6px 12px;
  font-size: 11px;
  height: 28px;
  border-radius: 8px;
}

/* Audio interactive button overlay */
.play-overlay-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(168, 85, 247, 0.3);
}

.play-overlay-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.45);
}

/* Custom CSS scrollbar tweaks for lists */
.asset-grid::-webkit-scrollbar,
.projects-list-card::-webkit-scrollbar {
  width: 6px;
}
.asset-grid::-webkit-scrollbar-thumb,
.projects-list-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
}
.asset-grid::-webkit-scrollbar-thumb:hover,
.projects-list-card::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.25);
}

/* ====================================================
   SETTINGS DIALOG TABS & API CONNECTION TEST BUTTONS
   ==================================================== */
.settings-tabs-nav {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border-glass);
  margin-bottom: 18px;
}

.settings-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: var(--text-dark);
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.settings-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.settings-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #c084fc;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.08);
}

.settings-tab-btn svg {
  transition: transform 0.25s ease;
}

.settings-tab-btn.active svg {
  transform: scale(1.05);
}

.settings-tab-content {
  display: none;
}

.settings-tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: tab-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.social-publish-modal {
  max-width: 680px;
}

.social-publish-body {
  gap: 16px;
}

.social-publish-project {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.social-platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.social-platform-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.social-platform-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.social-publish-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-publish-result {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-publish-result.success {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
}

.social-publish-result.error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}

.social-publish-result a {
  color: inherit;
  overflow-wrap: anywhere;
}

@keyframes tab-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.test-connection-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.test-connection-wrapper.mini-test {
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.04);
}

.ai-profile-manager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.04);
}

.ai-profile-selector {
  min-width: 0;
}

.ai-profile-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ai-profile-header-row label {
  margin: 0;
}

.ai-profile-active-note {
  color: var(--text-dark);
  font-size: 11px;
}

.ai-profile-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ai-profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.ai-profile-row.active {
  border-color: rgba(236, 72, 153, 0.68);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(124, 92, 255, 0.1));
}

.ai-profile-row.editing {
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.28);
}

.ai-profile-row-main {
  min-width: 0;
}

.ai-profile-row-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-bottom: 4px;
}

.ai-profile-row-name {
  overflow: hidden;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-profile-row-meta {
  overflow: hidden;
  color: var(--text-dark);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-profile-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.ai-profile-badge.active {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}

.ai-profile-badge.editing {
  color: #93c5fd;
  background: rgba(147, 197, 253, 0.12);
}

.ai-profile-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.btn-profile-row-action {
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.ai-profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ai-profile-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: 8px;
  background: rgba(147, 197, 253, 0.035);
}

.ai-profile-editor-header {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-profile-editor-title {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.ai-profile-editor-subtitle {
  margin-top: 2px;
  color: var(--text-dark);
  font-size: 11px;
}

.ai-profile-editor > .form-row {
  display: contents;
}

.ai-profile-editor .form-col,
.ai-profile-editor .form-col-full {
  min-width: 0;
  width: auto;
  gap: 6px;
}

.ai-profile-editor label {
  margin-bottom: 6px;
  font-size: 12px;
}

.ai-profile-editor input,
.ai-profile-editor select {
  min-height: 38px;
  padding: 8px 12px;
}

.ai-profile-editor .model-discovery-panel {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 10px;
}

.ai-profile-editor > .model-dropdown-menu {
  grid-column: 1 / -1;
}

.ai-profile-editor .model-discovery-actions {
  margin-bottom: 8px;
}

.ai-profile-editor .model-discovery-message {
  margin-bottom: 8px;
}

.ai-profile-editor .test-connection-wrapper {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 10px;
}

.btn-profile-action {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-profile-danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.05);
}

.btn-profile-danger:hover {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.45) !important;
  background: rgba(248, 113, 113, 0.1) !important;
}

.model-discovery-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.model-input-wrapper {
  position: relative;
  width: 100%;
}

.model-input-wrapper input {
  width: 100%;
  padding-right: 42px;
}

.btn-model-menu {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.btn-model-menu:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.model-dropdown-menu {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 8px;
  background: #0f1020;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

.model-dropdown-option {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.model-dropdown-option:hover {
  background: rgba(147, 197, 253, 0.12);
}

.model-dropdown-id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-dropdown-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  font-size: 10px;
  font-weight: 700;
}

.model-dropdown-empty {
  padding: 10px;
  color: var(--text-dark);
  font-size: 12px;
}

.model-discovery-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.model-discovery-message {
  min-height: 0;
  margin: -4px 0 10px;
  color: var(--text-dark);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.model-discovery-message.error {
  color: #fca5a5;
}

.model-discovery-message.success {
  color: #93c5fd;
}

.model-discovery-message.warning {
  color: #fbbf24;
}

.btn-list-models {
  height: 30px;
  font-size: 12px;
  padding: 0 12px;
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.3);
  background: transparent;
}

.btn-list-models:hover {
  background: rgba(147, 197, 253, 0.08) !important;
  border-color: rgba(147, 197, 253, 0.5) !important;
}

.model-reasoning-row {
  margin-bottom: 0;
}

.model-capability-note {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  line-height: 1.35;
}

.model-capability-note.positive {
  color: #34d399;
}

.model-capability-note.muted {
  color: var(--text-dark);
}

.btn-test-connection {
  font-size: 12px;
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc;
  background: transparent;
  transition: all 0.2s ease;
}

.btn-test-connection:hover {
  background: rgba(168, 85, 247, 0.08) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
}

.btn-test-connection.btn-test-mini {
  height: 28px;
  font-size: 11px;
  padding: 0 10px;
}

.connection-status-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.connection-status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: inline-block;
  transition: all 0.3s ease;
}

.connection-status-badge.testing {
  color: #fbbf24;
}

.connection-status-badge.testing::before {
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
  animation: conn-pulse 0.8s infinite alternate;
}

.connection-status-badge.success {
  color: #34d399;
}

.connection-status-badge.success::before {
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
}

.connection-status-badge.error {
  color: #f87171;
}

.connection-status-badge.error::before {
  background: #f87171;
  box-shadow: 0 0 10px #f87171;
}

@keyframes conn-pulse {
  from { transform: scale(0.9); opacity: 0.6; }
  to { transform: scale(1.2); opacity: 1; }
}

/* ==========================================================================
   DAM (DIGITAL ASSET MANAGEMENT) SYSTEM & ASSET LIBRARY REDESIGN
   ========================================================================== */

/* ==========================================================================
   DAM (DIGITAL ASSET MANAGEMENT) SYSTEM & WORKSPACE ASSETS VIEW
   ========================================================================== */

:root {
  --dam-bg: var(--bg-color);
  --dam-surface: var(--bg-glass);
  --dam-border: var(--border-glass);
  --dam-border-glow: var(--border-glass-glow);
  --dam-primary: var(--primary);
  --dam-secondary: var(--tertiary);
}

.dam-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: calc(100vh - 130px);
  background: var(--dam-bg);
  border-radius: var(--radius);
  border: 1px solid var(--dam-border);
  overflow: hidden;
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* Sidebar Columns */
.dam-sidebar {
  width: 280px;
  min-width: 280px;
  height: 100%;
  border-right: 1px solid var(--dam-border);
  background: rgba(13, 11, 28, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 18px;
  transition: var(--transition-smooth);
}

.dam-sidebar::-webkit-scrollbar {
  width: 4px;
}
.dam-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.dam-nav-section,
.dam-filter-section {
  margin-bottom: 24px;
}

.dam-sidebar-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dark);
  margin-bottom: 14px;
  padding-left: 8px;
  opacity: 0.85;
}

.dam-sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dam-sidebar-menu li {
  margin-bottom: 6px;
}

.dam-sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.dam-sidebar-menu li:hover a {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
}

.dam-sidebar-menu li.active a {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
  color: var(--primary);
  border-color: rgba(236, 72, 153, 0.25);
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.05);
}

.dam-sidebar-menu li a svg {
  opacity: 0.7;
  transition: color 0.2s;
}

.dam-sidebar-menu li.active a svg {
  color: var(--primary);
  opacity: 1;
}

/* Faceted Filters Groups */
.dam-filter-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 14px 6px;
}

.dam-filter-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  user-select: none;
}

.dam-filter-group-header .chevron {
  font-size: 9px;
  color: var(--text-dark);
  transition: transform 0.2s ease;
}

.dam-filter-group.collapsible:not(.open) .dam-filter-group-content {
  display: none;
}

.dam-filter-group.collapsible:not(.open) .chevron {
  transform: rotate(-90deg);
}

.dam-filter-group-content {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fade-in-down 0.2s ease;
}

.dam-sidebar-collections-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dam-checkbox-label,
.dam-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.dam-checkbox-label:hover,
.dam-radio-label:hover {
  color: #fff;
}

.dam-checkbox-label input[type="checkbox"],
.dam-radio-label input[type="radio"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.dam-select {
  background: var(--dam-surface);
  border: 1px solid var(--dam-border);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  width: 100%;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dam-select + .dam-select {
  margin-top: 8px;
}

.dam-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.dam-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dam-tag-cloud-pill {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dam-tag-cloud-pill:hover,
.dam-tag-cloud-pill.active {
  background: rgba(236, 72, 153, 0.12);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.2);
}

.dam-empty-tags-label {
  font-size: 12px;
  color: var(--text-dark);
  padding-left: 8px;
}

.dam-color-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.color-filter-pill {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.color-filter-pill:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-filter-red {
  background: #ef4444;
}

.color-filter-orange {
  background: #f97316;
}

.color-filter-yellow {
  background: #eab308;
}

.color-filter-green {
  background: #22c55e;
}

.color-filter-blue {
  background: #3b82f6;
}

.color-filter-purple {
  background: #a855f7;
}

.color-filter-white {
  background: #ffffff;
  border: 1px solid rgba(255,255,255,0.4);
}

.color-filter-black {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.15);
}

.color-filter-pill.active {
  transform: scale(1.1);
  border-color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

.color-filter-pill.active::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* DAM Content Pane */
.dam-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--dam-bg);
  position: relative;
  overflow: hidden;
}

.dam-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--dam-border);
  background: rgba(13, 11, 28, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

.dam-search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 420px;
  order: 1;
}

.dam-search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--dam-border);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: var(--transition-smooth);
}

.dam-search-box input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 12px var(--primary-glow);
}

.dam-search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dark);
  pointer-events: none;
}

.dam-quick-filters {
  display: flex;
  gap: 4px;
  order: 3;
  width: 100%;
}

.quick-filter-btn {
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quick-filter-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.quick-filter-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(99, 102, 241, 0.2));
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.15);
}

.dam-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  order: 2;
  margin-left: auto;
}

.btn-icon-only {
  padding: 10px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dam-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dam-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: rgba(13, 11, 28, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 6px;
  min-width: 170px;
  z-index: 120;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.dam-dropdown-menu.open {
  display: block;
  animation: fade-in-down 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dam-dropdown-item {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.15s;
}

.dam-dropdown-item:hover,
.dam-dropdown-item.active {
  background: rgba(236, 72, 153, 0.1);
  color: var(--primary);
}

.dam-view-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--dam-border);
  border-radius: 10px;
  padding: 3px;
}

.view-toggle-btn {
  border: none;
  background: transparent;
  color: var(--text-dark);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.view-toggle-btn.active {
  background: var(--primary);
  color: #fff;
}

.btn-upload-dam {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-weight: 700;
}

.dam-total-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(236, 72, 153, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid rgba(236, 72, 153, 0.15);
  white-space: nowrap;
}

#btn-dam-multiselect-toggle.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.4);
}

.selection-marquee {
  position: absolute;
  border: 1.5px solid var(--primary);
  background: rgba(236, 72, 153, 0.08);
  border-radius: 4px;
  pointer-events: none;
  z-index: 10000;
  display: none;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.15);
}

.btn-dam-danger {
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.05);
  color: #f87171;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 12px;
  transition: var(--transition-smooth);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}

.btn-dam-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.btn-dam-danger:active {
  transform: scale(0.98);
}

/* Upload Progress */
.dam-progress-card {
  background: rgba(236, 72, 153, 0.08);
  border: 1px solid rgba(236, 72, 153, 0.25);
  padding: 12px 18px;
  border-radius: 12px;
  margin: 16px 24px 0 24px;
}

.dam-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.dam-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.dam-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.2s ease;
}

/* Bulk Action Sticky Toolbar */
.dam-bulk-toolbar {
  position: sticky;
  top: 0;
  margin: 0 24px 16px 24px;
  background: rgba(13, 11, 28, 0.85);
  border: 1px solid rgba(236, 72, 153, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 99;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 15px rgba(236, 72, 153, 0.15);
  animation: slide-down-fade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bulk-selected-count {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.bulk-actions-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 16px;
}

.bulk-actions-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-secondary-glass {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-secondary-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary-glass:active {
  transform: scale(0.97);
}

/* DAM Viewport */
.dam-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.dam-viewport::-webkit-scrollbar {
  width: 8px;
}
.dam-viewport::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* DAM Grid Card Redesign */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 16px;
}

.asset-card {
  position: relative;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.asset-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-glow);
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  background: rgba(236, 72, 153, 0.02);
}

.asset-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.25);
  background: rgba(236, 72, 153, 0.04);
}

/* Selected overlay */
.asset-card.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(236, 72, 153, 0.03);
  pointer-events: none;
  z-index: 1;
}

/* Premium Selection Indicator (div-based, circular glassmorphism) */
.asset-card-select-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(13, 11, 28, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-card-select-indicator svg {
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.asset-card:hover .asset-card-select-indicator,
.asset-card-select-indicator.checked {
  opacity: 1;
}

.asset-card-select-indicator.checked {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
  transform: scale(1);
}

.asset-card-select-indicator.checked svg {
  opacity: 1;
}

.asset-card-actions-menu {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s;
}

.asset-card:hover .asset-card-actions-menu {
  opacity: 1;
}

.btn-asset-3dot {
  background: rgba(3, 1, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-asset-3dot:hover {
  background: rgba(3, 1, 12, 0.8);
}

.asset-card-quick-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(13, 11, 28, 0.95), rgba(13, 11, 28, 0.6) 70%, transparent);
  padding: 20px 8px 8px 8px;
  display: flex;
  justify-content: center;
  gap: 6px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.asset-card:hover .asset-card-quick-actions {
  transform: translateY(0);
}

.asset-card-quick-actions .btn {
  padding: 5px 7px;
  font-size: 10px;
  border-radius: 6px;
  font-weight: 700;
  min-width: 0;
}

.asset-preview-area {
  position: relative;
  aspect-ratio: 16/10;
  background: #05070f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-glass);
}

.asset-preview-area img,
.asset-preview-area video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.asset-color-pills-row {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.color-palette-pill {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.asset-ai-status-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.asset-ai-status-badge.analyzed {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.asset-ai-status-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}
.asset-ai-status-badge.analyzing {
  background: rgba(234, 179, 8, 0.25);
  color: #fbbf24;
  animation: pulse-analyzing 1.5s infinite ease-in-out;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.asset-ai-status-badge.failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

@keyframes pulse-analyzing {
  0% {
    opacity: 0.6;
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.1);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 8px 1px rgba(251, 191, 36, 0.3);
  }
  100% {
    opacity: 0.6;
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.1);
  }
}

.asset-details {
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.asset-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dark);
  margin-top: 4px;
}

.asset-ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.asset-ai-tag {
  font-size: 9px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dark);
  padding: 1px 6px;
  border-radius: 4px;
}

/* List View Table */
.dam-list-viewport {
  width: 100%;
  overflow-x: auto;
  background: rgba(13, 11, 28, 0.2);
  border-radius: var(--radius);
  border: 1px solid var(--border-glass);
}

.dam-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.dam-table th {
  padding: 14px 16px;
  background: var(--dam-surface);
  color: var(--text-dark);
  font-weight: 700;
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 10;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.dam-table th:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
}

.dam-table th .sort-indicator {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.5;
}

.dam-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
  color: var(--text-muted);
}

.dam-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.dam-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.dam-table tbody tr.selected {
  background: rgba(236, 72, 153, 0.06);
}

.col-checkbox {
  width: 40px;
  text-align: center;
}

.col-preview {
  width: 70px;
}

.col-actions {
  width: 80px;
  text-align: right;
}

.col-name {
  font-weight: 600;
  color: #fff;
}

.col-type {
  text-transform: uppercase;
}

.col-actions-wrapper {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.dam-table-preview-cell {
  width: 48px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  background: #05070f;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dam-table-preview-cell img,
.dam-table-preview-cell video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.dam-table .btn-sm {
  padding: 4px 8px;
  font-size: 11px;
}

/* Detail Drawer (Right side Panel) */
.dam-detail-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background: rgba(13, 11, 28, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-glass);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 105;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.dam-detail-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.15);
}

.drawer-header h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-header .close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.drawer-header .close-btn:hover {
  color: #fff;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.drawer-content::-webkit-scrollbar {
  width: 6px;
}
.drawer-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.detail-preview-panel {
  width: 100%;
  aspect-ratio: 16/10;
  background: #05070f;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.detail-preview-panel img,
.detail-preview-panel video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.detail-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.detail-actions-row .btn {
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
}

.btn-delete-danger {
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.03);
}
.btn-delete-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
}

.detail-spec-group {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 16px;
}

.detail-spec-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.spec-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--tertiary);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.spec-item .label {
  color: var(--text-dark);
}

.spec-item .value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  max-width: 60%;
  text-align: right;
  word-break: break-all;
}

.ai-meta-item {
  margin-bottom: 14px;
}

.ai-meta-item .label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.ai-description-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0;
}

.ai-pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-tag-pill {
  font-size: 11px;
  font-weight: 600;
  background: rgba(236, 72, 153, 0.08);
  border: 1px solid rgba(236, 72, 153, 0.18);
  color: #f472b6;
  padding: 4px 8px;
  border-radius: 6px;
}

.ai-color-palette {
  display: flex;
  gap: 6px;
}

.ai-color-palette-box {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
}

.ai-color-palette-box::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -4px);
  background: #000;
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}

.ai-color-palette-box:hover::after {
  opacity: 1;
}

/* Empty State Container */
.dam-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 350px;
}

.empty-state-card {
  max-width: 440px;
  text-align: center;
  padding: 40px;
  background: var(--bg-glass);
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.empty-state-card:hover,
.empty-state-card.dragover {
  border-color: var(--primary);
  background: rgba(236, 72, 153, 0.04);
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.05);
}

.empty-illustration {
  margin-bottom: 18px;
}

.empty-state-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
}

.empty-state-card p {
  font-size: 13px;
  color: var(--text-dark);
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.supported-formats-guide {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
}

/* Placeholder loading / error cells */
.dam-loading-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  color: var(--text-dark);
  font-size: 13.5px;
  font-weight: 600;
}

.dam-error-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  color: var(--error);
  font-size: 13.5px;
  font-weight: 600;
}

.play-overlay-btn-mini {
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.play-overlay-btn-mini:hover {
  transform: scale(1.15);
  color: #fff;
}

/* ==========================================================================
   DAM SYSTEM RESPONSIVENESS AND COLLAPSIBLE SIDEBAR RULES
   ========================================================================== */

/* Global App Header Responsiveness */
@media (max-width: 1024px) {
  .app-header {
    flex-direction: column;
    gap: 16px;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  .app-header .actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .active-project-indicator-header {
    margin-right: 0;
  }
}

@media (max-width: 640px) {
  .app-container {
    padding: 12px;
  }
  .logo-icon {
    width: 38px;
    height: 38px;
  }
  .brand-text h1 {
    font-size: 20px;
  }
  .nav-item {
    font-size: 0 !important;
    padding: 8px 12px !important;
    width: 42px;
    justify-content: center;
  }
  .nav-item svg {
    margin: 0 !important;
    width: 18px;
    height: 18px;
  }
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
  .ai-profile-manager {
    grid-template-columns: 1fr;
  }
  .ai-profile-header-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .ai-profile-row {
    grid-template-columns: 1fr;
  }
  .ai-profile-row-actions {
    justify-content: stretch;
  }
  .btn-profile-row-action {
    flex: 1;
  }
  .ai-profile-editor {
    grid-template-columns: 1fr;
  }
  .ai-profile-actions {
    justify-content: stretch;
  }
  .btn-profile-action {
    flex: 1;
  }
  #btn-settings span {
    display: none !important;
  }
  #btn-settings {
    padding: 10px !important;
    aspect-ratio: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
  }
}

/* DAM Container Layout Responsiveness */
@media (max-width: 1024px) {
  .dam-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 110;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--dam-surface);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.7);
  }

  .dam-container.sidebar-open .dam-sidebar {
    transform: translateX(0);
  }

  /* DAM Toolbar Multi-row Layout */
  .dam-toolbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }
  .dam-search-box {
    max-width: none;
    width: 100%;
    order: 1;
  }
  .dam-quick-filters {
    order: 3;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .dam-quick-filters::-webkit-scrollbar {
    display: none;
  }
  .quick-filter-btn {
    flex-shrink: 0;
  }
  .dam-toolbar-actions {
    order: 2;
    width: 100%;
    justify-content: flex-end;
  }

  /* List view column reduction */
  .dam-table th:nth-child(6), .dam-table td:nth-child(6), /* Resolution */
  .dam-table th:nth-child(8), .dam-table td:nth-child(8), /* Project */
  .dam-table th:nth-child(9), .dam-table td:nth-child(9)  /* Owner */ {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .dam-table th:nth-child(5), .dam-table td:nth-child(5), /* Size */
  .dam-table th:nth-child(10), .dam-table td:nth-child(10) /* Date */ {
    display: none !important;
  }

  /* Mobile bottom Bulk Action Bar */
  .dam-bulk-toolbar {
    position: sticky;
    bottom: 0;
    top: auto;
    margin: 16px 0 0 0;
    border-radius: 14px 14px 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }
  .bulk-actions-divider {
    display: none;
  }
  .bulk-actions-buttons {
    justify-content: center;
    gap: 6px;
  }
  .btn-secondary-glass {
    padding: 6px 10px;
    font-size: 11.5px;
  }
}

@media (max-width: 640px) {
  .dam-toolbar-actions {
    justify-content: space-between;
  }
  .btn-upload-dam span,
  #btn-dam-sort span {
    display: none; /* Hide text label on mobile, keep icon only */
  }
  .btn-upload-dam,
  #btn-dam-sort {
    padding: 10px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .dam-detail-drawer {
    width: 100%;
  }
}

.studio-caption-badge:hover {
  background: rgba(168, 85, 247, 0.2) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

/* Custom Premium Switch Slider */
.switch-container {
  display: inline-block;
  position: relative;
  width: 34px;
  height: 20px;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: #a1a1aa;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.switch-container input:checked + .switch-slider {
  background-color: rgba(236, 72, 153, 0.15) !important;
  border-color: var(--primary) !important;
}

.switch-container input:checked + .switch-slider::before {
  transform: translateX(14px);
  background-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* ====================================================
   UPGRADED PROJECT LIBRARY & RENDER QUEUE STYLING
   ==================================================== */

.project-library-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.library-tabs-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.library-tabs-container::-webkit-scrollbar {
  height: 4px;
}

.library-tabs-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.library-tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #a1a1aa;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.library-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.library-tab-btn.active {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #c084fc !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.library-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

#library-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
}

#library-search-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.filter-selects {
  display: flex;
  gap: 8px;
}

.filter-select {
  background: #080614;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.filter-select:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.filter-select:focus {
  border-color: var(--primary);
}

/* Rich Project Cards */
.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border-glass);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0 !important; /* Reset padding to style thumbnail cleanly */
  transition: var(--transition-smooth);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--border-glass-glow);
  background: rgba(236, 72, 153, 0.02);
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

.project-card.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

.project-card.selected {
  border-color: var(--error) !important;
  background: rgba(239, 68, 68, 0.04) !important;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.12) !important;
}

.project-card-header-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-glass);
  overflow: hidden;
}

.project-card-header-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card-header-thumb img.is-hidden {
  display: none;
}

.project-card:hover .project-card-header-thumb img {
  transform: scale(1.08);
}

.project-card-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-dark);
}

.project-card-thumb-initials {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.project-card-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(3, 1, 12, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-card-ratio-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #e4e4e7;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.project-card-favorite-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(3, 1, 12, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.project-card-favorite-toggle:hover {
  background: rgba(3, 1, 12, 0.85);
  transform: scale(1.15);
  color: var(--error);
}

.project-card-favorite-toggle.is-favorite {
  color: var(--error) !important;
}

.project-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.project-card-body h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
}

.project-card-body p.desc {
  font-size: 11px;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.4;
  height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.project-card-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.project-card-meta-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 10px;
  color: var(--text-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
  margin-top: auto;
}

.project-card-meta-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.project-card-meta-label {
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.5px;
  color: var(--text-dark);
}

.project-card-meta-value {
  color: var(--text-muted);
  font-weight: 600;
}

.project-card-meta-value-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.project-card-meta-value-ellipsis-large {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.project-card-tag-pill {
  font-size: 9px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-dark);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Config Section Inside Card */
.project-card-config-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: #c084fc;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.project-card-config-toggle:hover {
  color: #ffffff;
}

.project-card-config-toggle .chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 8px;
}

.project-card-config-details {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 10px;
  color: var(--text-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 8px;
  margin-top: 4px;
}

.project-card-checkbox {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  z-index: 15;
}

.project-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

.project-card-action-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 6px 0;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.project-card-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.project-card-action-btn:active {
  transform: scale(0.97);
}

.project-card-action-btn.btn-open {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: #fff;
}

.project-card-action-btn.btn-open:hover {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.project-card-action-btn.btn-delete {
  flex: 0 0 28px;
  color: var(--error);
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
}

.project-card-action-btn.btn-delete:hover {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

.project-card-action-btn.btn-resume {
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.project-card-action-btn.btn-resume:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

/* Empty Project State */
.project-list-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-glass);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.project-list-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.project-list-empty-svg {
  color: var(--text-dark);
  opacity: 0.5;
}

.project-list-empty-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  font-size: 14px;
}

.project-list-empty-desc {
  font-size: 11px;
}

/* Detailed Render Queue Card */
.render-queue-panel {
  display: flex;
  flex-direction: column;
}

.queue-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
}

.queue-card.paused {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.01);
}

.queue-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.queue-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.queue-card-meta {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: #71717a;
}

.queue-card-progress-bar-wrapper {
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.queue-card-progress-bar {
  background: linear-gradient(90deg, var(--primary) 0%, #3b82f6 100%);
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.queue-card-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.queue-card-step-text {
  color: #a1a1aa;
  font-weight: 600;
}

.queue-card-percent {
  font-weight: 700;
  color: #c084fc;
}

.queue-card-stages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 10px;
  column-gap: 6px;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 8px;
  margin-top: 4px;
}

.queue-stage-dot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  opacity: 0.35;
  transition: all 0.2s ease;
}

.queue-stage-dot-item.active {
  opacity: 1;
}

.queue-stage-dot-item.completed {
  opacity: 0.8;
}

.queue-stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #71717a;
  transition: all 0.3s ease;
}

.queue-stage-dot-item.active .queue-stage-dot {
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
  transform: scale(1.3);
}

.queue-stage-dot-item.completed .queue-stage-dot {
  background: #10b981;
}

.queue-stage-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #a1a1aa;
}

.queue-stage-dot-item.active .queue-stage-label {
  color: #fff;
}

.queue-stage-dot-item.completed .queue-stage-label {
  color: #34d399;
}

.queue-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 8px;
}

.queue-card-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.queue-card-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.12);
}

.queue-card-btn.btn-pause {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.15);
}

.queue-card-btn.btn-pause:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #000;
}

.queue-card-btn.btn-resume {
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.15);
}

.queue-card-btn.btn-resume:hover {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.queue-card-btn.btn-abort {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
}

.queue-card-btn.btn-abort:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* Transparent checkerboard background pattern for PNG/SVG previews */
.asset-preview-area.transparent-asset,
.detail-preview-panel.transparent-asset {
  background-color: #1a1a2e !important;
  background-image:
    linear-gradient(45deg, #121220 25%, transparent 25%, transparent 75%, #121220 75%, #121220),
    linear-gradient(45deg, #121220 25%, transparent 25%, transparent 75%, #121220 75%, #121220) !important;
  background-size: 16px 16px !important;
  background-position: 0 0, 8px 8px !important;
}

/* SVG logo display size limitation (only show 50% width/height of preview frame to keep margins) */
.asset-preview-area.transparent-asset.svg-asset img,
.detail-preview-panel.transparent-asset.svg-asset img {
  max-width: 50% !important;
  max-height: 50% !important;
  object-fit: contain !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.asset-card:hover .asset-preview-area.transparent-asset.svg-asset img {
  transform: scale(1.1);
}

/* ==========================================================================
   UNIFIED SLEEK CHILL SCROLLBAR SYSTEM
   ========================================================================== */
* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(168, 85, 247, 0.18) transparent !important;
}

::-webkit-scrollbar,
.asset-grid::-webkit-scrollbar,
.projects-list-card::-webkit-scrollbar,
.dam-sidebar::-webkit-scrollbar,
.dam-viewport::-webkit-scrollbar,
.drawer-content::-webkit-scrollbar,
.library-tabs-container::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

::-webkit-scrollbar-track,
.asset-grid::-webkit-scrollbar-track,
.projects-list-card::-webkit-scrollbar-track,
.dam-sidebar::-webkit-scrollbar-track,
.dam-viewport::-webkit-scrollbar-track,
.drawer-content::-webkit-scrollbar-track,
.library-tabs-container::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb,
.asset-grid::-webkit-scrollbar-thumb,
.projects-list-card::-webkit-scrollbar-thumb,
.dam-sidebar::-webkit-scrollbar-thumb,
.dam-viewport::-webkit-scrollbar-thumb,
.drawer-content::-webkit-scrollbar-thumb,
.library-tabs-container::-webkit-scrollbar-thumb {
  background: rgba(236, 72, 153, 0.18) !important;
  border-radius: 99px !important;
  border: none !important;
}

::-webkit-scrollbar-thumb:hover,
.asset-grid::-webkit-scrollbar-thumb:hover,
.projects-list-card::-webkit-scrollbar-thumb:hover,
.dam-sidebar::-webkit-scrollbar-thumb:hover,
.dam-viewport::-webkit-scrollbar-thumb:hover,
.drawer-content::-webkit-scrollbar-thumb:hover,
.library-tabs-container::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 72, 153, 0.45) !important;
}

/* UI Overhaul - Used Assets & Interactive elements */
#studio-used-assets-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  padding: 8px 0 !important;
  width: 100% !important;
}
.used-asset-item {
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  width: 56px !important;
  height: 56px !important;
  transition: var(--transition-smooth);
  cursor: pointer;
  flex-shrink: 0;
}
.used-asset-item:hover {
  transform: translateY(-2px);
}
.used-asset-item .used-asset-thumb {
  width: 56px !important;
  height: 56px !important;
  border-radius: 12px !important;
}
.used-asset-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}
.used-asset-info {
  display: none !important; /* Hide long file name and caption texts */
}

/* Sleek Horizontal Status Bar */
.sleek-console-bar {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(8, 6, 23, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  min-height: 54px;
  transition: var(--transition-smooth);
}
.sleek-console-bar:hover {
  border-color: var(--border-glass-glow);
}
.sleek-log-display-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
  min-width: 0;
}
.sleek-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-glow);
  animation: sleek-dot-pulse 1.5s infinite ease-in-out;
  flex-shrink: 0;
}
@keyframes sleek-dot-pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px var(--primary); }
  100% { transform: scale(0.9); opacity: 0.6; }
}
.sleek-log-text {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}
.sleek-progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 220px;
  flex-shrink: 0;
}
.sleek-progress-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  flex-grow: 1;
  border: 1px solid rgba(255, 255, 255, 0.02);
}
.sleek-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: width 0.3s ease;
}
.sleek-progress-percent-text {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 600;
  width: 34px;
  text-align: right;
}
.sleek-actions-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sleek-actions-container .btn-copy {
  margin-left: 0;
  padding: 8px 12px;
  border-radius: 10px;
  transition: var(--transition-smooth);
}
.sleek-actions-container #btn-show-visual-report {
  border-color: rgba(236, 72, 153, 0.3);
  color: #f472b6;
}
.sleek-actions-container #btn-show-visual-report:hover {
  background: rgba(236, 72, 153, 0.08);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}

/* Render History List Items */
.history-item {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--text-muted);
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.history-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.history-item.selected {
  border-color: var(--primary) !important;
  background: rgba(236, 72, 153, 0.08) !important;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.15);
}
.history-item.running-task-active {
  animation: task-slide-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards, task-pulse-border 2s infinite alternate !important;
}
@keyframes task-slide-in {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes task-pulse-border {
  0% {
    border-color: rgba(245, 158, 11, 0.3) !important;
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.1);
  }
  100% {
    border-color: var(--warn) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
  }
}
.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.history-item-title {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  transition: var(--transition-smooth);
}
.history-item-prompt {
  font-size: 11.5px;
  color: #cbd5e1; /* Higher contrast slate-300 */
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.history-item-meta {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: #94a3b8; /* slate-400 */
  opacity: 0.85;
}
.history-item.selected .history-item-title {
  color: #fff !important;
}
.history-item.selected .history-item-prompt {
  color: #ffffff !important;
  opacity: 1;
}
.history-item.selected .history-item-meta,
.history-item.selected .history-item-date {
  color: #e2e8f0 !important;
  opacity: 0.95;
}
.history-status-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}
.history-status-badge.status-running {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warn);
}
.history-status-badge.status-running.blinking-status {
  animation: status-pulse-blink 1.2s infinite alternate;
}
@keyframes status-pulse-blink {
  0% { opacity: 0.55; }
  100% { opacity: 1; filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6)); }
}
.history-status-badge.status-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}
.history-status-badge.status-failed {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
}
.history-item-date {
  font-size: 10px;
  color: #94a3b8; /* slate-400 */
}

/* AI Studio Prompter Redesign */
.prompter-outer-wrapper {
  position: relative;
  margin-bottom: 32px;
  padding: 10px 0;
}
.prompter-glow-trail-radial {
  position: absolute;
  top: 10%;
  left: 5%;
  right: 5%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, rgba(99, 102, 241, 0.1) 50%, transparent 80%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}
.prompter-glow-trail-top {
  position: absolute;
  top: -20px;
  left: 15%;
  width: 250px;
  height: 120px;
  background: rgba(236, 72, 153, 0.1);
  filter: blur(50px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: rotate(-15deg);
  animation: prompter-glow-pulse-1 6s ease-in-out infinite alternate;
}
.prompter-glow-trail-bottom {
  position: absolute;
  bottom: -20px;
  right: 15%;
  width: 250px;
  height: 120px;
  background: rgba(99, 102, 241, 0.1);
  filter: blur(50px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: rotate(15deg);
  animation: prompter-glow-pulse-2 6s ease-in-out infinite alternate-reverse;
}
@keyframes prompter-glow-pulse-1 {
  0% { opacity: 0.5; transform: rotate(-15deg) scale(0.95); }
  100% { opacity: 1; transform: rotate(-15deg) scale(1.05); }
}
@keyframes prompter-glow-pulse-2 {
  0% { opacity: 0.5; transform: rotate(15deg) scale(0.95); }
  100% { opacity: 1; transform: rotate(15deg) scale(1.05); }
}
.ai-studio-prompt-container {
  position: relative;
  z-index: 2;
  background: rgba(10, 8, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 24px;
  border-radius: 24px;
  transition: var(--transition-smooth);
}
.ai-studio-prompt-container:hover {
  border-color: var(--border-glass-glow);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 0 30px rgba(236, 72, 153, 0.1);
}
.ai-prompt-textarea-wrapper {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}
.prompter-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 16px;
}
.prompter-left-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.prompter-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.prompter-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: scale(1.05);
}
.prompter-tab-group {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 24px;
  align-items: center;
  gap: 4px;
}
.prompter-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #a1a1aa;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.prompter-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.prompter-tab-btn.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.asset-lock-trigger {
  border-color: rgba(34, 197, 94, 0.14);
}
.asset-lock-trigger.locked {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.36);
  color: #86efac;
}
.prompter-ratio-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 24px;
  gap: 4px;
}
.btn-ratio-selector {
  background: transparent;
  border: 1px solid transparent;
  color: #a1a1aa;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ratio-selector:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.btn-ratio-selector.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.prompter-right-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}
.prompter-mic-icon {
  cursor: pointer;
  transition: var(--transition-smooth);
}
.prompter-mic-icon:hover {
  stroke: var(--primary);
  transform: scale(1.05);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.prompter-bottom-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 16px;
  position: relative;
  z-index: 2;
  gap: 14px;
}
.prompter-bottom-actions .btn-secondary {
  padding: 16px 36px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
}
.prompter-bottom-actions .btn-secondary:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(255, 255, 255, 0.08);
}
.prompter-bottom-actions .btn-primary {
  padding: 16px 36px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.35);
  transition: var(--transition-smooth);
}
.prompter-bottom-actions .btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.5);
}
.asset-lock-modal-content {
  width: min(1080px, calc(100vw - 32px));
  max-width: 1080px;
  max-height: 90vh;
}

.asset-lock-modal-body {
  gap: 14px;
  overflow: hidden;
}

.asset-lock-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.42);
}

.asset-lock-options-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.asset-lock-library-panel {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.asset-lock-selected-panel {
  flex: 0 0 auto;
  padding: 12px 14px 14px;
}

.asset-lock-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.asset-lock-panel-heading.compact {
  margin-bottom: 8px;
}

.asset-lock-kicker {
  display: block;
  margin-bottom: 2px;
  color: #8b5cf6;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asset-lock-panel-heading h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 850;
}

.asset-lock-enable-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.06);
  color: #e5e7eb;
}

.asset-lock-enable-row input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: #22c55e;
}

.asset-lock-enable-row span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.asset-lock-enable-row strong {
  color: #fff;
  font-size: 12px;
}

.asset-lock-enable-row small {
  color: #9ca3af;
  font-size: 11px;
  line-height: 1.35;
}

.asset-lock-search-row {
  display: block;
}

.asset-lock-search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.52);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.08), 0 14px 40px rgba(2, 6, 23, 0.22);
}

.asset-lock-search-box input {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  outline: none;
  background: transparent;
  color: #f8fafc;
  font-size: 13px;
}

.asset-lock-search-button {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
}

.asset-lock-search-button:hover {
  filter: brightness(1.08);
}

.asset-lock-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
}

.asset-lock-status-row strong {
  color: #fbbf24;
  font-weight: 850;
}

.asset-lock-actions-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.asset-lock-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  max-height: 128px;
  overflow-y: auto;
  padding: 1px 3px 3px 1px;
}

.asset-lock-collection-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 62px;
  padding: 8px 34px 8px 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  color: #e5e7eb;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.asset-lock-collection-card:hover {
  border-color: rgba(96, 165, 250, 0.44);
  background: rgba(96, 165, 250, 0.08);
  transform: translateY(-1px);
}

.asset-lock-collection-card.selected {
  border-color: rgba(34, 197, 94, 0.68);
  background: rgba(34, 197, 94, 0.1);
}

.asset-lock-folder-thumb {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.24), rgba(139, 92, 246, 0.18));
}

.asset-lock-folder-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-lock-folder-icon {
  color: #93c5fd;
  font-size: 19px;
  font-weight: 900;
}

.asset-lock-folder-main {
  min-width: 0;
}

.asset-lock-folder-main strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-lock-folder-main span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-lock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 10px;
  min-height: 230px;
  max-height: 38vh;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
}

.asset-lock-group-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}

.asset-lock-group-title span {
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 750;
}

.asset-lock-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.asset-lock-card:hover {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.06);
}

.asset-lock-card.selected {
  border-color: rgba(34, 197, 94, 0.68);
  background: rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.24);
}

.asset-lock-card.covered {
  cursor: default;
  opacity: 0.78;
}

.asset-lock-card.covered:hover {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.06);
}

.asset-lock-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.asset-lock-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-lock-media-icon,
.asset-lock-audio-icon {
  color: #a78bfa;
}

.asset-lock-media-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.12);
  font-size: 20px;
  font-weight: 800;
}

.asset-lock-type {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.asset-lock-duplicate-badge {
  position: absolute;
  right: 7px;
  bottom: 7px;
  max-width: calc(100% - 14px);
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.9);
  color: #1f2937;
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-lock-check {
  position: absolute;
  right: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: transparent;
}

.asset-lock-card.selected .asset-lock-check {
  background: #22c55e;
  border-color: #22c55e;
  color: #03110a;
}

.asset-lock-name {
  overflow: hidden;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-lock-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.asset-lock-desc {
  display: -webkit-box;
  min-height: 28px;
  overflow: hidden;
  color: #a1a1aa;
  font-size: 10.5px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.asset-lock-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #94a3b8;
  font-size: 13px;
}

.asset-lock-empty.compact {
  min-height: 62px;
  border-radius: 12px;
}

.asset-lock-footer {
  gap: 10px;
}

.asset-lock-load-more {
  display: none;
  align-self: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.asset-lock-load-more:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.1);
}

.asset-lock-selected-strip {
  display: flex;
  min-height: 74px;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.asset-lock-selected-empty {
  display: flex;
  align-items: center;
  color: #94a3b8;
  font-size: 12px;
}

.asset-lock-selected-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px 136px;
  gap: 9px;
  align-items: center;
  flex: 0 0 auto;
  width: 230px;
  padding: 7px 30px 7px 7px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.asset-lock-selected-item.collection {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(96, 165, 250, 0.07);
}

.asset-lock-selected-thumb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 46px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.42);
}

.asset-lock-selected-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-lock-selected-text {
  min-width: 0;
}

.asset-lock-selected-text strong,
.asset-lock-selected-text span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-lock-selected-text strong {
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 850;
}

.asset-lock-selected-text span {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 700;
}

.asset-lock-selected-remove {
  position: absolute;
  right: 7px;
  top: 7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.asset-lock-selected-remove:hover {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

@media (max-width: 720px) {
  .asset-lock-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .asset-lock-search-box {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .asset-lock-enable-row {
    max-width: none;
  }

  .asset-lock-collection-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard refinement: clearer hierarchy, denser controls, faster card rendering */
#view-projects .view-header {
  margin-bottom: 12px;
}

#view-projects .view-header h2 {
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.7px;
}

#view-projects .view-header .section-desc {
  margin-bottom: 0;
}

.prompter-outer-wrapper {
  margin-bottom: 24px;
  padding-top: 4px;
}

.ai-studio-prompt-container {
  padding: 18px;
  border-radius: 20px;
}

#ai-prompt-input {
  min-height: 96px;
  max-height: 180px;
  padding: 16px 18px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.ai-guidance-group {
  margin: 12px 0 16px 0;
  border: 1px dashed rgba(124, 92, 255, 0.3);
  padding: 10px;
  border-radius: 8px;
  background: rgba(124, 92, 255, 0.03);
}

.ai-guidance-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-ai-guidance-input {
  width: 100%;
  height: 62px;
  background: rgba(5, 7, 15, 0.6);
  border: 1px solid var(--dam-border);
  border-radius: 6px;
  padding: 6px 8px;
  color: #fff;
  font-size: 11px;
  resize: none;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
  font-family: inherit;
  line-height: 1.4;
}

.detail-ai-guidance-input:focus {
  border-color: #7c5cff;
}

.dam-upload-progress-container {
  display: none;
}

.dam-upload-progress-bar {
  width: 0%;
}

.btn-dam-bulk-analyze {
  border-color: rgba(124, 92, 255, 0.4);
  color: #c084fc;
}

.btn-dam-bulk-delete {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-empty-upload {
  margin-top: 16px;
}

.detail-ai-extended-container {
  display: none;
  margin-top: 12px;
}

.detail-ai-extended-content {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-ai-json-container {
  margin-top: 12px;
}

.spec-ai-json {
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid var(--dam-border);
  padding: 10px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 11px;
  color: #a5b4fc;
  max-height: 250px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 6px;
}

.ai-extra-actions {
  margin-top: 16px;
  border-top: 1px solid var(--dam-border);
  padding-top: 16px;
}

.quick-editor-card {
  display: none;
  flex-direction: column;
}

.studio-desc-tight {
  margin-bottom: 12px;
}

.quick-editor-active-scene-info {
  margin-bottom: 15px;
  font-weight: 600;
  color: #a855f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(168, 85, 247, 0.05);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(168, 85, 247, 0.15);
}

.quick-editor-scene-time {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.quick-editor-fields-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

.studio-used-assets-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 20px 0;
}

.quick-editor-actions,
.quick-editor-ai-actions {
  display: flex;
  gap: 8px;
}

.quick-editor-actions {
  margin-top: 15px;
}

.quick-editor-action-btn {
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 700;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.quick-editor-action-btn-ai {
  flex: 1.2;
  margin-top: 0;
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
}

.quick-editor-ai-prompt-area {
  display: none;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.quick-editor-ai-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 5px;
  display: block;
}

.quick-editor-ai-textarea {
  font-size: 13px;
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
  color: #fff;
  resize: vertical;
}

.quick-editor-ai-actions {
  margin-top: 8px;
}

.quick-editor-ai-cancel,
.quick-editor-ai-submit {
  font-size: 12px;
  padding: 6px 0;
  height: 32px;
}

.quick-editor-ai-cancel {
  flex: 1;
}

.quick-editor-ai-submit {
  flex: 2;
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
}

.live-preview-card {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section-desc-centered {
  text-align: center;
  margin-bottom: 15px;
}

.live-preview-wrapper {
  aspect-ratio: 9 / 16;
  height: 520px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  position: relative;
  width: 292.5px;
  margin: 0 auto;
}

.live-preview-frame {
  width: 1080px;
  height: 1920px;
  border: none;
  transform: scale(0.27);
  transform-origin: center;
  display: block;
  position: absolute;
}

.live-player-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
}

.live-player-row {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 15px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
}

.live-play-btn {
  min-width: 90px;
  height: 36px;
  font-weight: 700;
}

.live-seek-bar {
  flex: 1;
  accent-color: var(--primary);
  height: 6px;
  border-radius: 99px;
  cursor: pointer;
}

.live-time-display {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 90px;
  text-align: right;
}

.visual-timeline-container {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid var(--border-glass);
}

.visual-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.visual-timeline-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.visual-timeline-status {
  font-size: 11px;
  color: var(--text-muted);
}

.visual-timeline-track {
  position: relative;
  width: 100%;
  height: 50px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  cursor: crosshair;
}

.timeline-playhead {
  position: absolute;
  top: 0;
  left: 0%;
  width: 2px;
  height: 100%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  z-index: 10;
  pointer-events: none;
  transform: translateX(-50%);
}

.visual-timeline-segments {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
}

.prompter-control-bar {
  gap: 10px;
  padding-top: 12px;
}

.prompter-left-controls {
  gap: 8px;
  min-width: 0;
}

.prompter-tab-btn,
.btn-ratio-selector {
  padding: 7px 12px;
  font-size: 12px;
}

.prompter-left-controls .caption-toggle-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #a1a1aa;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.prompter-left-controls .caption-toggle-wrapper:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.prompter-bottom-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.prompter-bottom-actions .btn-secondary,
.prompter-bottom-actions .btn-primary {
  min-width: 0;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 15px;
  font-size: 13px;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  box-shadow: none;
}

.prompter-bottom-actions .btn-primary {
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.2);
}

.create-action-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.create-action-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-action-copy small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.projects-view-grid {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  min-width: 0;
}

.projects-view-grid > *,
.project-library-panel,
.render-queue-panel {
  min-width: 0;
  width: 100%;
}

.project-library-panel {
  overflow: hidden;
}

.panel-card,
.active-processes-card {
  border-radius: 18px;
  padding: 20px;
}

.render-queue-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

.project-list-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.project-card {
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-size: 390px;
  background: rgba(11, 9, 27, 0.94);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.project-card:hover {
  transform: translateY(-2px);
}

.project-card-header-thumb img {
  opacity: 0.92;
}

.project-card-body {
  padding: 14px 15px;
}

.project-card-actions {
  gap: 5px;
}

.project-card-action-btn {
  min-height: 30px;
}

@media (max-width: 1180px) {
  .projects-view-grid {
    grid-template-columns: 1fr;
  }

  .render-queue-panel {
    position: static;
    max-height: none;
  }

  .prompter-control-bar {
    align-items: flex-start;
  }

  .prompter-left-controls {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  .prompter-bottom-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .prompter-ratio-group {
    order: 2;
  }

  .prompter-right-controls {
    margin-left: auto;
    order: 3;
  }

  .library-filter-bar,
  .filter-selects {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-selects,
  .filter-select {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .ai-studio-prompt-container,
  .panel-card,
  .active-processes-card {
    padding: 14px;
  }

  .prompter-bottom-actions {
    grid-template-columns: 1fr;
  }

  .prompter-bottom-actions .btn-secondary,
  .prompter-bottom-actions .btn-primary {
    min-height: 52px;
  }

  .prompter-control-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .prompter-ratio-group,
  .prompter-right-controls {
    justify-content: space-between;
    margin-left: 0;
    width: 100%;
  }

  .project-list-grid {
    grid-template-columns: 1fr;
  }

  .library-tabs-container {
    width: 100%;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow-bg,
  .prompter-glow-trail-top,
  .prompter-glow-trail-bottom {
    animation: none;
  }

  .project-card,
  .prompter-bottom-actions .btn {
    transition-duration: 0.01ms;
  }
}


/* Toast Notification System */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(13, 11, 28, 0.85);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.4;
  transform: translateX(120%);
  animation: toast-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             toast-slide-out 0.4s cubic-bezier(0.16, 1, 0.3, 1) 3.5s forwards;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--error);
}

.toast-info {
  border-left: 4px solid var(--secondary);
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
  font-weight: 500;
}

@keyframes toast-slide-in {
  to {
    transform: translateX(0);
  }
}

@keyframes toast-slide-out {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* ==========================================================================
   LAYOUT OVERHAUL & UTILITY CLASSES (UI-UX-PRO-MAX)
   ========================================================================== */

/* Utility spacing classes */
.mb-lg { margin-bottom: 20px; }
.mb-sm { margin-bottom: 12px; }
.mt-sm { margin-top: 10px; }
.mt-md { margin-top: 14px; }

/* Panel titles and content */
.studio-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  margin: 0 0 12px 0;
}

.studio-panel-title-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  margin: 0 0 4px 0;
}

.studio-panel-title-plain {
  font-size: 16px;
  margin: 0 0 8px 0;
}

.studio-panel-icon {
  display: inline-block;
  vertical-align: middle;
}

.studio-panel-title-text {
  vertical-align: middle;
}

.studio-info-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-info-label {
  font-size: 10px;
  color: var(--text-dark);
  font-weight: 600;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.studio-info-value {
  font-size: 14px;
  color: #fff;
  font-weight: 700;
}

.studio-info-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: block;
  max-height: 60px;
  overflow-y: auto;
}

.studio-meta-divider-group {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.studio-meta-label {
  color: var(--text-dark);
  font-weight: 600;
}

.studio-meta-value {
  color: var(--text-main);
  font-weight: 700;
  background: rgba(255,255,255,0.03);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
}

.studio-caption-badge-custom {
  color: #f472b6;
  font-weight: 700;
  background: rgba(236, 72, 153, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(236, 72, 153, 0.25);
  cursor: pointer;
  transition: all 0.2s;
}

.studio-caption-badge-custom:hover {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.4);
}

.studio-desc-small {
  margin-bottom: 12px;
  font-size: 11px;
}

.studio-used-assets-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.studio-used-assets-empty {
  text-align: center;
  color: var(--text-dark);
  font-size: 12px;
  padding: 12px 0;
  width: 100% !important;
}

.studio-caption-wrapper-outer {
  margin-top: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.studio-caption-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.studio-caption-toggle-label:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.studio-caption-toggle-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.studio-switch-container {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  margin: 0;
}

.studio-switch-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.btn-resume-custom {
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.btn-cancel-custom {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.studio-btn-icon-left {
  margin-right: 6px;
  display: inline-block;
  vertical-align: middle;
}

.studio-btn-text-align {
  vertical-align: middle;
}

.studio-meta-info-title {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: #a855f7;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.studio-meta-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.studio-meta-box-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-meta-card-value-bold {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 700;
}

.studio-meta-prompt-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.studio-meta-prompt-box-styled {
  padding: 14px;
  font-size: 13px;
  max-height: 100px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre-wrap;
  font-family: inherit;
  border-radius: 8px;
}

.studio-btn-copy-custom {
  padding: 4px 10px;
  font-size: 11px;
  height: 26px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #c084fc;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.studio-btn-copy-custom:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
}

/* Aspect-ratio-aware video safe-zone overlay */
.video-preview-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-safe-zone-overlay {
  --safe-top: 10%;
  --safe-bottom: 10%;
  --safe-left: 10%;
  --safe-right: 10%;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  display: block;
  border: 2px dashed rgba(6, 182, 212, 0.6);
  box-sizing: border-box;
}

.safe-zone-risk {
  position: absolute;
  background: rgba(239, 68, 68, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-size: clamp(7px, 1vw, 9px);
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

.safe-zone-top-bound {
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-top);
  border-bottom: 1px solid rgba(239, 68, 68, 0.4);
}

.safe-zone-bottom-bound {
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--safe-bottom);
  border-top: 1px solid rgba(239, 68, 68, 0.4);
}

.safe-zone-left-bound,
.safe-zone-right-bound {
  top: var(--safe-top);
  bottom: var(--safe-bottom);
}

.safe-zone-left-bound {
  left: 0;
  width: var(--safe-left);
  border-right: 1px solid rgba(239, 68, 68, 0.32);
}

.safe-zone-right-bound {
  right: 0;
  width: var(--safe-right);
  border-left: 1px solid rgba(239, 68, 68, 0.32);
}

.safe-zone-left-bound span,
.safe-zone-right-bound span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: clamp(6px, 0.8vw, 8px);
}

.safe-zone-center-rect {
  position: absolute;
  top: var(--safe-top);
  right: var(--safe-right);
  bottom: var(--safe-bottom);
  left: var(--safe-left);
  border: 1px dashed rgba(16, 185, 129, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  font-size: clamp(7px, 1vw, 10px);
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  padding: 6px;
}

.studio-safe-zone-toggle-row {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.btn-safe-zone-toggle {
  font-size: 11px;
  border-color: rgba(6, 182, 212, 0.3);
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.05);
}

.btn-safe-zone-toggle.active {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.2);
  color: #ffffff;
}

/* Hover revealed card metadata */
.asset-card .asset-details {
  position: relative;
  transition: var(--transition-smooth);
}

.asset-card .asset-ai-tags,
.asset-card .asset-color-pills-row {
  opacity: 1;
  transform: none;
}

/* Responsive collapse details drawer overlay */
@media (max-width: 1280px) {
  .dam-detail-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 380px;
    height: 100%;
    z-index: 150;
    background: rgba(13, 11, 28, 0.95);
    border-left: 1px solid var(--border-glass);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.85);
  }
}

/* Custom Audio Player in Detail Drawer */
.custom-audio-player {
  background: rgba(13, 11, 28, 0.55);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.audio-player-main-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-audio-play-pause {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: var(--transition-smooth);
}

.btn-audio-play-pause:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px var(--primary-glow);
}

.audio-progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audio-progress-bar-wrapper {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}

.audio-progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--secondary), var(--primary));
  border-radius: 3px;
  transition: width 0.1s linear;
}

.audio-time-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dark);
  font-family: var(--font-mono);
}

/* Redesign System Configuration Modal (ui-ux-pro-max) */
#modal-settings .modal-content {
  max-width: 960px; /* Increased width for widescreen tab layout */
  height: 680px;    /* Fixed height as requested */
}

#modal-settings .modal-body {
  flex: 1;
  overflow-y: auto;
  max-height: none; /* Let fixed height control container overflow */
  padding-right: 8px; /* Extra breathing space for scrollbar */
}

/* Header Workspace Indicator - Sleek Glassmorphic Pill */
.active-project-indicator-header {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  margin-right: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
}

.workspace-pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 2s infinite;
}

.active-project-label {
  font-size: 10px;
  color: var(--text-dark);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

#active-project-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-left: 4px;
}

/* Render History & Analytics Panel (Clean separation) */
.render-history-card {
  margin-top: 20px;
}

.render-history-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  margin: 0 0 16px 0;
}

.render-history-title-icon {
  display: inline-block;
  vertical-align: middle;
}

.render-history-desc {
  margin-bottom: 16px;
  font-size: 11px;
}

.render-history-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  min-height: 240px;
}

.render-history-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.render-history-section-title {
  font-size: 11px;
  color: var(--text-dark);
  font-weight: 600;
  text-transform: uppercase;
}

.render-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.render-history-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.render-history-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.render-history-detail-id {
  font-size: 13px;
  font-weight: 700;
  color: #a855f7;
}

.render-history-detail-time {
  font-size: 11px;
  color: var(--text-dark);
}

.render-history-section-subtitle {
  font-size: 10px;
  color: var(--text-dark);
  font-weight: 600;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.render-history-timing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.render-history-timing-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  transition: background var(--transition-smooth);
}

.render-history-timing-box:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.render-history-timing-label {
  font-size: 10px;
  color: var(--text-dark);
  display: block;
  margin-bottom: 2px;
}

.render-history-timing-val {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.render-history-breakdown {
  margin-top: 6px;
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.15);
  padding: 6px 12px;
  border-radius: 8px;
}

.render-history-breakdown-title {
  font-size: 9px;
  color: #a855f7;
  font-weight: 600;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.render-history-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.render-history-breakdown-box {
  text-align: center;
}

.render-history-breakdown-label {
  font-size: 9px;
  color: var(--text-dark);
  display: block;
}

.render-history-breakdown-val {
  font-size: 12px;
  font-weight: 700;
  color: #c084fc;
}

.render-history-summary-row {
  margin-top: 6px;
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
}

.render-history-total-time {
  font-weight: 700;
  color: var(--success);
}

.render-history-token-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.render-history-token-total-val {
  font-size: 13px;
  font-weight: 700;
  color: #c084fc;
}

.render-history-prompt-box {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
  max-height: 70px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: var(--font-mono);
}


@keyframes pulse-glow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Used Asset Thumbnail styling */
.used-asset-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.used-asset-thumb:hover {
  transform: scale(1.05);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}
.used-asset-thumb-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.used-asset-thumb-media.is-hidden {
  display: none;
}
.used-asset-thumb-video-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}
.used-asset-thumb-audio-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Keep Studio panels inside the viewport when grid children contain long content. */
#view-studio,
#view-studio .studio-layout-columns,
#view-studio .studio-layout-columns > *,
#view-studio .control-panel,
#view-studio .viewer-panel,
#view-studio .viewer-tabs,
#view-studio .viewer-content,
#view-studio .panel-card,
#view-studio .result-card,
#view-studio .render-history-layout,
#view-studio .render-history-details,
#view-studio .sleek-console-bar {
  min-width: 0;
  max-width: 100%;
}

#view-studio .studio-layout-columns {
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
}

#view-studio .video-meta,
#view-studio .studio-meta-grid-three,
#view-studio .render-history-timing-grid,
#view-studio .render-history-token-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#view-studio .render-history-token-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

#view-studio .studio-meta-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#view-studio .meta-val,
#view-studio .studio-meta-card-value-bold,
#view-studio .render-history-prompt-box {
  overflow-wrap: anywhere;
}

#view-studio .result-actions {
  flex-wrap: wrap;
  gap: 10px;
}

#view-studio .result-actions > * {
  margin-left: 0 !important;
}

@media (max-width: 1024px) {
  #view-studio .studio-layout-columns,
  #view-studio .render-history-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #view-studio .render-history-sidebar {
    max-height: none;
    padding-right: 0;
    padding-bottom: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}

@media (max-width: 760px) {
  #view-studio .video-meta,
  #view-studio .studio-meta-grid-three,
  #view-studio .render-history-timing-grid,
  #view-studio .render-history-token-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-studio .viewer-tabs,
  #view-studio .sleek-console-bar,
  #view-studio .studio-meta-prompt-header-row {
    flex-wrap: wrap;
  }

  #view-studio .viewer-tab {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  #view-studio .panel-card {
    padding: 20px;
  }

  #view-studio .video-meta,
  #view-studio .studio-meta-grid-three,
  #view-studio .render-history-timing-grid,
  #view-studio .render-history-token-grid,
  #view-studio .render-history-breakdown-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #view-studio .result-actions {
    justify-content: stretch;
  }

  #view-studio .result-actions > * {
    width: 100%;
    justify-content: center;
  }
}

/* Projects dashboard polish: quieter hierarchy, denser repeated surfaces */
#view-projects .prompter-bottom-actions {
  display: flex;
  justify-content: flex-end;
}

#view-projects .prompter-bottom-actions .btn-primary {
  width: auto;
  max-width: 480px;
  flex: 0 1 auto;
}

#view-projects .prompter-bottom-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.78);
}

#view-projects .prompter-bottom-actions .btn-secondary svg {
  color: rgba(255, 255, 255, 0.7);
}

#view-projects .prompter-bottom-actions .btn-primary {
  transform: translateY(-1px);
}

#view-projects .prompter-bottom-actions .btn-primary {
  box-shadow: 0 10px 26px rgba(236, 72, 153, 0.26);
}

#view-projects .prompter-bottom-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
}

#view-projects .ai-studio-prompt-container {
  border-color: rgba(255, 255, 255, 0.075);
}

#view-projects .prompter-control-bar {
  align-items: center;
}

#view-projects .prompter-left-controls,
#view-projects .prompter-right-controls {
  gap: 10px;
}

#view-projects .prompter-tab-group,
#view-projects .prompter-ratio-group {
  border-radius: 18px;
}

#view-projects .prompter-tab-btn,
#view-projects .btn-ratio-selector {
  min-height: 34px;
  border-radius: 14px;
}

#view-projects .project-list-grid {
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
}

#view-projects .project-library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#view-projects .panel-card-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#view-projects .render-queue-heading {
  margin-bottom: 4px;
}

#view-projects .render-queue-desc {
  margin-bottom: 16px;
}

#view-projects .search-icon {
  color: #71717a;
}

#view-projects .btn-project-manage-toggle {
  font-size: 11px;
  padding: 6px 14px;
  height: auto;
  border-radius: 8px;
  font-weight: 700;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.2s;
}

#view-projects .project-bulk-actions-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.2s;
}

#view-projects .project-bulk-select-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

#view-projects .project-select-all-checkbox {
  cursor: pointer;
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

#view-projects .project-bulk-select-text {
  font-weight: 600;
}

#view-projects .project-bulk-actions-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

#view-projects .selected-projects-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

#view-projects .bulk-actions-divider {
  width: 1px;
  height: 12px;
  background: rgba(255,255,255,0.15);
}

#view-projects .btn-bulk-delete-projects {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  font-size: 11px;
  padding: 6px 14px;
  height: auto;
  border-radius: 8px;
  font-weight: 700;
  cursor: not-allowed;
  opacity: 0.5;
  transition: all 0.2s;
}

#view-projects .btn-load-more-projects {
  display: none;
  width: 100%;
  margin-top: 14px;
  justify-content: center;
  font-size: 12px;
  padding: 10px 14px;
}

#view-projects .project-card {
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.075);
  background: linear-gradient(180deg, rgba(18, 14, 39, 0.98), rgba(8, 7, 20, 0.98));
}

#view-projects .project-card:hover {
  border-color: rgba(236, 72, 153, 0.42);
  background: linear-gradient(180deg, rgba(24, 18, 47, 0.99), rgba(10, 8, 23, 0.99));
}

#view-projects .project-card-header-thumb {
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.20), rgba(99, 102, 241, 0.16)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 12px);
}

#view-projects .project-card-header-thumb img {
  opacity: 1;
}

#view-projects .project-card-thumb-placeholder {
  position: absolute;
  inset: 0;
  justify-content: center;
}

#view-projects .project-card-header-thumb img:not(.is-hidden) + .project-card-thumb-placeholder {
  display: none;
}

#view-projects .project-card-thumb-initials {
  font-size: 42px;
  letter-spacing: 0;
  opacity: 0.92;
}

#view-projects .project-card-body {
  gap: 9px;
}

#view-projects .project-card-body h4 {
  font-size: 14px;
}

#view-projects .project-card-body p.desc {
  color: rgba(212, 212, 216, 0.62);
}

#view-projects .project-card-badges {
  min-height: 21px;
}

#view-projects .project-card-meta-details {
  margin-top: 2px;
  gap: 8px 12px;
}

#view-projects .project-card-config-toggle {
  margin-top: 4px;
  color: rgba(216, 180, 254, 0.72);
}

#view-projects .project-card-config-icon {
  margin-right: 4px;
  display: inline-block;
  vertical-align: middle;
}

#view-projects .project-card-meta-item-wide {
  grid-column: span 2;
}

#view-projects .project-card-actions {
  display: flex;
  gap: 6px;
}

#view-projects .project-card-action-btn {
  min-width: 0;
  min-height: 32px;
  padding: 7px 8px;
}

#view-projects .project-card-action-btn.btn-open {
  flex: 1 1 auto !important;
}

#view-projects .project-card-action-btn:not(.btn-open):not(.btn-resume):not(.btn-delete) {
  flex: 0 0 36px !important;
  width: 36px !important;
  color: rgba(212, 212, 216, 0.72);
  font-size: 0 !important;
}

#view-projects .project-card-action-btn:not(.btn-open):not(.btn-resume):not(.btn-delete) svg {
  width: 13px !important;
  height: 13px !important;
}

#view-projects .project-card-action-btn.btn-delete {
  font-size: 0;
  flex-basis: auto;
}

#view-projects .project-card-action-btn.btn-delete::before {
  content: "×";
  font-size: 15px;
  line-height: 1;
}

#view-projects .render-queue-panel {
  background: rgba(14, 13, 35, 0.86);
}

#view-projects .render-queue-panel .section-desc {
  max-width: 24ch;
}

#view-projects .queue-card {
  gap: 9px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}

#view-projects .queue-card-title {
  max-width: 100%;
}

#view-projects .queue-card-meta {
  gap: 6px;
  flex-wrap: wrap;
}

#view-projects .queue-card-heading-block {
  flex: 1;
  min-width: 0;
}

#view-projects .queue-card-retry {
  color: #fbbf24;
  font-weight: 700;
}

#view-projects .queue-card-state-badge {
  font-size: 9px;
  font-weight: 700;
  color: #c084fc;
  padding: 2px 6px;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 4px;
  text-transform: uppercase;
}

#view-projects .queue-card.paused .queue-card-state-badge {
  color: #fbbf24;
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.2);
}

#view-projects .queue-card-progress-bar-wrapper {
  height: 5px;
}

#view-projects .queue-card-status-row {
  gap: 10px;
}

#view-projects .queue-card-step-text {
  color: rgba(228, 228, 231, 0.76);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

#view-projects .queue-card-time-left {
  font-size: 10px;
  color: var(--text-dark);
  margin-top: -4px;
}

#view-projects .queue-card-stages-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  padding-top: 6px;
}

#view-projects .queue-stage-label {
  display: none;
}

#view-projects .queue-stage-dot {
  width: 7px;
  height: 7px;
}

#view-projects .queue-card-actions {
  gap: 7px;
  padding-top: 7px;
}

#view-projects .queue-card-btn {
  min-height: 30px;
  border-radius: 8px;
}

@media (max-width: 1180px) {
  #view-projects .prompter-bottom-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #view-projects .prompter-bottom-actions .btn-primary {
    width: 100%;
    max-width: none;
  }

  #view-projects .render-queue-panel .section-desc {
    max-width: none;
  }
}

@media (max-width: 640px) {
  #view-projects .prompter-bottom-actions,
  #view-projects .project-card-actions {
    grid-template-columns: 1fr;
  }
}

/* Product Design UX fixes: accessibility, mobile ergonomics, and scanability */
.nav-item,
.library-tab-btn,
.quick-filter-btn,
.filter-select,
.btn-ratio-selector,
.prompter-tab-btn,
.prompter-icon-btn,
.prompter-mic-icon,
.project-card-action-btn,
.project-card-favorite-toggle,
.asset-card-select-indicator,
.btn-asset-3dot,
.asset-card-quick-actions .btn,
.view-toggle-btn,
.btn-icon-only,
#btn-settings,
#btn-dam-sort,
#btn-dam-upload {
  min-width: 44px;
  min-height: 44px;
}

.project-card-favorite-toggle {
  width: 36px;
  height: 36px;
  top: 10px;
  right: 10px;
}

.asset-card-select-indicator,
.btn-asset-3dot {
  width: 38px;
  height: 38px;
}

.asset-card-actions-menu {
  opacity: 1;
}

.asset-card-quick-actions .btn {
  padding: 8px 10px;
}

.prompter-tab-btn,
.btn-ratio-selector,
#btn-toggle-project-mgmt,
.btn-load-more-projects,
#library-search-input,
#dam-search-input,
.dam-sidebar-menu a,
#btn-dam-scan-duplicates,
#btn-dam-multiselect-toggle,
.play-overlay-btn,
.play-overlay-btn-mini,
.drawer-header .close-btn {
  min-height: 44px !important;
}

.prompter-icon-btn,
.prompter-mic-icon {
  min-width: 44px !important;
  min-height: 44px !important;
}

.play-overlay-btn {
  width: 44px !important;
  height: 44px !important;
}

.drawer-header .close-btn {
  min-width: 44px !important;
}

.detail-actions-row .btn,
.asset-ai-actions .btn,
#btn-ai-bg-remove,
#btn-ai-dup-detect,
#btn-ai-similar-find {
  min-height: 44px !important;
}

.dam-dropdown-item {
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}

.dam-dropdown-item.danger,
.dam-dropdown-item.danger:hover {
  color: #f87171;
}

.project-card-menu {
  min-width: 190px;
}

#view-projects .project-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

#view-projects .project-card-action-btn {
  min-height: 44px;
  padding: 9px 12px;
}

#view-projects .project-card-action-btn.btn-open {
  flex: unset !important;
}

#view-projects .project-card-action-btn.btn-more {
  flex: unset !important;
  width: auto !important;
  min-width: 86px;
  color: rgba(226, 232, 240, 0.86);
  font-size: 11px !important;
}

#view-projects .project-card-action-btn.btn-more svg {
  width: 13px !important;
  height: 13px !important;
}

#view-projects .project-card-action-btn.btn-resume {
  min-width: 88px;
}

#view-projects .project-card-actions:has(.btn-resume) {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.asset-title {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
}

.asset-filename,
.asset-list-filename {
  color: rgba(148, 163, 184, 0.76);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-list-title {
  display: block;
  color: var(--text-main);
  font-weight: 700;
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-list-filename {
  display: block;
  max-width: 42ch;
}

@media (max-width: 760px) {
  .app-container {
    padding: 16px 12px 28px;
  }

  .app-header {
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 18px;
  }

  .brand {
    justify-content: center;
    width: 100%;
  }

  .brand-text h1 {
    font-size: 26px;
    letter-spacing: 0;
  }

  .brand-text p {
    font-size: 13px;
    letter-spacing: 0;
  }

  .app-nav {
    width: min(100%, 296px);
    justify-content: space-between;
    margin: 0 auto;
  }

  .nav-item {
    width: 58px !important;
    height: 58px !important;
    padding: 0 !important;
    border-radius: 16px;
  }

  .app-header .actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 12px;
  }

  .active-project-indicator-header {
    justify-content: center;
    min-height: 58px;
    overflow: hidden;
  }

  .active-project-label {
    display: inline;
  }

  #active-project-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #btn-settings {
    width: 58px !important;
    height: 58px !important;
    border-radius: 16px !important;
  }

  #view-projects .view-header {
    margin-bottom: 20px;
  }

  #view-projects .view-header h2 {
    font-size: 28px;
    line-height: 1.15;
  }

  #view-projects .view-header .section-desc {
    font-size: 15px;
    line-height: 1.45;
  }

  #view-projects .prompter-outer-wrapper {
    padding: 18px;
    border-radius: 22px;
  }

  #view-projects .ai-studio-prompt-input {
    min-height: 132px;
    font-size: 18px;
  }

  #view-projects .prompter-control-bar,
  #view-projects .prompter-left-controls,
  #view-projects .prompter-tab-group,
  #view-projects .prompter-ratio-group {
    width: 100%;
    gap: 10px;
    overflow: visible;
  }

  #view-projects .prompter-control-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  #view-projects .prompter-left-controls {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: stretch;
  }

  #view-projects .prompter-tab-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border-radius: 18px;
  }

  #view-projects .caption-toggle-wrapper,
  #view-projects #btn-open-asset-lock {
    grid-column: 1 / -1;
  }

  #view-projects .caption-toggle-wrapper {
    min-height: 54px;
    justify-content: space-between;
    padding: 0 10px;
  }

  #view-projects .prompter-ratio-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #view-projects .prompter-tab-btn,
  #view-projects .btn-ratio-selector {
    min-height: 54px;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  #view-projects .prompter-icon-btn,
  #view-projects .prompter-mic-icon {
    width: 54px;
    height: 54px;
  }

  #view-projects .prompter-right-controls {
    width: 100%;
    justify-content: flex-start;
  }

  #view-projects .project-list-grid {
    grid-template-columns: 1fr;
  }

  #view-projects .project-card-body p.desc {
    height: auto;
    min-height: 42px;
    -webkit-line-clamp: 3;
  }

  #view-projects .project-card-actions {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  #view-projects .render-queue-panel {
    order: -1;
  }

  .dam-container {
    border-radius: 22px;
    overflow: hidden;
  }

  .dam-toolbar {
    padding: 16px;
  }

  .dam-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(54px, 1fr));
    gap: 10px;
    justify-content: stretch;
  }

  .dam-toolbar-actions > * {
    min-width: 0;
  }

  .dam-view-toggle {
    min-height: 54px;
  }

  .btn-upload-dam,
  #btn-dam-sort,
  #btn-dam-adv-filter,
  #btn-dam-multiselect-toggle,
  #btn-dam-scan-duplicates {
    min-width: 54px;
    min-height: 54px;
    justify-content: center;
  }

  #btn-dam-multiselect-toggle span,
  #btn-dam-scan-duplicates span,
  .dam-total-count {
    display: none;
  }

  .dam-quick-filters {
    gap: 10px;
  }

  .quick-filter-btn {
    min-height: 48px;
    padding-inline: 18px;
  }

  .asset-grid {
    grid-template-columns: 1fr;
    max-height: none;
    overflow-y: visible;
  }

  #modal-settings {
    align-items: stretch;
  }

  #modal-settings .modal-content {
    width: 100% !important;
    max-width: none !important;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  #modal-settings .modal-body {
    max-height: none;
  }

  #modal-settings .settings-tabs-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  #modal-settings .settings-tab-btn {
    min-width: 140px;
    min-height: 48px;
    flex: 0 0 auto;
  }
}

#view-studio #card-result {
  border-color: rgba(236, 72, 153, 0.18);
  background:
    linear-gradient(180deg, rgba(21, 16, 44, 0.94), rgba(8, 7, 20, 0.96));
}

#view-studio #card-result h2 {
  font-size: 21px;
}

#view-studio .video-meta {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#view-studio .result-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 1fr) minmax(150px, 1fr);
  align-items: center;
  justify-content: end;
  margin-top: 24px;
  gap: 12px;
}

#view-studio .result-actions .btn {
  min-height: 52px;
  border-radius: 14px;
  font-size: 14px;
}

#view-studio .result-actions .btn-primary {
  box-shadow: 0 12px 32px rgba(236, 72, 153, 0.22);
}

#view-studio .render-history-card {
  background: rgba(13, 11, 28, 0.62);
  border-color: rgba(255, 255, 255, 0.055);
}

#view-studio .render-history-desc,
#view-studio .studio-meta-prompt-label,
#view-studio .render-history-section-subtitle {
  color: rgba(148, 163, 184, 0.82);
}

@media (max-width: 760px) {
  #view-studio .result-actions {
    grid-template-columns: 1fr;
  }
}

/* AI Profile Editor Redesign Enhancements */
.form-label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  width: 100%;
}

.form-label-with-action label {
  margin-bottom: 0 !important;
}

.label-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.model-scan-status-text {
  color: var(--text-dark);
}

.btn-link-action {
  background: none;
  border: none;
  color: var(--secondary, #6366f1);
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  text-decoration: underline;
  transition: color 0.2s;
}

.btn-link-action:hover {
  color: #818cf8;
}

.btn-link-action:disabled {
  color: var(--text-dark);
  text-decoration: none;
  cursor: not-allowed;
}

.ai-profile-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-profile-header-actions .btn {
  height: 32px;
  padding: 0 12px;
  font-size: 11px;
}

#openai-model-select {
  width: 100%;
}

