:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --bg-elevated: #1a1a1a;
  
  --text-primary: #f0f5f0;
  --text-secondary: #90a090;
  --text-muted: #607060;
  
  --accent-primary: #22c55e;
  --accent-secondary: #4ade80;
  --accent-glow: rgba(34, 197, 94, 0.3);
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
  
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Interactive Background Canvas */
#backgroundCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: transparent;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: transparent;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background: transparent;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  color: var(--accent-primary);
}

.logo span {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.balance-widget {
  margin: 0 16px 16px;
  padding: 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-md);
  text-align: center;
}

.balance-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.balance-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.balance-value.loading {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.balance-value.error {
  font-size: 0.8rem;
  color: #ef4444;
}

.eng-only {
  font-size: 0.65rem;
  color: #f59e0b;
  font-weight: 500;
}

.nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-tab svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-tab:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: var(--shadow-glow);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-header {
  margin-bottom: 32px;
}

.content-header h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.content-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Workspace */
.workspace {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-settings {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Upload Zone */
.upload-zone {
  border: none;
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  background: 
    linear-gradient(90deg, var(--border-color) 50%, transparent 50%) repeat-x,
    linear-gradient(90deg, var(--border-color) 50%, transparent 50%) repeat-x,
    linear-gradient(0deg, var(--border-color) 50%, transparent 50%) repeat-y,
    linear-gradient(0deg, var(--border-color) 50%, transparent 50%) repeat-y;
  background-size: 12px 1px, 12px 1px, 1px 12px, 1px 12px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
}

.upload-zone:hover {
  background: 
    linear-gradient(90deg, var(--accent-primary) 50%, transparent 50%) repeat-x,
    linear-gradient(90deg, var(--accent-primary) 50%, transparent 50%) repeat-x,
    linear-gradient(0deg, var(--accent-primary) 50%, transparent 50%) repeat-y,
    linear-gradient(0deg, var(--accent-primary) 50%, transparent 50%) repeat-y,
    rgba(34, 197, 94, 0.05);
  background-size: 12px 1px, 12px 1px, 1px 12px, 1px 12px, 100% 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0, 0 0;
}

.upload-zone.dragover {
  background: 
    linear-gradient(90deg, var(--accent-primary) 50%, transparent 50%) repeat-x,
    linear-gradient(90deg, var(--accent-primary) 50%, transparent 50%) repeat-x,
    linear-gradient(0deg, var(--accent-primary) 50%, transparent 50%) repeat-y,
    linear-gradient(0deg, var(--accent-primary) 50%, transparent 50%) repeat-y,
    rgba(34, 197, 94, 0.1);
  background-size: 12px 1px, 12px 1px, 1px 12px, 1px 12px, 100% 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0, 0 0;
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.upload-content svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
}

.upload-content span {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.upload-content small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.uploaded-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 2px);
}

.upload-zone.has-image .upload-content {
  opacity: 0;
}

/* Form Elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: all var(--transition-fast);
}

textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea::placeholder {
  color: var(--text-muted);
}

/* Holographic Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toggle-container {
  position: relative;
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 800px;
  z-index: 5;
  flex-shrink: 0;
}

.toggle-wrap {
  position: relative;
  width: 100%;
  height: 32px;
  transform-style: preserve-3d;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 30, 60, 0.4);
  border-radius: 16px;
  cursor: pointer;
  box-shadow:
    0 0 10px rgba(0, 80, 255, 0.2),
    inset 0 0 8px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  backdrop-filter: blur(5px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid rgba(0, 150, 255, 0.3);
}

.toggle-track::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      ellipse at center,
      rgba(0, 80, 255, 0.1) 0%,
      rgba(0, 0, 0, 0) 70%
    ),
    linear-gradient(90deg, rgba(0, 60, 120, 0.1) 0%, rgba(0, 30, 60, 0.2) 100%);
  opacity: 0.6;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 6px;
  background: linear-gradient(
    90deg,
    rgba(0, 170, 255, 0.3) 0%,
    rgba(0, 80, 255, 0.1) 100%
  );
  border-radius: 16px 16px 0 0;
  opacity: 0.7;
  filter: blur(1px);
}

.track-lines {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform: translateY(-50%);
  overflow: hidden;
}

.track-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 150, 255, 0.3) 0px,
    rgba(0, 150, 255, 0.3) 3px,
    transparent 3px,
    transparent 8px
  );
  animation: track-line-move 3s linear infinite;
}

@keyframes track-line-move {
  0% { transform: translateX(0); }
  100% { transform: translateX(10px); }
}

.toggle-thumb {
  position: absolute;
  width: 28px;
  height: 28px;
  left: 2px;
  top: 2px;
  background: radial-gradient(
    circle,
    rgba(10, 40, 90, 0.9) 0%,
    rgba(0, 20, 50, 0.8) 100%
  );
  border-radius: 50%;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.5),
    inset 0 0 10px rgba(0, 150, 255, 0.5);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 2;
  border: 1px solid rgba(0, 170, 255, 0.6);
  overflow: hidden;
  transform-style: preserve-3d;
}

.thumb-core {
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(0, 180, 255, 0.6) 0%,
    rgba(0, 50, 120, 0.2) 100%
  );
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 150, 255, 0.5);
  opacity: 0.9;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.thumb-inner {
  position: absolute;
  width: 12px;
  height: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(100, 200, 255, 0.5) 100%
  );
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(100, 200, 255, 0.7);
  opacity: 0.7;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  animation: toggle-pulse 2s infinite alternate;
}

@keyframes toggle-pulse {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.thumb-scan {
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 150, 255, 0.5) 20%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(0, 150, 255, 0.5) 80%,
    rgba(0, 0, 0, 0) 100%
  );
  top: 0;
  left: 0;
  filter: blur(1px);
  animation: thumb-scan 2s linear infinite;
  opacity: 0.7;
}

@keyframes thumb-scan {
  0% { top: -3px; opacity: 0; }
  20% { opacity: 0.7; }
  80% { opacity: 0.7; }
  100% { top: 28px; opacity: 0; }
}

.energy-rings {
  position: absolute;
  width: 28px;
  height: 28px;
  left: 2px;
  top: 2px;
  pointer-events: none;
  z-index: 1;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.energy-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid transparent;
  opacity: 0;
}

.energy-ring:nth-child(1) {
  width: 24px;
  height: 24px;
  border-top-color: rgba(0, 150, 255, 0.5);
  border-right-color: rgba(0, 150, 255, 0.3);
  animation: toggle-spin 3s linear infinite;
}

.energy-ring:nth-child(2) {
  width: 18px;
  height: 18px;
  border-bottom-color: rgba(0, 150, 255, 0.5);
  border-left-color: rgba(0, 150, 255, 0.3);
  animation: toggle-spin 2s linear infinite reverse;
}

@keyframes toggle-spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.holo-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 150, 255, 0.2) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  filter: blur(8px);
  opacity: 0.5;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 0;
}

/* Toggle Checked State */
.toggle-input:checked + .toggle-track {
  background: rgba(0, 60, 30, 0.4);
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow:
    0 0 15px rgba(34, 197, 94, 0.3),
    inset 0 0 8px rgba(0, 0, 0, 0.8);
}

.toggle-input:checked + .toggle-track::before {
  background: radial-gradient(
      ellipse at center,
      rgba(34, 197, 94, 0.15) 0%,
      rgba(0, 0, 0, 0) 70%
    ),
    linear-gradient(90deg, rgba(0, 120, 60, 0.1) 0%, rgba(0, 60, 30, 0.2) 100%);
}

.toggle-input:checked + .toggle-track::after {
  background: linear-gradient(
    90deg,
    rgba(34, 197, 94, 0.4) 0%,
    rgba(0, 160, 80, 0.1) 100%
  );
}

.toggle-input:checked + .toggle-track .track-line {
  background: repeating-linear-gradient(
    90deg,
    rgba(34, 197, 94, 0.4) 0px,
    rgba(34, 197, 94, 0.4) 3px,
    transparent 3px,
    transparent 8px
  );
  animation-direction: reverse;
}

.toggle-input:checked + .toggle-track .toggle-thumb {
  left: calc(100% - 30px);
  background: radial-gradient(
    circle,
    rgba(10, 90, 40, 0.9) 0%,
    rgba(0, 50, 20, 0.8) 100%
  );
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.5),
    inset 0 0 10px rgba(34, 197, 94, 0.6);
}

.toggle-input:checked + .toggle-track .thumb-core {
  background: radial-gradient(
    circle,
    rgba(34, 197, 94, 0.7) 0%,
    rgba(0, 120, 50, 0.2) 100%
  );
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

.toggle-input:checked + .toggle-track .thumb-inner {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(100, 255, 200, 0.5) 100%
  );
  box-shadow: 0 0 8px rgba(100, 255, 200, 0.8);
}

.toggle-input:checked + .toggle-track .thumb-scan {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(34, 197, 94, 0.5) 20%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(34, 197, 94, 0.5) 80%,
    rgba(0, 0, 0, 0) 100%
  );
}

