    body {
        font-family: 'Silkscreen', cursive;
        font-weight: 700;
        background-color: #111111;
        color: #EAEAEA;
        margin: 0;
        height: 100vh;
        overflow: hidden;
        user-select: none;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    
    body::before {
        content: "";
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 0;
        pointer-events: none;
        background-image:
            linear-gradient(#202020 5px, transparent 5px),
            linear-gradient(90deg, #202020 5px, transparent 5px);
        background-size: 100px 100px;
        background-position: center center;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
    }

    body::after {
        content: "";
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 1;
        pointer-events: none;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
        background-size: 200px 200px;
    }
    
    .header {
        font-size: 24px;
        padding: 20px 30px;
        letter-spacing: 2px;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 10;
    }
    
    .social-links {
        position: absolute;
        top: 25px;
        right: 30px;
        display: flex;
        gap: 15px;
        z-index: 40;
    }
    
    .social-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s, opacity 0.2s;
        opacity: 0.6;
    }
    
    .social-links a:hover {
        opacity: 1;
        transform: scale(1.1);
    }
    
    .workspace {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        z-index: 10;
    }
    
    .dropzone {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        transition: opacity 0.3s;
        min-width: 400px;
    }
    
    .drop-title {
        font-size: 20px;
        letter-spacing: 2px;
        margin-bottom: 10px;
    }
    
    .drop-subtitle {
        font-size: 16px;
        color: #888;
    }
    
    .upload-link {
        color: #555;
        cursor: pointer;
        transition: color 0.2s;
    }
    
    .upload-link:hover {
        color: #aaa;
    }

    .toolbar-container {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 20;
        gap: 10px;
    }

    .floating-bar {
        background: #151515;
        border: 1px solid #333;
        border-radius: 12px;
        display: flex;
        align-items: stretch;
        padding: 8px 16px;
    }

    .bar-item {
        display: flex;
        align-items: center;
        padding: 0 15px;
        border-right: 1px solid #333;
        gap: 10px;
    }
    
    .bar-item:last-child {
        border-right: none;
    }
    
    .item-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .item-label {
        font-size: 12px;
        letter-spacing: 1px;
        color: #ddd;
    }
    
    .item-control {
        display: flex;
        align-items: center;
        background: #222;
        border-radius: 6px;
        padding: 2px 6px;
        position: relative;
        height: 28px;
    }
    
    .item-control input[type="number"] {
        background: transparent;
        border: none;
        color: #EAEAEA;
        font-family: 'Silkscreen', cursive;
        width: 30px;
        font-size: 12px;
        text-align: center;
        outline: none;
        -moz-appearance: textfield;
    }
    
    .item-control input[type="number"]::-webkit-outer-spin-button,
    .item-control input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    
    .spin-buttons {
        display: flex;
        flex-direction: column;
        margin-left: 4px;
    }
    
    .spin-up, .spin-down {
        font-size: 8px;
        cursor: pointer;
        line-height: 1;
        color: #888;
        padding: 1px;
        user-select: none;
    }
    
    .spin-up:hover, .spin-down:hover {
        color: #EAEAEA;
    }
    
    .dropdown-style select {
        background: transparent;
        border: none;
        color: #EAEAEA;
        font-family: 'Silkscreen', cursive;
        font-size: 12px;
        outline: none;
        cursor: pointer;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        padding-right: 5px;
    }
    
    .gradient-preview {
        width: 40px;
        border-radius: 4px;
        cursor: pointer;
        background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff);
        margin-left: 5px;
        border: 1px solid #333;
    }

    .expand-toggle {
        cursor: pointer;
        padding: 0 10px;
        transition: background 0.3s;
        border-radius: 6px;
        margin-left: 10px;
    }
    
    .expand-toggle:hover {
        background: #333;
    }
    
    .expand-icon {
        transition: transform 0.3s;
    }
    
    .rotate-arrow {
        transform: rotate(180deg);
    }

    .expanded-toolbar {
        background: #151515;
        border: 1px solid #333;
        border-radius: 12px;
        padding: 25px;
        display: none;
        width: 90vw;
        max-width: 800px;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .expanded-toolbar.show {
        display: block;
        opacity: 1;
        animation: fadeIn 0.3s;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .toolbar-sections {
        display: flex;
        gap: 25px;
        justify-content: space-between;
    }
    
    .section {
        flex: 1;
    }
    
    .section h3 {
        margin: 0 0 15px 0;
        font-size: 14px;
        color: #888;
        border-bottom: 2px dashed #333;
        padding-bottom: 8px;
    }
    
    .control-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .control-group label {
        font-size: 11px;
        color: #bbb;
        font-family: 'Silkscreen', cursive;
        letter-spacing: 1px;
    }
    
    .control-group input[type="number"], .control-group select {
        background: #222;
        border: 1px solid #444;
        color: #EAEAEA;
        padding: 10px;
        font-family: 'Silkscreen', cursive;
        font-size: 12px;
        border-radius: 4px;
        outline: none;
    }
    
    .row-group {
        flex-direction: row;
        gap: 10px;
    }
    
    .row-group input[type="color"] {
        flex: 1;
        height: 38px;
        padding: 0;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        background: transparent;
    }
    
    #outputCanvas {
        max-width: 90vw;
        max-height: 80vh;
        image-rendering: pixelated;
    }

    #originalImagePreview {
        max-width: 90vw;
        max-height: 80vh;
        object-fit: contain;
    }

    .compare-btn {
        position: absolute;
        top: 70px;
        right: 30px;
        background: #111;
        border: 1px solid #333;
        border-radius: 8px;
        padding: 8px 12px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        cursor: pointer;
        z-index: 30;
        user-select: none;
        transition: background 0.2s, transform 0.1s;
    }
    
    .compare-btn:hover {
        background: #222;
    }
    
    .compare-btn:active {
        transform: scale(0.95);
        background: #333;
    }
    
    /* Loading Overlay Styles */
    .loading-overlay {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(17, 17, 17, 0.85);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 50;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .loading-overlay.show {
        opacity: 1;
    }

    .loading-text {
        font-family: 'Silkscreen', cursive;
        color: #EAEAEA;
        font-size: 14px;
        letter-spacing: 3px;
        margin-bottom: 20px;
        animation: pulseText 1s infinite alternate;
    }
    
    @keyframes pulseText {
        from { opacity: 0.6; }
        to { opacity: 1; }
    }
    
    .progress-track {
        width: 300px;
        height: 4px;
        background: #222;
        border-radius: 2px;
        overflow: hidden;
        position: relative;
    }
    
    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #ff0055, #EAEAEA);
        width: 0%;
        transition: width 0.1s;
    }
    
    
    /* Export Modal Styles */
    .export-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 100;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .modal-content {
        background: #151515;
        border: 1px solid #333;
        border-radius: 12px;
        width: 90vw;
        max-width: 600px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        animation: modalScaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    @keyframes modalScaleIn {
        from { transform: scale(0.9); opacity: 0; }
        to { transform: scale(1); opacity: 1; }
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 25px;
        border-bottom: 1px solid #222;
    }

    .modal-header h2 {
        margin: 0;
        font-size: 16px;
        letter-spacing: 2px;
        color: #fff;
    }

    .close-btn {
        cursor: pointer;
        opacity: 0.7;
        transition: opacity 0.2s, transform 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .close-btn:hover {
        opacity: 1;
        transform: rotate(90deg);
    }

    .modal-tabs {
        display: flex;
        background: #111;
        border-bottom: 1px solid #333;
    }

    .tab {
        flex: 1;
        text-align: center;
        padding: 15px 0;
        font-size: 12px;
        color: #888;
        cursor: pointer;
        transition: background 0.2s, color 0.2s;
        border-bottom: 2px solid transparent;
        letter-spacing: 1px;
    }

    .tab:hover {
        background: #181818;
        color: #ccc;
    }

    .tab.active {
        color: #fff;
        border-bottom: 2px solid #EAEAEA;
        background: #151515;
    }

    .tab-content {
        display: none;
        padding: 25px;
        flex-direction: column;
        gap: 20px;
    }

    .tab-content.active {
        display: flex;
        animation: fadeIn 0.3s;
    }

    .export-options {
        display: flex;
        align-items: center;
        padding: 15px;
        background: #1a1a1a;
        border-radius: 8px;
        border: 1px solid #2a2a2a;
    }

    .option-label {
        font-size: 11px;
        letter-spacing: 1px;
        color: #bbb;
        margin-left: 10px;
    }

    .export-options select {
        background: #111;
        border: 1px solid #333;
        color: #fff;
        font-family: 'Silkscreen', cursive;
        font-size: 11px;
        padding: 6px 10px;
        border-radius: 4px;
        outline: none;
        margin-left: 10px;
    }

    .export-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .action-btn-main {
        background: #EAEAEA;
        color: #111;
        border: none;
        padding: 15px;
        border-radius: 6px;
        font-family: 'Silkscreen', cursive;
        font-size: 14px;
        cursor: pointer;
        transition: transform 0.1s, opacity 0.2s;
    }

    .action-btn-main:hover {
        opacity: 0.9;
    }

    .action-btn-main:active {
        transform: scale(0.98);
    }
    
    .action-btn-secondary {
        background: #222;
        color: #EAEAEA;
        border: 1px solid #444;
        padding: 15px;
        border-radius: 6px;
        font-family: 'Silkscreen', cursive;
        font-size: 14px;
        cursor: pointer;
        transition: background 0.2s, transform 0.1s;
    }

    .action-btn-secondary:hover {
        background: #333;
    }

    .action-btn-secondary:active {
        transform: scale(0.98);
        background: #444;
    }

    .preview-area {
        background: #0a0a0a;
        border: 1px solid #333;
        border-radius: 6px;
        color: #aaa;
        font-family: monospace;
        padding: 15px;
        height: 150px;
        resize: none;
        overflow-y: auto;
        white-space: pre;
        font-size: 10px;
        line-height: 1.2;
    }

    .preview-area::-webkit-scrollbar {
        width: 8px;
    }
    .preview-area::-webkit-scrollbar-track {
        background: #111;
    }
    .preview-area::-webkit-scrollbar-thumb {
        background: #444;
        border-radius: 4px;
    }

    /* Toggle Switch */
    .toggle-switch {
        position: relative;
        display: inline-block;
        width: 40px;
        height: 20px;
    }
    .toggle-switch input { 
        opacity: 0;
        width: 0;
        height: 0;
    }
    .slider {
        position: absolute;
        cursor: pointer;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: #333;
        transition: .4s;
        border-radius: 20px;
    }
    .slider:before {
        position: absolute;
        content: "";
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }
    input:checked + .slider {
        background-color: #666;
    }
    input:checked + .slider:before {
        transform: translateX(20px);
    }

    /* --- MOBILE RESPONSIVENESS --- */
    @media (max-width: 768px) {
        .dropzone {
            min-width: 250px;
            width: 90vw;
        }

        .toolbar-container {
            bottom: 15px;
        }

        .floating-bar {
            padding: 8px 10px;
            width: 95vw;
            box-sizing: border-box;
            justify-content: center;
            flex-wrap: wrap;
            border-radius: 12px;
            gap: 5px;
        }
        
        .bar-item {
            padding: 5px 8px;
            gap: 5px;
            border-right: none;
            background: #1a1a1a;
            border-radius: 8px;
            border: 1px solid #2a2a2a;
        }

        /* Hide labels inside toolbar on mobile */
        .bar-item .item-label {
            display: none;
        }

        .dropdown-style select {
            font-size: 10px;
            padding-right: 0;
        }
        
        .item-control {
            padding: 2px 4px;
        }
        
        .item-control input[type="number"] {
            width: 25px;
        }
        
        .gradient-preview {
            width: 30px;
        }
        
        .expand-toggle {
            margin-left: 0;
            padding: 0 5px;
        }
        
        .expanded-toolbar {
            padding: 15px;
            max-height: 60vh;
            overflow-y: auto;
        }
        
        .toolbar-sections {
            flex-direction: column;
            gap: 20px;
        }

        .modal-content {
            max-height: 85vh;
            overflow-y: auto;
        }

        .export-options {
            flex-wrap: wrap;
            gap: 10px;
            align-items: flex-start;
        }
        
        .export-options select {
            margin-left: 0;
            width: 100%;
        }
        
        .export-options .option-label {
            margin-left: 0 !important;
            width: 100%;
        }
        
        .social-links {
             top: 15px;
             right: 15px;
             gap: 10px;
             opacity: 0.8;
        }
        
        .header {
             font-size: 18px;
             padding: 15px 15px;
        }
        
        .compare-btn {
             top: 60px;
             right: 15px;
        }
    }
    
    /* --- Expandable Component Styling --- */
    .color-picker-wrapper {
      width: 100%;
      height: 100%;
      position: relative; 
    }

    .custom-color-picker {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      background-color: #1e1e1e;
      border-radius: 4px; 
      box-sizing: border-box;
      overflow: hidden; 
      
      transition: 
        height 0.4s cubic-bezier(0.3, 1.3, 0.4, 1),
        width 0.4s cubic-bezier(0.3, 1.3, 0.4, 1),
        border-radius 0.4s cubic-bezier(0.3, 1.3, 0.4, 1);
    }

    .custom-color-picker.collapsed {
      width: 100%;
      height: 100%;
      cursor: pointer;
    }
    
    .custom-color-picker.collapsed:hover {
      filter: brightness(1.1); 
    }

    .collapsed-fill {
      position: absolute;
      inset: 0;
      background-color: #fff;
      background-image: 
        linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc),
        linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc);
      background-size: 10px 10px;
      background-position: 0 0, 5px 5px;
      border-radius: inherit;
      overflow: hidden;
      opacity: 1;
      transition: opacity 0.3s ease 0.8s;
      transform: translateZ(0);
    }

    .color-layer {
      position: absolute;
      inset: -1px; 
      border-radius: inherit;
    }

    .color-layer:nth-child(1) { z-index: 1; }
    .color-layer:nth-child(2) {
      z-index: 2;
      opacity: 0;
      transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .custom-color-picker.expanded {
      width: 250px;
      height: 298px; 
      border-radius: 16px;
      z-index: 999;
      cursor: default;
      border: 1px solid #333;
      
      transition: 
        width 0.4s cubic-bezier(0.3, 1.3, 0.4, 1),
        height 0.4s cubic-bezier(0.3, 1.3, 0.4, 1),
        border-radius 0.4s cubic-bezier(0.3, 1.3, 0.4, 1);
    }
    
    .custom-color-picker.upward {
      bottom: 0;
      top: auto;
      transform-origin: bottom center;
    }

    .custom-color-picker.downward {
      top: 0;
      bottom: auto;
      transform-origin: top center;
    }

    .custom-color-picker.expanded .collapsed-fill {
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.15s ease 0s; 
    }

    .picker-ui {
      position: absolute;
      bottom: 15px; left: 15px; right: 15px;
      height: 268px;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.2s ease 0s, visibility 0s 0.2s; 
    }

    .custom-color-picker.expanded .picker-ui {
      opacity: 1;
      visibility: visible;
      transition: opacity 0.3s ease 0.5s, visibility 0s 0s;
    }

    /* --- Inner UI --- */
    .saturation-map {
      width: 100%; height: 150px; position: relative; border-radius: 8px; cursor: crosshair;
      background-color: #ff0000; 
      background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent);
      margin-bottom: 15px; overflow: hidden;
    }
    .sat-thumb {
      width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%;
      position: absolute; top: 0; left: 100%; transform: translate(-50%, -50%);
      pointer-events: none; 
    }
    .slider-track {
      width: 100%; height: 16px; position: relative; border-radius: 8px; cursor: pointer; margin-bottom: 15px;
      border: 1px solid rgba(255,255,255,0.1);
      box-sizing: border-box;
    }
    .slider-thumb {
      width: 16px; height: 20px; background: #fff; border-radius: 4px;
      position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
      pointer-events: none;
    }
    .hue-slider { background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); }
    .alpha-slider {
      background-color: #fff;
      background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc), linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc);
      background-size: 10px 10px;
    }
    .alpha-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 8px; pointer-events: none; }
    
    .output-area { 
      display: flex; 
      align-items: center; 
      background-color: #2a2a2a; 
      padding: 8px 12px; 
      border-radius: 8px; 
    }
    .preview-bg {
      width: 28px; height: 28px; border-radius: 4px; margin-right: 10px; border: 1px solid #444; background-color: #fff;
      background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc), linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc);
      background-size: 8px 8px; position: relative; flex-shrink: 0;
    }
    .preview-swatch { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 3px; }
    
    .hex-input { 
      background: transparent;
      border: none;
      color: #fff;
      font-size: 14px;
      font-family: monospace;
      letter-spacing: 1px;
      width: 100%;
      outline: none;
      padding: 2px 0;
      text-transform: uppercase;
    }
