/* VILAAN ASCIIniate - VI_LAAN V_I_L_A_A_N */
    :root {
      --accent-color: #D49C6B;
      --accent-hover: #C48A5A;
      --dark-bg: #1A1A1A;
      --dark-surface: #242424;
      --dark-surface-hover: #2E2E2E;
      --dark-text: #E5E5E5;
      --dark-text-secondary: #A0A0A0;
      --dark-border: #3A3A3A;
      --light-bg: #F5F5F5;
      --light-surface: #FFFFFF;
      --light-surface-hover: #EBEBEB;
      --light-text: #1A1A1A;
      --light-text-secondary: #666666;
      --light-border: #D0D0D0;
    }

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

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
      background: var(--dark-bg);
      color: var(--dark-text);
      transition: background 0.3s, color 0.3s;
    }

    body.light-theme {
      background: var(--light-bg);
      color: var(--light-text);
    }

    .container {
      display: flex;
      height: 100vh;
      overflow: hidden;
    }

    /* Sidebar | Vilaan */
    .sidebar {
      width: 380px;
      background: var(--dark-surface);
      border-right: 1px solid var(--dark-border);
      overflow-y: auto;
      padding: 24px;
      transition: background 0.3s, border-color 0.3s;
      flex-shrink: 0;
    }

    body.light-theme .sidebar {
      background: var(--light-surface);
      border-color: var(--light-border);
    }

    .header {
      margin-bottom: 32px;
      text-align: center;
    }

    .header h1 {
      font-size: 28px;
      font-weight: 700;
      color: var(--accent-color);
      margin-bottom: 4px;
    }

    .header .version {
      font-size: 12px;
      color: var(--dark-text-secondary);
    }

    .header .version a {
      color: var(--dark-text);
      text-decoration: none;
      transition: color 0.2s;
    }

    .header .version a:hover {
      color: var(--accent-color);
      text-decoration: none;
    }

    body.light-theme .header .version {
      color: var(--light-text-secondary);
    }

    body.light-theme .header .version a {
      color: var(--light-text);
    }

    body.light-theme .header .version a:hover {
      color: var(--accent-color);
    }

    .section {
      margin-bottom: 24px;
      padding-bottom: 24px;
      border-bottom: 1px solid var(--dark-border);
    }

    body.light-theme .section {
      border-color: var(--light-border);
    }

    .section:last-child {
      border-bottom: none;
    }

    .section-title {
      font-size: 14px;
      font-weight: 600;
      margin-bottom: 16px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--accent-color);
    }

    .control {
      margin-bottom: 16px;
    }

    .control-label {
      margin-bottom: 8px;
      font-size: 13px;
      font-weight: 500;
    }

    input[type="range"] {
      width: 100%;
      height: 20px;
      border-radius: 3px;
      background: transparent;
      outline: none;
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
    }

    input[type="range"]::-webkit-slider-runnable-track {
      width: 100%;
      height: 6px;
      border-radius: 3px;
      background: var(--dark-border);
    }

    body.light-theme input[type="range"]::-webkit-slider-runnable-track {
      background: var(--light-border);
    }

    input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--accent-color);
      cursor: pointer;
      margin-top: -4px;
      border: none;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
      transition: transform 0.2s;
    }

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

    input[type="range"]::-moz-range-track {
      width: 100%;
      height: 6px;
      border-radius: 3px;
      background: var(--dark-border);
    }

    body.light-theme input[type="range"]::-moz-range-track {
      background: var(--light-border);
    }

    input[type="range"]::-moz-range-thumb {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--accent-color);
      cursor: pointer;
      border: none;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
      transition: transform 0.2s;
    }

    input[type="range"]::-moz-range-thumb:hover {
      transform: scale(1.15);
    }

    input[type="number"],
    input[type="text"],
    input[type="color"],
    select {
      width: 100%;
      padding: 10px;
      border: 1px solid var(--dark-border);
      border-radius: 6px;
      background: var(--dark-bg);
      color: var(--dark-text);
      font-size: 13px;
      transition: all 0.2s;
    }

    body.light-theme input[type="number"],
    body.light-theme input[type="text"],
    body.light-theme input[type="color"],
    body.light-theme select {
      background: var(--light-bg);
      color: var(--light-text);
      border-color: var(--light-border);
    }

    input[type="number"]:focus,
    input[type="text"]:focus,
    select:focus {
      outline: none;
      border-color: var(--accent-color);
    }

    input[type="color"] {
      height: 44px;
      cursor: pointer;
      padding: 4px;
    }

    /* Checkbox */
    .checkbox-wrapper {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 2px;
    }

    .checkbox-wrapper input[type="checkbox"] {
      width: 18px;
      height: 18px;
      cursor: pointer;
      accent-color: var(--accent-color);
    }

    .checkbox-wrapper label {
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
    }

    .radio-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .radio-wrapper {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.2s;
    }

    .radio-wrapper:hover {
      background: var(--dark-surface-hover);
    }

    body.light-theme .radio-wrapper:hover {
      background: var(--light-surface-hover);
    }

    input[type="radio"] {
      width: 18px;
      height: 18px;
      cursor: pointer;
      accent-color: var(--accent-color);
    }

    button {
      padding: 12px;
      border: none;
      border-radius: 6px;
      background: var(--accent-color);
      color: #FFFFFF;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      width: 100%;
    }

    button:hover {
      background: var(--accent-hover);
    }

    button.secondary {
      background: var(--dark-surface-hover);
      color: var(--dark-text);
    }

    body.light-theme button.secondary {
      background: var(--light-surface-hover);
      color: var(--light-text);
    }

    button.secondary:hover {
      background: var(--accent-color);
      color: #FFFFFF;
    }

    body.light-theme button.secondary:hover {
      background: var(--accent-color);
      color: #000;
    }

    input[type="file"] {
      display: none;
    }

    /* File Upload Button - PIXELiate style */
    .file-upload-btn {
      display: block;
      width: 100%;
      padding: 12px;
      background: var(--accent-color);
      color: #FFFFFF;
      text-align: center;
      border-radius: 6px;
      cursor: pointer;
      font-weight: 600;
      transition: all 0.2s;
    }

    .file-upload-btn:hover {
      background: var(--accent-hover);
    }

    .main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .canvas-wrapper {
      flex: 1;
      overflow: hidden;
      padding: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Transparent Checkers Background - on wrapper, BEHIND the ASCII art */
    .main-content.checkers-dark .ascii-touch-container,
    .main-content.checkers-light .ascii-touch-container {
      position: relative;
    }

    .main-content.checkers-dark .ascii-touch-container::before,
    .main-content.checkers-light .ascii-touch-container::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      pointer-events: none;
    }

    .main-content.checkers-dark .ascii-touch-container::before {
      background-image: 
        linear-gradient(45deg, #404040 25%, transparent 25%),
        linear-gradient(-45deg, #404040 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #404040 75%),
        linear-gradient(-45deg, transparent 75%, #404040 75%);
      background-size: 20px 20px;
      background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
      background-color: #303030;
    }

    .main-content.checkers-light .ascii-touch-container::before {
      background-image: 
        linear-gradient(45deg, #d0d0d0 25%, transparent 25%),
        linear-gradient(-45deg, #d0d0d0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d0d0d0 75%),
        linear-gradient(-45deg, transparent 75%, #d0d0d0 75%);
      background-size: 20px 20px;
      background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
      background-color: #e8e8e8;
    }

    /* Center the ASCII art container - centers empty state message */
    .ascii-touch-container {
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 100%;
      min-height: 100%;
    }

    #ascii-art {
      font-family: 'Courier New', Courier, monospace;
      white-space: pre;
      line-height: 1;
      letter-spacing: 0;
      display: inline-block;
      font-size: 7px;
      color: #000000;
      background-color: #FFFFFF;
      padding: 0;
      margin: 0;
      user-select: text;
      -webkit-user-select: text;
      transform-origin: 0 0;
      text-rendering: optimizeSpeed;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      font-variant-ligatures: none;
      font-feature-settings: normal;
      position: relative;
      z-index: 1;
    }

    .controls-bar {
      display: flex;
      gap: 12px;
      padding: 16px 24px;
      background: var(--dark-surface);
      border-top: 1px solid var(--dark-border);
      transition: background 0.3s, border-color 0.3s;
    }

    body.light-theme .controls-bar {
      background: var(--light-surface);
      border-color: var(--light-border);
    }

    .controls-bar button {
      flex: 1;
      margin: 0;
    }

    /* Desktop controls-bar - visible on desktop */
    .desktop-controls-bar {
      display: flex;
    }

    /* Mobile controls-bar - hidden on desktop */
    .mobile-controls-bar {
      display: none;
    }

    /* When controls-bar is inside sidebar (mobile) */
    .sidebar .controls-bar {
      background: transparent;
      border-top: 1px solid var(--dark-border);
      margin-top: 16px;
      padding-top: 16px;
    }

    body.light-theme .sidebar .controls-bar {
      border-top-color: var(--light-border);
    }

    /* Show mobile controls on mobile/tablet */
    @media (max-width: 1024px) {
      .desktop-controls-bar {
        display: none !important;
      }
      
      .mobile-controls-bar {
        display: flex !important;
      }
    }

    .dual-input {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .dual-input input[type="range"] {
      flex: 1.5;
      min-width: 0;
    }

    .dual-input .number-stepper {
      flex: 1;
      min-width: 0;
      max-width: 140px;
    }

    .color-opacity-group {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    canvas {
      display: none;
    }

    #ascii-art.empty-state {
      text-align: center;
      color: var(--dark-text-secondary) !important;
      font-size: 16px !important;
      padding: 48px !important;
      background: transparent !important;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
      white-space: normal !important;
      line-height: 1.5 !important;
    }

    body.light-theme #ascii-art.empty-state {
      color: var(--light-text-secondary) !important;
    }

    /* Mode Toggle - PIXELiate style */
    .mode-toggle {
      display: flex;
      gap: 0;
      margin-bottom: 0;
      width: 100%;
    }

    .mode-toggle button {
      flex: 1;
      margin: 0;
      padding: 12px 16px;
      border: 1px solid var(--dark-border);
      background: var(--dark-surface);
      color: var(--dark-text);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .mode-toggle button:first-child {
      border-radius: 6px 0 0 6px;
    }

    .mode-toggle button:last-child {
      border-radius: 0 6px 6px 0;
    }

    body.light-theme .mode-toggle button {
      background: var(--light-surface);
      color: var(--light-text);
      border-color: var(--light-border);
    }

    .mode-toggle button.active {
      background: var(--accent-color);
      border-color: var(--accent-color);
      color: #000;
    }

    body.light-theme .mode-toggle button.active {
      background: var(--accent-color);
      border-color: var(--accent-color);
      color: #000;
    }

    .mode-toggle button:hover:not(.active) {
      background: var(--dark-surface-hover);
      color: var(--accent-color);
    }

    body.light-theme .mode-toggle button:hover:not(.active) {
      background: var(--light-surface-hover);
      color: var(--accent-color);
    }

    ::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }

    ::-webkit-scrollbar-track {
      background: var(--dark-bg);
    }

    body.light-theme ::-webkit-scrollbar-track {
      background: var(--light-bg);
    }

    ::-webkit-scrollbar-thumb {
      background: var(--dark-border);
      border-radius: 5px;
    }

    body.light-theme ::-webkit-scrollbar-thumb {
      background: var(--light-border);
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--accent-color);
    }

    /* Toggle Switch */
    .theme-toggle-wrapper {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .toggle-switch {
      position: relative;
      display: inline-block;
      width: 50px;
      height: 24px;
    }

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

    .toggle-slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: var(--dark-border);
      transition: .3s;
      border-radius: 24px;
    }

    .toggle-slider:before {
      position: absolute;
      content: "";
      height: 18px;
      width: 18px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      transition: .3s;
      border-radius: 50%;
    }

    input:checked + .toggle-slider {
      background-color: var(--accent-color);
    }

    input:checked + .toggle-slider:before {
      transform: translateX(26px);
    }

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

    .color-row label {
      flex: 0 0 120px;
      font-size: 13px;
      font-weight: 500;
    }

    .color-picker-compact {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      border: 2px solid var(--dark-border);
      cursor: pointer;
      padding: 0;
      transition: all 0.2s;
      background: var(--picker-color, #000000);
    }

    body.light-theme .color-picker-compact {
      border-color: var(--light-border);
    }

    .color-picker-compact:hover {
      border-color: var(--accent-color);
      transform: scale(1.05);
    }

    #textColor {
      --picker-color: #000000;
    }

    #bgColor {
      --picker-color: #FFFFFF;
    }

    .color-controls-row {
      display: flex;
      gap: 24px;
      margin-top: 8px;
      justify-content: center;
    }

    .color-control-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      flex: 1;
      max-width: 120px;
    }

    .color-control-label {
      font-size: 11px;
      font-weight: 500;
      color: var(--dark-text);
      text-align: center;
      line-height: 1.3;
    }

    body.light-theme .color-control-label {
      color: var(--light-text);
    }

    /* Custom zoom input inline */
    .custom-zoom-inline {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .custom-zoom-inline input {
      width: 60px;
      padding: 8px;
      border: 1px solid var(--dark-border);
      border-radius: 4px;
      background: var(--dark-bg);
      color: var(--dark-text);
      font-size: 12px;
    }

    body.light-theme .custom-zoom-inline input {
      background: var(--light-bg);
      color: var(--light-text);
      border-color: var(--light-border);
    }

    /* Custom Color Picker */
    .color-picker-modal {
      display: none;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--dark-surface);
      border: 1px solid var(--dark-border);
      border-radius: 12px;
      padding: 24px;
      z-index: 10000;
      max-width: 90%;
      max-height: 90vh;
      overflow-y: auto;
    }
    
    @media (min-width: 768px) and (max-width: 1024px) {
      .color-picker-modal {
        max-width: 370px;
        padding: 20px;
      }
    }

    body.light-theme .color-picker-modal {
      background: var(--light-surface);
      border-color: var(--light-border);
      box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    }

    .color-picker-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.7);
      z-index: 10000;
    }

    /* Export Modal */
    .export-modal {
      display: none;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--dark-surface);
      border: 1px solid var(--dark-border);
      border-radius: 12px;
      padding: 24px;
      box-shadow: 0 10px 40px rgba(0,0,0,0.5);
      z-index: 10001 !important;
      width: 300px;
      pointer-events: auto;
    }

    body.light-theme .export-modal {
      background: var(--light-surface);
      border-color: var(--light-border);
      box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    }

    .export-modal h3 {
      margin: 0 0 8px 0;
      font-size: 16px;
      color: var(--accent-color);
    }

    .export-modal p {
      margin: 0 0 16px 0;
      font-size: 12px;
      color: var(--dark-text-secondary);
    }

    body.light-theme .export-modal p {
      color: var(--light-text-secondary);
    }

    .export-modal input {
      width: 100%;
      padding: 12px;
      border: 1px solid var(--dark-border);
      border-radius: 8px;
      background: var(--dark-bg);
      color: var(--dark-text);
      font-size: 14px;
      margin-bottom: 12px;
    }

    body.light-theme .export-modal input {
      background: var(--light-bg);
      color: var(--light-text);
      border-color: var(--light-border);
    }

    .export-modal input:focus {
      outline: none;
      border-color: var(--accent-color);
    }

    /* Hide default number input spinners */
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    input[type="number"] {
      appearance: textfield;
      -moz-appearance: textfield;
    }

    /* Custom number stepper */
    .number-stepper {
      display: flex;
      align-items: stretch;
      background: var(--dark-bg);
      border: 1px solid var(--dark-border);
      border-radius: 6px;
      overflow: hidden;
      height: 36px;
    }

    body.light-theme .number-stepper {
      background: var(--light-bg);
      border-color: var(--light-border);
    }

    .number-stepper button {
      width: 32px;
      height: 100%;
      border: none;
      background: var(--dark-surface);
      color: var(--accent-color);
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      border-right: 1px solid var(--dark-border);
    }

    .number-stepper button:last-child {
      border-right: none;
      border-left: 1px solid var(--dark-border);
    }

    body.light-theme .number-stepper button {
      background: var(--light-surface);
      border-color: var(--light-border);
      color: var(--accent-color);
    }

    .number-stepper button:hover {
      background: var(--accent-color);
      color: #000;
    }

    body.light-theme .number-stepper button:hover {
      background: var(--accent-color);
      color: #000;
    }

    .number-stepper input {
      flex: 1;
      text-align: center;
      border: none;
      background: transparent;
      color: var(--dark-text);
      font-size: 13px;
      padding: 0 8px;
      min-width: 0;
    }

    body.light-theme .number-stepper input {
      color: var(--light-text);
    }

    .number-stepper input:focus {
      outline: none;
    }

    .number-spinner-buttons {
      position: absolute;
      right: 2px;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      gap: 1px;
    }

    .spinner-btn {
      width: 18px;
      height: 12px;
      background: var(--accent-color);
      border: none;
      color: white;
      font-size: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      padding: 0;
    }

    .spinner-btn:hover {
      background: var(--accent-hover);
    }

    .spinner-btn:first-child {
      border-radius: 0 4px 0 0;
    }

    .spinner-btn:last-child {
      border-radius: 0 0 4px 0;
    }

    /* Modern Select Dropdown */
    select {
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      background-image: url('data:image/svg+xml;utf8,<svg fill="%23D49C6B" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
      background-repeat: no-repeat;
      background-position: right 8px center;
      background-size: 20px;
      padding-right: 32px;
      cursor: pointer;
    }

    select:hover {
      border-color: var(--accent-color);
    }

    select:focus {
      outline: none;
      border-color: var(--accent-color);
    }

    select option:checked,
    select option:hover {
      background: var(--accent-color);
      color: var(--dark-bg);
    }

    /* Compact spacing */
    .section {
      margin-bottom: 18px;
      padding-bottom: 18px;
    }

    .control {
      margin-bottom: 12px;
    }

    .checkbox-wrapper {
      padding: 8px 0;
    }

    /* Language Switcher - PIXELiate style */
    .lang-btn {
      padding: 6px 16px;
      border: 1px solid var(--dark-border);
      background: var(--dark-surface-hover);
      color: var(--dark-text);
      border-radius: 6px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
      transition: all 0.2s;
    }

    body.light-theme .lang-btn {
      background: var(--light-surface-hover);
      color: var(--light-text);
      border-color: var(--light-border);
    }

    .lang-btn.active {
      background: var(--accent-color);
      color: #000;
      border-color: var(--accent-color);
    }

    body.light-theme .lang-btn.active {
      background: var(--accent-color);
      color: #000;
      border-color: var(--accent-color);
    }

    .lang-btn:hover:not(.active) {
      color: var(--accent-color);
      border-color: var(--accent-color);
    }

    /* Help Button - PIXELiate style */
    .help-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--accent-color);
      color: #000;
      border: none;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.2s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
    }

    .help-btn:hover {
      background: var(--accent-hover);
    }

    /* Ko-fi Support Button */
    .kofi-btn {
      display: inline-flex;
      align-items: center;
      text-decoration: none;
      transition: all 0.2s;
      border: none;
      background: transparent;
      padding: 0;
    }

    .kofi-btn:hover {
      transform: translateY(-1px);
      opacity: 0.9;
    }

    .kofi-btn img {
      border-radius: 6px;
    }

    /* Help Modal - PIXELiate style */
    .help-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.7);
      z-index: 9999;
    }

    .help-overlay.active {
      display: block;
    }

    .help-modal {
      display: none;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--dark-surface);
      border: 1px solid var(--dark-border);
      border-radius: 12px;
      padding: 32px;
      box-shadow: 0 10px 50px rgba(0,0,0,0.5);
      z-index: 10000;
      width: 90%;
      max-width: 700px;
      max-height: 85vh;
      overflow-y: auto;
      animation: slideIn 0.3s;
    }

    .help-modal.active {
      display: block;
    }

    /* Toast Notification - positioned near cursor */
    .toast-notification {
      position: fixed;
      background: var(--dark-surface);
      border: 1px solid var(--accent-color);
      border-radius: 8px;
      padding: 12px 20px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.4);
      z-index: 10001;
      max-width: 320px;
      font-size: 14px;
      color: var(--dark-text);
      animation: toastSlideIn 0.3s ease-out;
      pointer-events: auto;
    }

    body.light-theme .toast-notification {
      background: var(--light-surface);
      color: var(--light-text);
      box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }

    .toast-notification.error {
      border-color: #ff6b6b;
    }

    .toast-notification.success {
      border-color: #51cf66;
    }

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

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

    .toast-notification.hiding {
      animation: toastSlideOut 0.2s ease-in forwards;
    }

    @keyframes slideIn {
      from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
      to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    }

    body.light-theme .help-modal {
      background: var(--light-surface);
      border-color: var(--light-border);
    }

    .help-modal h2 {
      margin: 0 0 16px 0;
      font-size: 24px;
      color: var(--accent-color);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .help-modal .close-btn {
      background: none;
      border: none;
      color: var(--dark-text);
      font-size: 32px;
      cursor: pointer;
      padding: 0;
      width: auto;
      line-height: 1;
    }

    body.light-theme .help-modal .close-btn {
      color: var(--light-text);
    }

    .help-modal .close-btn:hover {
      color: var(--accent-color);
    }

    .help-modal .help-section {
      margin-bottom: 24px;
    }

    .help-modal .help-section h3 {
      margin: 0 0 12px 0;
      font-size: 18px;
      color: var(--accent-color);
      font-weight: 600;
    }

    .help-modal p {
      margin: 0 0 16px 0;
      font-size: 14px;
      line-height: 1.6;
      color: var(--dark-text-secondary);
    }

    body.light-theme .help-modal p {
      color: var(--light-text-secondary);
    }

    .help-modal p strong {
      color: var(--accent-color);
      font-weight: 600;
    }

    .help-modal a {
      color: inherit;
      text-decoration: underline;
    }

    .help-modal a:hover {
      color: var(--accent-color);
    }

    /* Accent link - always accent color */
    .accent-link,
    .help-modal .accent-link {
      color: var(--accent-color) !important;
      text-decoration: underline;
    }

    .accent-link:hover,
    .help-modal .accent-link:hover {
      color: var(--accent-hover) !important;
    }

    /* Hide old buttons */
    .mobile-toggle-btn,
    .mobile-ui-toggle {
      display: none !important;
    }

    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
      display: none;
      position: fixed;
      top: 16px;
      left: 16px;
      z-index: 10001;
      width: 44px;
      height: 44px;
      background: var(--accent-color);
      border: none;
      border-radius: 8px;
      color: #FFFFFF;
      font-size: 20px;
      cursor: pointer;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      transition: all 0.3s;
    }

    .mobile-menu-toggle:hover {
      background: var(--accent-hover);
      transform: scale(1.05);
    }

    .mobile-menu-toggle.active {
      background: var(--accent-hover);
    }

    /* Sidebar Overlay for Mobile */
    .sidebar-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.6);
      z-index: 9998;
      transition: opacity 0.3s;
    }

    .sidebar-overlay.active {
      display: block;
    }

    /* Mobile Sidebar Close Button */
    .mobile-sidebar-close {
      display: none;
      background: var(--dark-surface-hover);
      border: none;
      color: var(--dark-text);
      font-size: 28px;
      line-height: 1;
      width: 32px;
      height: 32px;
      border-radius: 6px;
      cursor: pointer;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      padding: 0;
    }

    body.light-theme .mobile-sidebar-close {
      background: var(--light-surface-hover);
      color: var(--light-text);
    }

    .mobile-sidebar-close:hover {
      background: var(--accent-color);
      color: #FFFFFF;
    }

    /* Responsive Design - Tablet (768px - 1024px) */
    @media (min-width: 768px) and (max-width: 1024px) {
      .container {
        flex-direction: column;
        height: 100vh;
        position: relative;
      }

      .sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 50vh !important;
        z-index: 999;
        transform: none;
        transition: transform 0.3s ease;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
        border-top: 1px solid var(--dark-border);
        border-right: none !important;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 20px;
        padding-bottom: 20px !important;
      }
      
      .sidebar.hidden {
        transform: translateY(100%);
      }
      
      .drawer-handle {
        display: block !important;
      }

      body.light-theme .sidebar {
        border-top-color: var(--light-border);
      }

      .main-content {
        height: 50vh !important;
        padding-bottom: 0 !important;
        width: 100%;
        margin-top: 0;
      }
      
      .main-content.expanded {
        height: 100vh !important;
      }

      .canvas-wrapper {
        flex: none !important;
        height: 50vh !important;
        padding: 8px;
        overflow: visible !important;
        -webkit-overflow-scrolling: touch;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
      }
      
      .sidebar .bottom-drawer {
        display: none !important;
      }

      .color-square {
        width: 100%;
        max-width: 330px;
        height: 260px;
      }

      .help-modal {
        width: 85%;
        max-width: 450px;
        padding: 20px;
      }

      .mobile-menu-toggle {
        display: none !important;
      }

      .mobile-sidebar-close {
        display: none !important;
      }

      /* Ensure sidebar content is scrollable */
      .sidebar > .header {
        margin-top: 0;
      }

      .controls-bar {
        padding: 12px 16px;
        flex-wrap: wrap;
      }

      .controls-bar button {
        min-width: calc(50% - 6px);
      }

      .color-picker-modal {
        width: 340px;
        max-width: 90vw;
        padding: 20px;
      }
      
      .color-swatches-row {
        flex-wrap: nowrap !important;
        overflow-x: visible;
        gap: 6px;
        justify-content: flex-start;
      }
      
      .eyedropper-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        flex-shrink: 0;
      }
      
      .eyedropper-btn svg {
        width: 14px !important;
        height: 14px !important;
      }
      
      .recent-color-swatch {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        flex-shrink: 0;
      }
      
      .current-color-swatch {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        flex-shrink: 0;
      }
      
      .color-picker-confirm-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        flex: 0 0 32px !important;
        flex-shrink: 0;
        box-sizing: border-box;
        padding: 7px !important;
      }
      
      .color-picker-confirm-btn svg {
        width: 100% !important;
        height: 100% !important;
        display: block;
        flex-shrink: 0;
      }

      /* Number stepper adjustments for tablet */
      .dual-input {
        display: flex;
        gap: 8px;
        align-items: center;
      }

      .dual-input input[type="range"] {
        flex: 1.5;
        min-width: 0;
      }

      .dual-input .number-stepper {
        flex: 1;
        min-width: 0;
        max-width: 140px;
      }
    }

    /* Drawer Handle - Toggle button at bottom of sidebar */
    .drawer-handle {
      display: none; /* Hidden on desktop */
      width: 100px;
      height: 10px;
      background: var(--dark-border);
      border-radius: 4px;
      margin: 0 auto;
      cursor: pointer;
      transition: all 0.2s;
      position: fixed;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 10001;
      flex-shrink: 0;
    }

    .drawer-handle:hover {
      background: var(--accent-color);
      transform: translateX(-50%) scale(1.1);
    }

    .drawer-handle:active {
      background: var(--accent-color);
      transform: translateX(-50%) scale(0.95);
    }

    body.light-theme .drawer-handle {
      background: var(--light-border);
    }
    
    body.light-theme .drawer-handle:hover {
      background: var(--accent-color);
    }

    /* Responsive Design - Mobile (< 768px) - Matching PIXEL style */
    @media (max-width: 767px) {
      .container {
        flex-direction: column;
        height: 100vh;
        position: relative;
      }

      .mobile-menu-toggle {
        display: none;
      }

      .sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 50vh !important;
        z-index: 999;
        transform: none;
        transition: transform 0.3s ease;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
        border-top: 1px solid var(--dark-border);
        border-right: none !important;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 16px;
        padding-bottom: 16px !important;
      }
      
      .sidebar.hidden {
        transform: translateY(100%);
      }
      
      .drawer-handle {
        display: block !important;
      }

      body.light-theme .sidebar {
        border-top-color: var(--light-border);
      }

      .main-content {
        height: 50vh !important;
        padding-bottom: 0 !important;
        width: 100%;
        margin-top: 0;
      }
      
      .main-content.expanded {
        height: 100vh !important;
      }

      .canvas-wrapper {
        flex: none !important;
        height: 50vh !important;
        padding: 8px;
        overflow: visible !important;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
      }
      
      .sidebar .bottom-drawer {
        display: none !important;
      }

      .controls-bar {
        padding: 10px 12px;
        flex-direction: column;
        gap: 8px;
      }

      .controls-bar button {
        width: 100%;
        min-width: 100%;
        padding: 14px;
        font-size: 15px;
      }

      .section {
        margin-bottom: 16px;
        padding-bottom: 16px;
      }

      .number-stepper {
        gap: 4px;
      }

      .number-stepper button {
        min-width: 32px;
      }

      .color-picker-modal {
        width: 90%;
        max-width: 320px;
        padding: 16px;
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
      }

      .color-square {
        width: 100%;
        max-width: 300px;
        height: 260px;
      }

      .color-value-row {
        flex-wrap: wrap;
      }

      .color-value-item {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
      }

      .color-swatches-row {
        flex-wrap: nowrap !important;
        overflow-x: visible;
        gap: 6px;
        justify-content: flex-start;
      }

      .recent-color-swatch {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
      }

      .current-color-swatch {
        width: 40px;
        height: 40px;
      }

      .eyedropper-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
      }
      
      .eyedropper-btn svg {
        width: 16px !important;
        height: 16px !important;
      }

      .help-modal {
        width: 95%;
        max-width: none;
        padding: 16px;
        max-height: 90vh;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
      }

      .help-modal h2 {
        font-size: 18px;
      }

      .help-modal p {
        font-size: 13px;
      }

      .help-modal .help-section h3 {
        font-size: 15px;
      }

      /* Mobile dual-input - PIXELiate style */
      .dual-input {
        display: flex;
        gap: 8px;
        align-items: center;
      }

      .dual-input input[type="range"] {
        flex: 1.5;
        min-width: 0;
      }

      .dual-input .number-stepper {
        flex: 1;
        min-width: 0;
        max-width: 140px;
      }

      .number-stepper {
        gap: 4px;
      }

      .number-stepper button {
        min-width: 32px;
      }

      .color-opacity-group {
        grid-template-columns: 1fr;
        gap: 12px;
      }

      .mode-toggle {
        flex-direction: row; /* Keep buttons in one row on mobile */
      }

      .mode-toggle button {
        flex: 1; /* Equal width buttons */
      }

      .theme-toggle-wrapper {
        flex-wrap: wrap;
      }

      #ascii-art {
        font-size: 8px;
        max-width: 100%;
        overflow-x: auto;
      }

      .empty-state {
        padding: 32px 16px;
        font-size: 13px;
      }
    }

    /* Small Mobile (< 480px) */
    @media (max-width: 480px) {
      .section {
        margin-bottom: 16px;
        padding-bottom: 16px;
      }

      .color-picker-modal {
        width: 95%;
        padding: 12px;
      }

      .color-square {
        height: 240px;
      }

      .help-modal {
        padding: 12px;
      }

      #ascii-art {
        font-size: 6px;
      }
    }

    /* Reset Icons */
    .section-title-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
    }

    .section-title-row .section-title {
      margin-bottom: 0;
    }

    .reset-section-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 21px;
      height: 21px;
      padding: 0;
      margin: 0;
      background: rgba(212, 156, 107, 0.2);
      border: 1px solid var(--accent-color);
      border-radius: 3px;
      cursor: pointer;
      color: var(--accent-color);
      font-size: 13px;
      line-height: 21px;
      vertical-align: middle;
      transition: background 0.2s, transform 0.2s;
    }

    .reset-section-btn:hover {
      background: rgba(212, 156, 107, 0.4);
      transform: scale(1.1);
    }

    .control-label-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .reset-slider-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 19px;
      min-width: 19px;
      height: 19px;
      padding: 0;
      margin: 0;
      margin-top: -2px;
      flex-shrink: 0;
      background: transparent;
      border: 1px solid var(--dark-text-secondary);
      border-radius: 2px;
      cursor: pointer;
      color: var(--dark-text-secondary);
      font-size: 11px;
      line-height: 19px;
      opacity: 0.6;
      transition: opacity 0.2s, border-color 0.2s, color 0.2s, background 0.2s;
    }

    .reset-slider-btn:hover {
      opacity: 1;
      border-color: var(--accent-color);
      color: var(--accent-color);
      background: rgba(212, 156, 107, 0.15);
    }

    body.light-theme .reset-slider-btn {
      border-color: var(--light-text-secondary);
      color: var(--light-text-secondary);
    }

    body.light-theme .reset-slider-btn:hover {
      border-color: var(--accent-color);
      color: var(--accent-color);
    }

    /* Drag & Drop Highlight */
    .canvas-wrapper.drag-highlight {
      background: rgba(212, 156, 107, 0.1);
      border: 2px dashed var(--accent-color);
      border-radius: 8px;
    }

    .canvas-wrapper.drag-highlight::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(212, 156, 107, 0.05);
      pointer-events: none;
    }

    /* Transparent Checkers Background */
    .checkers-bg {
      background-image: 
        linear-gradient(45deg, #808080 25%, transparent 25%),
        linear-gradient(-45deg, #808080 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #808080 75%),
        linear-gradient(-45deg, transparent 75%, #808080 75%);
      background-size: 8px 8px;
      background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
      background-color: #c0c0c0;
    }

    /* Palette Swatches */
    .palette-swatches {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
      gap: 6px;
      margin-top: 8px;
      padding: 8px;
      background: rgba(0, 0, 0, 0.2);
      border-radius: 8px;
    }

    .palette-swatch {
      width: 100%;
      aspect-ratio: 1;
      border-radius: 6px;
      border: 2px solid rgba(255, 255, 255, 0.15);
      cursor: pointer;
      transition: transform 0.2s, border-color 0.2s;
      position: relative;
      overflow: hidden;
    }

    /* Checkers background shown only when swatch has transparency */
    .palette-swatch.has-transparency {
      background-image: 
        linear-gradient(45deg, #a0a0a0 25%, transparent 25%),
        linear-gradient(-45deg, #a0a0a0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #a0a0a0 75%),
        linear-gradient(-45deg, transparent 75%, #a0a0a0 75%);
      background-size: 8px 8px;
      background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
      background-color: #e0e0e0;
      background-clip: padding-box;
    }

    /* Color overlay on top of checkers */
    .palette-swatch .swatch-color {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      pointer-events: none;
    }

    .palette-swatch:hover {
      transform: scale(1.1);
      border-color: var(--accent-color);
      z-index: 10;
    }

    .palette-swatch:active {
      transform: scale(0.95);
    }

    .palette-swatch.delete-mode {
      cursor: pointer;
    }

    .palette-swatch.delete-mode:hover {
      border-color: #ff6b6b;
      box-shadow: 0 0 12px rgba(255, 107, 107, 0.6);
    }

    .palette-swatch.delete-mode::after {
      content: '×';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 20px;
      font-weight: bold;
      color: white;
      text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
      opacity: 0;
      transition: opacity 0.2s;
    }

    .palette-swatch.delete-mode:hover::after {
      opacity: 1;
    }

    /* Palette Navigation Buttons */
    .palette-nav-buttons {
      display: flex;
      gap: 6px;
      margin-top: 10px;
    }

    .palette-nav-btn {
      flex: 1;
      background: var(--dark-surface-hover);
      border: 1px solid var(--dark-border);
      border-radius: 6px;
      color: var(--dark-text);
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 8px 12px;
      height: 34px;
      font-size: 12px;
      font-weight: 500;
    }

    .palette-nav-btn:hover {
      background: var(--accent-color);
      border-color: var(--accent-color);
      color: #fff;
    }

    .palette-nav-btn:active {
      transform: scale(0.95);
    }

    body.light-theme .palette-nav-btn {
      background: var(--light-surface);
      border-color: var(--light-border);
      color: var(--light-text);
    }

    body.light-theme .palette-nav-btn:hover {
      background: var(--accent-color);
      border-color: var(--accent-color);
      color: #fff;
    }

    /* Color Picker Wrapper */
    .color-picker-wrapper {
      position: relative;
      width: 36px;
      height: 36px;
      border-radius: 6px;
      overflow: hidden;
      border: 2px solid rgba(255, 255, 255, 0.15);
      cursor: pointer;
      transition: border-color 0.3s;
      flex-shrink: 0;
    }

    /* Checkers background shown only when wrapper has transparency */
    .color-picker-wrapper.has-transparency::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-image: 
        linear-gradient(45deg, #a0a0a0 25%, transparent 25%),
        linear-gradient(-45deg, #a0a0a0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #a0a0a0 75%),
        linear-gradient(-45deg, transparent 75%, #a0a0a0 75%);
      background-size: 8px 8px;
      background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
      background-color: #e0e0e0;
      z-index: 0;
      pointer-events: none;
    }

    .color-picker-wrapper:hover {
      border-color: var(--accent-color);
    }

    .color-preview {
      width: 100%;
      height: 100%;
      background: #ffffff;
      pointer-events: none;
      position: relative;
      z-index: 1;
    }

    .icon-btn {
      background: var(--dark-surface);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.3s;
      color: var(--dark-text);
    }

    .icon-btn:hover {
      background: var(--accent-color);
      border-color: var(--accent-color);
      transform: scale(1.05);
    }

    .icon-btn.active {
      background: #ff6b6b;
      border-color: #ff6b6b;
    }

    body.light-theme .palette-swatches {
      background: rgba(0, 0, 0, 0.05);
    }

    body.light-theme .palette-swatch {
      border-color: rgba(0, 0, 0, 0.15);
    }

    body.light-theme .color-picker-wrapper {
      background: var(--light-surface);
      border-color: rgba(0, 0, 0, 0.15);
    }

    body.light-theme .icon-btn {
      background: var(--light-surface);
      border-color: rgba(0, 0, 0, 0.1);
      color: var(--light-text);
    }

    /* Vertical Color Swatches (like palette swatches) */
    .color-swatches-vertical {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .color-swatch-row {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .color-swatch-small {
      width: 28px;
      height: 28px;
      min-width: 28px;
      border: 2px solid rgba(255, 255, 255, 0.25);
      border-radius: 6px;
      cursor: pointer;
      transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
      position: relative;
      overflow: hidden;
      background: transparent;
      padding: 0;
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
    }

    /* Checkers background shown only when swatch has transparency */
    .color-swatch-small.has-transparency {
      background-image: 
        linear-gradient(45deg, #a0a0a0 25%, transparent 25%),
        linear-gradient(-45deg, #a0a0a0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #a0a0a0 75%),
        linear-gradient(-45deg, transparent 75%, #a0a0a0 75%);
      background-size: 6px 6px;
      background-position: 0 0, 0 3px, 3px -3px, -3px 0px;
      background-color: #e0e0e0;
      background-clip: padding-box;
    }

    /* Color overlay on top of checkers */
    .color-swatch-small .swatch-color {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      pointer-events: none;
    }

    .color-swatch-small:hover {
      transform: scale(1.1);
      border-color: var(--accent-color);
      z-index: 10;
    }

    .color-swatch-small:active {
      transform: scale(0.95);
    }

    .swatch-label-text {
      font-size: 14px;
      font-weight: 500;
      color: var(--dark-text);
    }

    body.light-theme .color-swatch-small {
      border-color: var(--light-border);
    }

    body.light-theme .color-swatch-small:hover {
      border-color: var(--accent-color);
    }

    body.light-theme .swatch-label-text {
      color: var(--light-text);
    }

    /* Hide textColor row in Color mode */
    #textColorRow.hidden {
      display: none !important;
    }

    /* Settings Row (Dark Mode + Language) */
    .settings-row {
      display: flex;
      gap: 24px;
    }

    .settings-item {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .settings-label {
      font-size: 14px;
      font-weight: 600;
      color: var(--accent-color);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .lang-toggle-btn {
      padding: 6px 0;
      font-size: 13px;
      font-weight: 600;
      border: 1px solid var(--dark-border);
      border-radius: 6px;
      background: var(--dark-surface);
      color: var(--dark-text);
      cursor: pointer;
      transition: all 0.2s ease;
      width: 42px;
      min-width: 42px;
      text-align: center;
    }

    .lang-toggle-btn:hover {
      border-color: var(--accent-color);
      background: var(--dark-surface-hover);
    }

    body.light-theme .lang-toggle-btn {
      border-color: var(--light-border);
      background: var(--light-surface);
      color: var(--light-text);
    }

    body.light-theme .lang-toggle-btn:hover {
      border-color: var(--accent-color);
      background: var(--light-surface-hover);
    }