.toggle-input:checked + .toggle-track .energy-rings {
  left: calc(100% - 30px);
}

.toggle-input:checked + .toggle-track .energy-ring {
  opacity: 1;
}

.toggle-input:checked + .toggle-track .energy-ring:nth-child(1) {
  border-top-color: rgba(34, 197, 94, 0.6);
  border-right-color: rgba(34, 197, 94, 0.3);
}

.toggle-input:checked + .toggle-track .energy-ring:nth-child(2) {
  border-bottom-color: rgba(34, 197, 94, 0.6);
  border-left-color: rgba(34, 197, 94, 0.3);
}

.toggle-input:checked + .toggle-track .holo-glow {
  background: radial-gradient(
    ellipse at center,
    rgba(34, 197, 94, 0.3) 0%,
    rgba(0, 0, 0, 0) 70%
  );
}

.toggle-input:hover + .toggle-track {
  box-shadow:
    0 0 20px rgba(0, 150, 255, 0.3),
    inset 0 0 8px rgba(0, 0, 0, 0.8);
}

.toggle-input:checked:hover + .toggle-track {
  box-shadow:
    0 0 20px rgba(34, 197, 94, 0.4),
    inset 0 0 8px rgba(0, 0, 0, 0.8);
}

/* Toggle Label */
.toggle-label-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-label-text span {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.toggle-label-text small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Radio Cards */
.bg-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-card {
  cursor: pointer;
}

.radio-card input {
  display: none;
}

.radio-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.radio-card input:checked + .radio-content {
  border-color: var(--accent-primary);
  background: rgba(34, 197, 94, 0.1);
  color: var(--text-primary);
}

.radio-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.solid-icon {
  background: white;
  border: 1px solid var(--border-color);
}

.gradient-icon {
  background: linear-gradient(135deg, #fff 0%, #ccc 100%);
  border: 1px solid var(--border-color);
}

/* Color Picker */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: transparent;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 4px;
}

input[type="color"]::-webkit-color-swatch {
  border-radius: var(--radius-sm);
  border: none;
}

.color-hex {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
}

.color-hex:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.color-presets {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.color-preset {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.color-preset:hover {
  transform: scale(1.15);
  border-color: var(--accent-primary);
}

.gradient-colors {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gradient-colors-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gradient-color-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gradient-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gradient-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.gradient-arrow-down {
  color: var(--accent-primary);
  font-size: 1.2rem;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
}

.btn-generate {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
}

/* Animated Generate Button */
.btn-generate-magic {
  --black-700: hsla(142, 70%, 20%, 1);
  --border_radius: 9999px;
  --transtion: 0.3s ease-in-out;
  --offset: 2px;

  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transform-origin: center;
  padding: 1rem 2rem;
  background-color: transparent;
  border: none;
  border-radius: var(--border_radius);
  transform: scale(calc(1 + (var(--active, 0) * 0.05)));
  transition: transform var(--transtion);
  width: 100%;
  font-family: inherit;
}

.btn-generate-magic::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-color: var(--black-700);
  border-radius: var(--border_radius);
  box-shadow: inset 0 0.5px hsl(142, 50%, 40%), inset 0 -1px 2px 0 hsl(0, 0%, 0%),
    0px 4px 10px -4px hsla(0 0% 0% / calc(1 - var(--active, 0))),
    0 0 0 calc(var(--active, 0) * 0.375rem) hsl(142, 70%, 45% / 0.75);
  transition: all var(--transtion);
  z-index: 0;
}

.btn-generate-magic::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-color: hsla(142, 70%, 45%, 0.75);
  background-image: radial-gradient(
      at 51% 89%,
      hsla(142, 50%, 60%, 1) 0px,
      transparent 50%
    ),
    radial-gradient(at 100% 100%, hsla(142, 40%, 50%, 1) 0px, transparent 50%),
    radial-gradient(at 22% 91%, hsla(142, 40%, 50%, 1) 0px, transparent 50%);
  background-position: top;
  opacity: var(--active, 0);
  border-radius: var(--border_radius);
  transition: opacity var(--transtion);
  z-index: 2;
}

.btn-generate-magic:is(:hover, :focus-visible) {
  --active: 1;
}

.btn-generate-magic:active {
  transform: scale(1);
}

.btn-generate-magic:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  --active: 0 !important;
}

.btn-generate-magic:disabled:hover {
  transform: scale(1);
}

.btn-generate-magic .dots_border {
  --size_border: calc(100% + 2px);
  overflow: hidden;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--size_border);
  height: var(--size_border);
  background-color: transparent;
  border-radius: var(--border_radius);
  z-index: -10;
}

