  /* ==================== SYSTEM TOKENS (unchanged) ==================== */
  :root {
    color-scheme: light dark;

    --space-unit: clamp(0.5rem, 1.5vi, 1rem);
    --space-2: calc(var(--space-unit) * 0.5);
    --space-4: var(--space-unit);
    --space-6: calc(var(--space-unit) * 1.5);
    --space-8: calc(var(--space-unit) * 2);
    --space-12: calc(var(--space-unit) * 3);
    --space-16: calc(var(--space-unit) * 4);

    /* Light mode (default) */
    --bg-primary: oklch(99% 0.001 275);
    --bg-secondary: oklch(96% 0.002 280);
    --bg-tertiary: oklch(93% 0.003 285);

    --text-primary: oklch(20% 0.006 280);
    --text-secondary: oklch(35% 0.008 280);
    --text-tertiary: oklch(50% 0.01 280);

    --border-subtle: oklch(80% 0.01 280 / 0.25);
    --border-strong: oklch(65% 0.015 280 / 0.3);

    --primary-500: oklch(62% 0.214 259.815);
    --primary-glass: oklch(62% 0.214 259.815 / 0.1);

    --success-bg: oklch(75% 0.15 145 / 0.25);
    --success-text: oklch(98% 0.002 275);
    --error-bg: oklch(95% 0.08 25);
    --error-text: oklch(40% 0.16 25);

    --glass-bg: oklch(100% 0 0 / 0.6);
    --glass-backdrop: blur(20px) saturate(160%);
    --glass-border: 0.5px solid oklch(75% 0.01 280 / 0.2);

    --shadow-sm: 0 2px 8px oklch(0% 0 0 / 0.03);
    --shadow-md: 0 8px 24px oklch(0% 0 0 / 0.05);
    --shadow-lg: 0 16px 48px oklch(0% 0 0 / 0.08);

    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;

    --duration-base: 250ms;
    --easing-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* Dark mode override */
  @media (prefers-color-scheme: dark) {
    :root {
      --bg-primary: oklch(12% 0.003 275);
      --bg-secondary: oklch(20% 0.004 275);
      --bg-tertiary: oklch(28% 0.005 275);
      --text-primary: oklch(98% 0.002 275);
      --text-secondary: oklch(75% 0.005 275);
      --text-tertiary: oklch(55% 0.007 275);
      --border-subtle: oklch(30% 0.005 275 / 0.3);
      --border-strong: oklch(45% 0.007 275 / 0.5);
      --primary-glass: oklch(62% 0.214 259.815 / 0.2);
      --glass-bg: oklch(20% 0.003 275 / 0.8);
      --glass-border: 0.5px solid var(--border-subtle);
      --shadow-sm: 0 2px 8px oklch(0% 0 0 / 0.4);
      --shadow-md: 0 8px 24px oklch(0% 0 0 / 0.5);
    }
  }

  :root.theme-light {
    color-scheme: light;
    --bg-primary: oklch(99% 0.001 275);
    --bg-secondary: oklch(96% 0.002 280);
    --bg-tertiary: oklch(93% 0.003 285);
    --text-primary: oklch(20% 0.006 280);
    --text-secondary: oklch(35% 0.008 280);
    --text-tertiary: oklch(50% 0.01 280);
    --border-subtle: oklch(80% 0.01 280 / 0.25);
    --border-strong: oklch(65% 0.015 280 / 0.3);
    --glass-bg: oklch(100% 0 0 / 0.6);
    --glass-border: 0.5px solid oklch(75% 0.01 280 / 0.2);
    --shadow-sm: 0 2px 8px oklch(0% 0 0 / 0.03);
    --shadow-md: 0 8px 24px oklch(0% 0 0 / 0.05);
  }

  :root.theme-dark {
    color-scheme: dark;
    --bg-primary: oklch(12% 0.003 275);
    --bg-secondary: oklch(20% 0.004 275);
    --bg-tertiary: oklch(28% 0.005 275);
    --text-primary: oklch(98% 0.002 275);
    --text-secondary: oklch(75% 0.005 275);
    --text-tertiary: oklch(55% 0.007 275);
    --border-subtle: oklch(30% 0.005 275 / 0.3);
    --border-strong: oklch(45% 0.007 275 / 0.5);
    --glass-bg: oklch(20% 0.003 275 / 0.8);
    --glass-border: 0.5px solid var(--border-subtle);
    --shadow-sm: 0 2px 8px oklch(0% 0 0 / 0.4);
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Отступ для фиксированной шапки */
  }

  /* scroll styles (unchanged) */
  .icon-grid::-webkit-scrollbar,
  textarea::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  .icon-grid::-webkit-scrollbar-track,
  textarea::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
  }
  .icon-grid::-webkit-scrollbar-thumb,
  textarea::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-tertiary);
  }
  .icon-grid::-webkit-scrollbar-thumb:hover,
  textarea::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
  }

  /* Glass components */
  .glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--duration-base) var(--easing-elastic);
  }

  .glass-panel:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
  }

  /* ==================== НОВАЯ ФИКСИРОВАННАЯ ШАПКА ==================== */
  .site-header {
    position: fixed;
    top: var(--space-4);
    left: var(--space-4);
    right: var(--space-4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-6);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    transition: all var(--duration-base) var(--easing-elastic);
  }

  .site-header:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
  }

  .header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1);
  }

  .header-logo svg {
    height: 60px;
    width: auto;
    display: block;
    color: var(--text-primary);
  }

  .theme-switch {
    display: flex;
    gap: var(--space-1);
    background: var(--bg-tertiary);
    padding: var(--space-1);
    border-radius: var(--radius-full);
    border: var(--glass-border);
    margin-right:var(--space-4);
  }

  .theme-icon-btn {
    padding: var(--space-2);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--duration-base) var(--easing-elastic);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
  }
  .theme-icon-btn:first-child {
    margin-right: var(--space-2);
  }

  .theme-icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
  }

  .theme-icon-btn.active {
    background: var(--primary-500);
    color: white;
    box-shadow: 0 2px 8px oklch(62% 0.214 259.815 / 0.3);
  }

  .theme-icon-btn:hover:not(.active) {
    background: var(--primary-glass);
    color: var(--primary-500);
  }

  /* Logo */
  .logo-container {
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    gap: var(--space-2); 
    margin-bottom: var(--space-4);
    width: 100%;
  }

  .logo-icon {
    width: clamp(15rem, 40vi, 20rem); 
    height: auto;
    display: block;
    color: var(--text-primary);
  }

  /* Layout */
  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-8);
    width: 100%;
  }

  .header {
    text-align: center;
    margin-bottom: var(--space-16);
  }

  .header h1 {
    font-size: clamp(1.8rem, 5vi, 4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-4);
    line-height: 1.2;
    word-break: break-word;
    hyphens: auto;
  }

  .header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
  }

  .converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
  }

  /* Input panel */
  .input-panel {
    padding: var(--space-8);
  }

  .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
  }

  .panel-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
  }

  .copy-btn {
    background: var(--bg-tertiary);
    border: var(--glass-border);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--duration-base) var(--easing-elastic);
  }

  .copy-btn:hover:not(:disabled) {
    background: var(--primary-500);
    color: white;
    transform: translateY(-2px);
  }

  .copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  textarea {
    width: 100%;
    height: 280px;
    padding: var(--space-6);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    resize: none; /* запрещаем изменение размера */
    white-space: pre-wrap; /* перенос строк */
    word-wrap: break-word; /* перенос длинных слов */
    overflow-x: hidden; /* убираем горизонтальный скролл */
    overflow-y: auto; /* только вертикальный скролл */
    transition: all var(--duration-base);
  }

  textarea::-webkit-resizer {
    display: none;
  }
  .download-btn.hidden {
    display: none;
  }

  /* Для Firefox */
  textarea {
    scrollbar-width: thin;
    scrollbar-color: var(--text-tertiary) var(--bg-tertiary);
  }

  /* Кастомный скролл только вертикальный */
  textarea::-webkit-scrollbar {
    width: 10px;
    height: 0; /* убираем горизонтальный скроллбар */
  }

  textarea::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
  }

  textarea::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-tertiary);
  }

  textarea::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
  }

  textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-glass);
  }

  .button-group {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-6);
    flex-wrap: wrap;
  }

  .btn {
    padding: var(--space-4) var(--space-8);
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--duration-base) var(--easing-elastic);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    border: var(--glass-border);
  }

  .btn-primary {
    background: var(--primary-500);
    color: white;
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px oklch(62% 0.214 259.815 / 0.3);
  }

  .btn:hover:not(.btn-primary) {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
  }

  /* Preview panel */
  .preview-panel {
    padding: var(--space-8);
  }

  .preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  .preview-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
  }

  .icon-count {
    background: var(--bg-tertiary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    border: var(--glass-border);
    color: var(--text-secondary);
  }

  .icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-4);
    max-height: 280px;
    overflow-y: auto;
    padding: var(--space-4);
    margin: 0 -0.25rem;
    scroll-behavior: smooth;
  }

  .icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: var(--glass-border);
    transition: all var(--duration-base) var(--easing-elastic);
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-sm);
    margin: 0.25rem;
    animation: fadeInUp 0.4s var(--easing-elastic);
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .icon-card:hover {
    transform: scale(1.05);
    border-color: var(--primary-500);
    box-shadow: 0 8px 24px var(--primary-glass);
    background: var(--bg-tertiary);
    z-index: 2;
  }

  .icon-card svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px oklch(0% 0 0 / 0.05));
  }

  .icon-card span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stats-panel {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border: var(--glass-border);
  }

  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }

  .stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }

  .stat-label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .stat-value.small {
    font-size: 1.2rem;
  }

  .download-btn {
    width: 100%;
    margin-top: var(--space-6);
    padding: var(--space-4);
    background: linear-gradient(135deg, #FF7D3A, #F96283);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-base) var(--easing-elastic);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
  }

  .download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px oklch(62% 0.214 259.815 / 0.4);
  }

  .download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  /* Убираем старые логи */
  .log {
    display: none !important;
  }

  /* Тосты - новые уведомления */
  .toast-container {
    position: fixed;
    top: 90px; /* Опустил, чтобы не налезало на шапку */
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
  }

  .toast {
    max-width: 380px;
    min-width: 300px;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    border: 1px solid transparent;
    animation: toastSlideIn 0.3s var(--easing-elastic);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: var(--space-3);
  }

  .toast.success {
    background: light-dark(
      oklch(90% 0.12 145 / 0.9),
      oklch(30% 0.14 145 / 0.9)
    );
    color: light-dark(
      oklch(20% 0.08 145),
      oklch(90% 0.08 145)
    );
    border-color: light-dark(
      oklch(65% 0.14 145 / 0.5),
      oklch(65% 0.14 145 / 0.3)
    );
  }

  .toast.error {
    background: light-dark(
      oklch(90% 0.12 25 / 0.9),
      oklch(35% 0.16 25 / 0.9)
    );
    color: light-dark(
      oklch(30% 0.16 25),
      oklch(95% 0.08 25)
    );
    border-color: light-dark(
      oklch(70% 0.16 25 / 0.5),
      oklch(70% 0.16 25 / 0.3)
    );
  }

  .toast.info {
    background: light-dark(
      oklch(95% 0.005 275 / 0.9),
      oklch(25% 0.005 275 / 0.9)
    );
    color: var(--text-secondary);
    border-color: var(--border-subtle);
  }

  .toast-icon {
    font-size: 1.4rem;
    line-height: 1;
  }

  .toast-content {
    flex: 1;
  }

  .toast-close {
    background: none;
    border: none;
    color: currentColor;
    opacity: 0.6;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 var(--space-2);
    transition: opacity var(--duration-base);
  }

  .toast-close:hover {
    opacity: 1;
  }

  @keyframes toastSlideIn {
    from {
      opacity: 0;
      transform: translateX(100%) scale(0.9);
    }
    to {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
  }

  @keyframes toastSlideOut {
    from {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
    to {
      opacity: 0;
      transform: translateX(100%) scale(0.9);
    }
  }

  .toast.closing {
    animation: toastSlideOut 0.2s var(--easing-elastic) forwards;
  }

  /* Reverse panel with tabs */
  .reverse-panel {
    margin-top: var(--space-8);
    padding: var(--space-8);
    border: 2px dashed var(--primary-500);
    border-radius: var(--radius-xl);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    transition: all var(--duration-base);
  }

  .reverse-panel.drag-over {
    border-color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: scale(1.01);
  }

  .reverse-panel.has-files {
    border-color: var(--success-bg);
    background: var(--primary-glass);
  }

  .reverse-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
  }

  .reverse-header h3 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-right: auto;
  }

  /* Элегантный переключатель вкладок */
  .mode-switch {
    display: flex;
    gap: var(--space-1);
    background: var(--bg-tertiary);
    padding: var(--space-1);
    border-radius: var(--radius-full);
    border: var(--glass-border);
    backdrop-filter: blur(8px);
  }

  .mode-btn {
    padding: var(--space-2) var(--space-4);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--duration-base) var(--easing-elastic);
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }

  .mode-btn.active {
    background: var(--primary-500);
    color: white;
    box-shadow: 0 2px 8px oklch(62% 0.214 259.815 / 0.3);
  }

  .mode-btn:hover:not(.active) {
    background: var(--primary-glass);
    color: var(--primary-500);
  }

  .file-badge {
    background: var(--primary-500);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);   
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;   
    backdrop-filter: blur(4px); 
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--primary-glass);
  }

  .drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-8);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    border: var(--glass-border);
    transition: all var(--duration-base);
  }

  .has-files .drop-zone {
    background: var(--success-bg);
    border-color: var(--success-bg);
  }

  .drop-zone p {
    margin: var(--space-4) 0 0;
    font-size: 1.2rem;
    color: var(--text-tertiary);
  }

  .drop-zone svg {
    width: 64px;
    height: 64px;
    opacity: 0.7;
  }

  /* Paste zone */
  .paste-zone {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .paste-zone textarea {
    height: 200px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    resize: vertical;
  }

  .paste-zone .button-group {
    margin-top: 0;
    justify-content: flex-end;
  }

  .footer {
    text-align: center;
    margin-top: var(--space-8);
    color: var(--text-secondary);
    font-size: 0.95rem;
  }

  .orchestra-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.3rem;
    padding: 8px 20px;
    border: var(--glass-border);
    border-radius: var(--radius-full);
    margin: 20px 0 8px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--duration-base) var(--easing-elastic);
    text-decoration: none;
    backdrop-filter: var(--glass-backdrop);
  }

  .orchestra-button:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-tertiary);
  }

  .orchestra-button svg {
    width: 32px;
    height: 32px;
    filter: none;
    color: currentColor;
  }

  .button-sub {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
    letter-spacing: 0.3px;
    margin-top: 2px;
    color: var(--text-tertiary);
  }

  .footer-note {
    font-size: 0.8rem;
    margin-top: var(--space-2);
    color: var(--text-tertiary);
  }

  @media (max-width: 768px) {
    body {
      padding-top: 70px; /* Меньше отступ на мобилках */
    }
    
    .site-header {
      padding: var(--space-1) var(--space-2);
    }
    
    .header-logo svg {
      height: 50px;
    }
    
    .theme-icon-btn {
      width: 36px;
      height: 36px;
    }
    
    .theme-icon-btn svg {
      width: 18px;
      height: 18px;
    }
    
    .converter-grid {
      grid-template-columns: 1fr;
    }
    body {
      padding: var(--space-4);
    }
    .toast-container {
      left: 20px;
      right: 20px;
      top: 80px; /* Опустил ниже */
    }
    .toast {
      min-width: auto;
      max-width: none;
    }
    .reverse-header {
      flex-direction: row; 
      align-items: center;
      flex-wrap: wrap;
    }
    .mode-switch {
      width: 100%;
    }
    .mode-btn {
      flex: 1;
      justify-content: center;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    * {
      animation: none !important;
      transition: none !important;
    }
  }

  .preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-subtle);
    color: var(--text-tertiary);
    gap: var(--space-4);
    transition: all var(--duration-base);
  }

  .preview-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
    stroke: var(--text-tertiary);
    stroke-width: 1.5;
  }

  .preview-placeholder p {
    font-size: 1rem;
    color: var(--text-tertiary);
    max-width: 200px;
    text-align: center;
  }

  .preview-placeholder .placeholder-icons {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
  }

  .preview-placeholder .placeholder-icons svg {
    width: 32px;
    height: 32px;
    opacity: 0.3;
  }
  /* Подсветка с скругленными углами */
.preview-highlight {
border-radius: var(--radius-lg) !important;
overflow: hidden !important;
}

.highlight-overlay {
position: relative;
}

.highlight-overlay::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--primary-glass);
border-radius: inherit;
pointer-events: none;
animation: fadeOut 0.6s var(--easing-elastic);
}

@keyframes fadeOut {
from { opacity: 1; }
to { opacity: 0; }
}