.btn-generate-magic .dots_border::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: left;
  transform: rotate(0deg);
  width: 100%;
  height: 2rem;
  background-color: var(--accent-primary);
  mask: linear-gradient(transparent 0%, white 120%);
  animation: btn-rotate 2s linear infinite;
}

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

.btn-generate-magic .sparkle {
  position: relative;
  z-index: 10;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.btn-generate-magic .sparkle .path {
  fill: currentColor;
  stroke: currentColor;
  transform-origin: center;
  color: hsl(0, 0%, 100%);
}

.btn-generate-magic:is(:hover, :focus) .sparkle .path {
  animation: btn-path 1.5s linear 0.5s infinite;
}

.btn-generate-magic .sparkle .path:nth-child(1) {
  --scale_path_1: 1.2;
}
.btn-generate-magic .sparkle .path:nth-child(2) {
  --scale_path_2: 1.2;
}
.btn-generate-magic .sparkle .path:nth-child(3) {
  --scale_path_3: 1.2;
}

@keyframes btn-path {
  0%, 34%, 71%, 100% {
    transform: scale(1);
  }
  17% {
    transform: scale(var(--scale_path_1, 1));
  }
  49% {
    transform: scale(var(--scale_path_2, 1));
  }
  83% {
    transform: scale(var(--scale_path_3, 1));
  }
}

.btn-generate-magic .text_button {
  position: relative;
  z-index: 10;
  background-image: linear-gradient(
    90deg,
    hsla(0 0% 100% / 1) 0%,
    hsla(0 0% 100% / var(--active, 0)) 120%
  );
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 1rem;
  font-weight: 600;
  color: transparent;
  white-space: nowrap;
}

/* Glow Button Style */
.btn-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-glow .button-border {
  padding: 2px;
  background: #0005;
  border-radius: 12px;
}

.btn-glow .button-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.btn-glow .button-inner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.btn-glow .button-inner span {
  position: relative;
  z-index: 2;
  white-space: nowrap;
}

.btn-glow .backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    transparent 0,
    transparent 20%,
    rgba(17, 17, 17, 0.7) 50%
  );
  background-size: 3px 3px;
  z-index: 1;
  border-radius: 10px;
}

.btn-glow .spin {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.3s;
  border-radius: 10px;
}

.btn-glow:hover .spin {
  opacity: 1;
}

.btn-glow .spin::before {
  content: "";
  position: absolute;
  inset: -150%;
  background: linear-gradient(90deg, #22c55e 30%, transparent 50%, #4ade80 70%);
  animation: btn-spin 3s linear infinite paused;
}

.btn-glow:hover .spin::before {
  animation-play-state: running;
}

@keyframes btn-spin {
  0% { rotate: 0deg; }
  100% { rotate: 360deg; }
}

.btn-glow .spin-blur {
  filter: blur(1.5em);
}

.btn-glow .spin-intense {
  inset: -2px;
  filter: blur(4px);
}

.btn-glow .spin-intense::before {
  background: linear-gradient(90deg, #4ade80 20%, transparent 45% 55%, #22c55e 80%);
}

.btn-glow:hover .button-inner {
  background: var(--bg-elevated);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.btn-glow:active .button-inner {
  transform: scale(0.98);
}

.btn-glow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-glow:disabled:hover .spin {
  opacity: 0;
}

.btn-glow:disabled:hover .button-inner {
  background: var(--bg-tertiary);
  box-shadow: none;
}

/* Primary variant */
.btn-glow.btn-glow-primary .button-inner {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
}

.btn-glow.btn-glow-primary:hover .button-inner {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.5);
}

/* Holobox Preview Frame - Universal */
.holobox-frame {
  background: linear-gradient(145deg, #111111, #0a0a0a);
  padding: 20px;
  border-radius: var(--radius-xl);
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.05),
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
  display: flex;
  justify-content: center;
}

.holobox-screen {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.holobox-screen .preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
}

.holobox-screen .preview-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.5;
}

/* Panel Preview with Holobox */
.panel-preview {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.panel-preview .holobox-frame {
  width: 100%;
  max-width: 400px;
}

/* Gallery Styles */
.panel-gallery {
  align-items: stretch;
}

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

.gallery-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.gallery-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  min-height: 150px;
}

.gallery-grid-video {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.gallery-placeholder {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-md);
  background: 
    linear-gradient(90deg, var(--border-color) 50%, transparent 50%) repeat-x,
    linear-gradient(90deg, var(--border-color) 50%, transparent 50%) repeat-x,
    linear-gradient(0deg, var(--border-color) 50%, transparent 50%) repeat-y,
    linear-gradient(0deg, var(--border-color) 50%, transparent 50%) repeat-y;
  background-size: 12px 1px, 12px 1px, 1px 12px, 1px 12px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
}

.gallery-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

.gallery-item {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  background: var(--bg-tertiary);
}

.gallery-item:hover {
  border-color: var(--accent-primary);
  transform: scale(1.02);
}

.gallery-item.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-actions {
  display: flex;
  gap: 6px;
}

.gallery-item-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.gallery-item-btn:hover {
  background: var(--accent-primary);
}

.gallery-item-btn svg {
  width: 16px;
  height: 16px;
}

.gallery-item-status {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.gallery-item-status.generating {
  background: var(--warning);
  color: #000;
}

.gallery-item-status.ready {
  background: var(--success);
  color: white;
}

.gallery-item-status.error {
  background: var(--error);
  color: white;
}

/* Generating placeholder in gallery */
.gallery-item.generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.gallery-item.generating .magic-loader {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item.generating .magic-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: magicRingRotate 2s linear infinite;
}

@keyframes magicRingRotate {
  0% {
    transform: rotate(90deg);
    box-shadow: 0 4px 8px 0 #fff inset, 0 8px 12px 0 #4ade80 inset, 0 20px 20px 0 #16a34a inset;
  }
  50% {
    transform: rotate(270deg);
    box-shadow: 0 4px 8px 0 #fff inset, 0 8px 4px 0 #22c55e inset, 0 16px 20px 0 #15803d inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow: 0 4px 8px 0 #fff inset, 0 8px 12px 0 #4ade80 inset, 0 20px 20px 0 #16a34a inset;
  }
}

.gallery-item.generating .magic-text {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1px;
  font-size: 0.7rem;
  color: white;
}

.gallery-item.generating .magic-letter {
  opacity: 0.4;
  animation: magicLetterAnim 2s infinite;
  text-shadow: 0 0 5px rgba(74, 222, 128, 0.5);
}

.gallery-item.generating .magic-letter:nth-child(1) { animation-delay: 0s; }
.gallery-item.generating .magic-letter:nth-child(2) { animation-delay: 0.1s; }
.gallery-item.generating .magic-letter:nth-child(3) { animation-delay: 0.2s; }
.gallery-item.generating .magic-letter:nth-child(4) { animation-delay: 0.3s; }
.gallery-item.generating .magic-letter:nth-child(5) { animation-delay: 0.4s; }

@keyframes magicLetterAnim {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  20% {
    opacity: 1;
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
  }
  40% {
    opacity: 0.7;
    transform: scale(1);
  }
}

/* Matrix digits */
.gallery-item.generating .matrix-digits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-top: 8px;
  perspective: 800px;
  filter: blur(0.5px);
}

.gallery-item.generating .matrix-digit {
  color: #4ade80;
  font-family: monospace;
  font-size: 10px;
  text-align: center;
  text-shadow: 0 0 5px #22c55e;
  animation: matrixFall 2s infinite, matrixFlicker 0.5s infinite;
  opacity: 0;
}

.gallery-item.generating .matrix-digit:nth-child(1) { animation-delay: 0.1s; }
.gallery-item.generating .matrix-digit:nth-child(2) { animation-delay: 0.25s; }
.gallery-item.generating .matrix-digit:nth-child(3) { animation-delay: 0.4s; }
.gallery-item.generating .matrix-digit:nth-child(4) { animation-delay: 0.55s; }
.gallery-item.generating .matrix-digit:nth-child(5) { animation-delay: 0.7s; }
.gallery-item.generating .matrix-digit:nth-child(6) { animation-delay: 0.85s; }
.gallery-item.generating .matrix-digit:nth-child(7) { animation-delay: 1.0s; }
.gallery-item.generating .matrix-digit:nth-child(8) { animation-delay: 1.15s; }

@keyframes matrixFall {
  0% {
    transform: translateY(-15px) rotateX(90deg);
    opacity: 0;
  }
  20%, 80% {
    transform: translateY(0) rotateX(0deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(15px) rotateX(-90deg);
    opacity: 0;
  }
}

@keyframes matrixFlicker {
  0%, 19%, 21%, 100% {
    opacity: 0.8;
  }
  20% {
    opacity: 0.2;
  }
}

.gallery-item.generating .matrix-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.1) 0%, transparent 70%);
  animation: matrixPulse 2s infinite;
  pointer-events: none;
  border-radius: inherit;
}

@keyframes matrixPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

.gallery-item.generating .cancel-item-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(239, 68, 68, 0.8);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  opacity: 0.7;
}

.gallery-item.generating .cancel-item-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

/* Selected preview panel */
.selected-preview {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.selected-preview .holobox-frame {
  width: 100%;
  max-width: 320px;
}

.selected-preview .edit-tools {
  border-top: none;
  padding-top: 0;
}

.generated-image, .generated-video, .final-video, .final-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Crop container for image scaling/cropping */
.crop-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crop-container img {
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Edit Tools */
.edit-tools {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 400px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.crop-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.crop-tools-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 100px;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

#scaleValue,
#offsetXValue,
#offsetYValue {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 50px;
  text-align: right;
}

/* Video Tab Specific */
.source-image-preview {
  aspect-ratio: 9/16;
  max-height: 200px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.source-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.placeholder-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.source-placeholder-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 180px;
}

.duration-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-pill {
  cursor: pointer;
}

.radio-pill input {
  display: none;
}

.radio-pill span {
  display: block;
  padding: 10px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.radio-pill input:checked + span {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.radio-pill:hover span {
  border-color: var(--accent-primary);
}

.radio-pill.disabled {
  pointer-events: none;
  opacity: 0.4;
}


.model-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.model-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lipsync-model-group {
  animation: fadeIn 0.2s ease;
}

.model-label {
  color: var(--text-secondary);
}

.model-name {
  color: var(--accent-secondary);
  font-weight: 600;
}

/* Preview Tab */
.preview-workspace {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.preview-workspace .holobox-frame {
  max-width: 420px;
}

.preview-workspace .holobox-screen {
  width: 360px;
  height: 640px;
  max-width: none;
}

.preview-controls {
  display: flex;
  gap: 16px;
}

.btn-fullscreen, .btn-download {
  padding: 14px 28px;
}

/* Comparison Slider */
.comparison-container {
  width: 100%;
  max-width: 400px;
  position: relative;
}

.comparison-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
}

.comparison-before,
.comparison-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.comparison-before {
  z-index: 1;
}

.comparison-after {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}

.comparison-before video,
.comparison-after video,
.comparison-before img,
.comparison-after img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.comparison-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--accent-primary);
  z-index: 10;
  cursor: ew-resize;
  transform: translateX(-50%);
}

.comparison-slider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.comparison-slider::after {
  content: '↔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 18px;
  font-weight: bold;
  z-index: 1;
}

.comparison-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Loader */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  gap: 30px;
}

.cancel-btn {
  padding: 12px 32px;
  background: transparent;
  border: 2px solid rgba(239, 68, 68, 0.6);
  color: #ef4444;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4em;
  font-weight: 300;
  color: white;
  border-radius: 50%;
  background-color: transparent;
  user-select: none;
}

.loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: transparent;
  animation: loader-rotate 2s linear infinite;
  z-index: 0;
}

@keyframes loader-rotate {
  0% {
    transform: rotate(90deg);
    box-shadow:
      0 10px 20px 0 #fff inset,
      0 20px 30px 0 #4ade80 inset,
      0 60px 60px 0 #16a34a inset;
  }
  50% {
    transform: rotate(270deg);
    box-shadow:
      0 10px 20px 0 #fff inset,
      0 20px 10px 0 #22c55e inset,
      0 40px 60px 0 #15803d inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow:
      0 10px 20px 0 #fff inset,
      0 20px 30px 0 #4ade80 inset,
      0 60px 60px 0 #16a34a inset;
  }
}

.loader-text {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 2px;
}

.loader-letter {
  display: inline-block;
  opacity: 0.4;
  transform: translateY(0);
  animation: loader-letter-anim 2s infinite;
  z-index: 1;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.loader-letter:nth-child(1) {
  animation-delay: 0s;
}

.loader-letter:nth-child(2) {
  animation-delay: 0.1s;
}

.loader-letter:nth-child(3) {
  animation-delay: 0.2s;
}

.loader-letter:nth-child(4) {
  animation-delay: 0.3s;
}

.loader-letter:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes loader-letter-anim {
  0%, 100% {
    opacity: 0.4;
    transform: translateY(0) scale(1);
  }
  20% {
    opacity: 1;
    transform: translateY(-5px) scale(1.15);
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.8), 0 0 30px rgba(34, 197, 94, 0.6);
  }
  40% {
    opacity: 0.7;
    transform: translateY(0) scale(1);
  }
}

.loader-spinner {
  display: none;
}

.loader-progress {
  display: none;
}

/* Fullscreen Mode */
.fullscreen-mode {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-mode video,
.fullscreen-mode img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.fullscreen-close:hover {
  background: rgba(255,255,255,0.2);
}


/* Mask Editor Modal */
.mask-editor-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 10, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.mask-editor-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.mask-editor-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.mask-editor-close {
  width: 36px;
  height: 36px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mask-editor-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.mask-editor-body {
  display: flex;
  gap: 24px;
  padding: 24px;
  overflow-y: auto;
}

.mask-preview-container {
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#maskCanvas {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.mask-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mask-control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mask-control-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 80px;
}

.mask-control-group input[type="range"] {
  flex: 1;
}

.mask-control-group span {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 45px;
  text-align: right;
}

.mask-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  gap: 16px;
}

.mask-editor-footer .checkbox-label {
  font-size: 0.9rem;
}

.mask-editor-footer .btn-primary {
  padding: 12px 24px;
}

/* Source Selector for Video Tab */
.source-selector {
  margin-bottom: 16px;
}

.source-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.source-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.source-tab:hover {
  color: var(--text-primary);
}

.source-tab.active {
  background: var(--accent-primary);
  color: white;
}

.source-content {
  min-height: 120px;
}

.source-content .source-image-preview {
  aspect-ratio: 9/16;
  max-height: 180px;
  width: auto;
  margin: 0 auto;
}

.upload-zone-small {
  padding: 24px;
  min-height: 150px;
}

.upload-zone-small .upload-content svg {
  width: 36px;
  height: 36px;
}

/* Edit Tools Row */
.edit-tools-row {
  display: flex;
  gap: 12px;
}

.edit-tools-row .btn,
.edit-tools-row .btn-glow {
  flex: 1;
}

.edit-tools-row .btn-glow .button-border,
.edit-tools-row .btn-glow .button-inner {
  width: 100%;
}

/* Expand Modal */
.expand-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 10, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.expand-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.expand-modal-header {
  position: relative;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.expand-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.expand-modal-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.expand-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.expand-modal-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.expand-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.expand-video-container {
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.expand-video {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.expand-canvas {
  position: absolute;
  top: 0;
  left: 0;
}

.expand-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.expand-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.expand-timeline input[type="range"] {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.expand-time {
  display: flex;
  gap: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.expand-frame-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.expand-frame-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.expand-frame-preview canvas {
  border-radius: var(--radius-sm);
  background: #000;
}

.expand-frame-preview span {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.expand-prompt-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.expand-prompt-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.expand-prompt-group textarea {
  flex: 1;
  min-height: 80px;
  resize: none;
}

.expand-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
}

/* Effects Panel */
.btn-effects {
  width: 100%;
}

.effects-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  animation: fadeIn 0.2s ease;
}

.effects-panel textarea {
  min-height: 80px;
}

.effects-panel .btn-primary {
  width: 100%;
}

/* Chat Styles */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.chat-welcome-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* AI Loader Icon */
.ai-loader {
  --color-one: #4ade80;
  --color-two: #22c55e;
  --color-three: #4ade8080;
  --color-four: #22c55e80;
  --color-five: #4ade8040;
  --time-animation: 2s;
  --size: 0.6;
  position: relative;
  border-radius: 50%;
  transform: scale(var(--size));
  box-shadow:
    0 0 25px 0 var(--color-three),
    0 20px 50px 0 var(--color-four);
  animation: ai-colorize calc(var(--time-animation) * 3) ease-in-out infinite;
}

.ai-loader::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border-top: solid 1px var(--color-one);
  border-bottom: solid 1px var(--color-two);
  background: linear-gradient(180deg, var(--color-five), var(--color-four));
  box-shadow:
    inset 0 10px 10px 0 var(--color-three),
    inset 0 -10px 10px 0 var(--color-four);
}

.ai-loader .ai-box {
  width: 100px;
  height: 100px;
  background: linear-gradient(
    180deg,
    var(--color-one) 30%,
    var(--color-two) 70%
  );
  mask: url(#ai-clipping);
  -webkit-mask: url(#ai-clipping);
}

.ai-loader svg {
  position: absolute;
}

.ai-loader svg #ai-clipping {
  filter: contrast(15);
  animation: ai-roundness calc(var(--time-animation) / 2) linear infinite;
}

.ai-loader svg #ai-clipping polygon {
  filter: blur(7px);
}

.ai-loader svg #ai-clipping polygon:nth-child(1) {
  transform-origin: 75% 25%;
  transform: rotate(90deg);
}

.ai-loader svg #ai-clipping polygon:nth-child(2) {
  transform-origin: 50% 50%;
  animation: ai-rotation var(--time-animation) linear infinite reverse;
}

.ai-loader svg #ai-clipping polygon:nth-child(3) {
  transform-origin: 50% 60%;
  animation: ai-rotation var(--time-animation) linear infinite;
  animation-delay: calc(var(--time-animation) / -3);
}

.ai-loader svg #ai-clipping polygon:nth-child(4) {
  transform-origin: 40% 40%;
  animation: ai-rotation var(--time-animation) linear infinite reverse;
}

.ai-loader svg #ai-clipping polygon:nth-child(5) {
  transform-origin: 40% 40%;
  animation: ai-rotation var(--time-animation) linear infinite reverse;
  animation-delay: calc(var(--time-animation) / -2);
}

.ai-loader svg #ai-clipping polygon:nth-child(6) {
  transform-origin: 60% 40%;
  animation: ai-rotation var(--time-animation) linear infinite;
}

.ai-loader svg #ai-clipping polygon:nth-child(7) {
  transform-origin: 60% 40%;
  animation: ai-rotation var(--time-animation) linear infinite;
  animation-delay: calc(var(--time-animation) / -1.5);
}

@keyframes ai-rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes ai-roundness {
  0% { filter: contrast(15); }
  20% { filter: contrast(3); }
  40% { filter: contrast(3); }
  60% { filter: contrast(15); }
  100% { filter: contrast(15); }
}

@keyframes ai-colorize {
  0% { filter: hue-rotate(0deg); }
  20% { filter: hue-rotate(-30deg); }
  40% { filter: hue-rotate(-60deg); }
  60% { filter: hue-rotate(-90deg); }
  80% { filter: hue-rotate(-45deg); }
  100% { filter: hue-rotate(0deg); }
}

.chat-welcome h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.chat-welcome p {
  font-size: 0.95rem;
  max-width: 400px;
}

.chat-message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message.assistant {
  align-self: flex-start;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-message.user .chat-avatar {
  background: var(--accent-primary);
  color: white;
}

.chat-message.assistant .chat-avatar {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

.chat-avatar svg {
  width: 18px;
  height: 18px;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-message.user .chat-bubble {
  background: var(--accent-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.assistant .chat-bubble {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-bubble-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chat-bubble-images img {
  max-width: 200px;
  max-height: 150px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.chat-bubble pre {
  background: var(--bg-primary);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 8px 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
}

.chat-bubble code {
  font-family: 'Space Mono', monospace;
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}

.chat-typing span {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

.chat-attachments {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.chat-attachment-item {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.chat-attachment-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-attachment-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-attachment-remove:hover {
  background: var(--error);
}

.chat-input-container {
  padding: 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.chat-input-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-attach-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chat-attach-btn:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

.chat-attach-btn svg {
  width: 20px;
  height: 20px;
}

#chatInput {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  resize: none;
  max-height: 150px;
  padding: 8px 0;
  line-height: 1.4;
}

#chatInput:focus {
  outline: none;
}

#chatInput::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
  background: var(--accent-secondary);
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-send-btn svg {
  width: 18px;
  height: 18px;
}

/* Upload Video Zone */
.upload-video-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  background: 
    linear-gradient(90deg, var(--border-color) 50%, transparent 50%) repeat-x,
    linear-gradient(90deg, var(--border-color) 50%, transparent 50%) repeat-x,
    linear-gradient(0deg, var(--border-color) 50%, transparent 50%) repeat-y,
    linear-gradient(0deg, var(--border-color) 50%, transparent 50%) repeat-y;
  background-size: 12px 1px, 12px 1px, 1px 12px, 1px 12px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
}

.upload-video-zone:hover {
  background: 
    linear-gradient(90deg, var(--accent-primary) 50%, transparent 50%) repeat-x,
    linear-gradient(90deg, var(--accent-primary) 50%, transparent 50%) repeat-x,
    linear-gradient(0deg, var(--accent-primary) 50%, transparent 50%) repeat-y,
    linear-gradient(0deg, var(--accent-primary) 50%, transparent 50%) repeat-y,
    rgba(34, 197, 94, 0.05);
  background-size: 12px 1px, 12px 1px, 1px 12px, 1px 12px, 100% 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0, 0 0;
}

.upload-video-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.upload-video-content svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}

.upload-video-zone:hover .upload-video-content svg {
  color: var(--accent-primary);
}

.upload-video-content span {
  font-size: 0.95rem;
}

.upload-video-content small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Last Frame */
.last-frame-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  min-height: 80px;
  background: 
    linear-gradient(90deg, var(--border-color) 50%, transparent 50%) repeat-x,
    linear-gradient(90deg, var(--border-color) 50%, transparent 50%) repeat-x,
    linear-gradient(0deg, var(--border-color) 50%, transparent 50%) repeat-y,
    linear-gradient(0deg, var(--border-color) 50%, transparent 50%) repeat-y;
  background-size: 12px 1px, 12px 1px, 1px 12px, 1px 12px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
}

.last-frame-zone:hover {
  background: 
    linear-gradient(90deg, var(--accent-primary) 50%, transparent 50%) repeat-x,
    linear-gradient(90deg, var(--accent-primary) 50%, transparent 50%) repeat-x,
    linear-gradient(0deg, var(--accent-primary) 50%, transparent 50%) repeat-y,
    linear-gradient(0deg, var(--accent-primary) 50%, transparent 50%) repeat-y,
    rgba(34, 197, 94, 0.05);
  background-size: 12px 1px, 12px 1px, 1px 12px, 1px 12px, 100% 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0, 0 0;
}

.last-frame-zone.has-image {
  background: var(--bg-tertiary);
  padding: 0;
}

.last-frame-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.last-frame-content svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}

.last-frame-zone:hover .last-frame-content svg {
  color: var(--accent-primary);
}

.last-frame-preview {
  width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.last-frame-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.last-frame-remove:hover {
  background: var(--error);
}

.form-hint {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.kling-option {
  animation: fadeIn 0.2s ease;
}

/* Responsive */
@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  
  .panel-preview {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 70px;
    padding: 16px 8px;
  }
  
  .logo span,
  .nav-tab span:not(.nav-tab svg) {
    display: none;
  }
  
  .nav-tab {
    justify-content: center;
    padding: 12px;
  }
  
  .main-content {
    padding: 20px;
  }
}
