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

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 0;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    margin-top: 20px;
    max-width: 1200px;
    min-height: calc(100vh - 40px);
    overflow: hidden;
    padding: 20px;
    position: relative;
    width: 100%;
}

.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-bottom: 3px solid #00d4ff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    overflow: hidden;
    position: relative;
}

    .header::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
        animation: shimmer 3s infinite;
        pointer-events: none;
    }

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.logo-container {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    justify-content: center;
}

.logo {
    height: 80px;
    width: auto;
    margin-right: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    transition: filter 0.3s ease;
}

    .logo:hover {
        filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.8));
    }

.header-info {
    display: flex;
    flex-direction: column;
    color: white;
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    letter-spacing: -0.5px;
}

.header p,
.tagline {
    font-size: 1.1rem;
    color: #b0c4de;
    margin: 0.25rem 0 0.5rem 0;
    font-weight: 300;
    letter-spacing: 0.5px;
    opacity: 1;
}

.version-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.4);
    animation: pulse-badge 2s infinite;
    align-self: flex-start;
}

.main-content {
    padding: 40px;
}

.section-group {
    background: rgba(102, 126, 234, 0.03);
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

    .section-group:hover:not(.disabled) {
        border-color: rgba(102, 126, 234, 0.25);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }

    .section-group.disabled {
        cursor: not-allowed;
        user-select: none;
    }

.info-section {
    opacity: 1;
    transition: all 0.5s ease;
}

    .info-section.disabled {
        opacity: 0.5;
        filter: grayscale(50%);
        pointer-events: none;
    }

    .info-section.visible {
        opacity: 1;
        filter: none;
        pointer-events: auto;
    }

.upload-section {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(102, 126, 234, 0.05);
    position: relative;
    overflow: hidden;
}

    .upload-section::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
        animation: pulse 3s ease-in-out infinite;
        pointer-events: none;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }
}

.upload-section:hover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.upload-section.dragover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #764ba2;
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
    color: #667eea;
}

.upload-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #666;
    font-size: 0.9em;
}

#fileInput {
    display: none;
}

.song-title-section {
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    display: block;
    transition: all 0.5s ease;
}

    .song-title-section.disabled {
        opacity: 0.5;
        filter: grayscale(50%);
    }

    .song-title-section.visible {
        display: block;
        opacity: 1;
        filter: none;
    }

.song-title {
    font-size: 1.5em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
}

.song-author {
    font-size: 1.1em;
    color: #764ba2;
}

.info-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.disabled .panel {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.panel h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.panel.full-width {
    grid-column: 1 / -1;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

    .info-row:last-child {
        border-bottom: none;
    }

.info-label {
    font-weight: 600;
    color: #555;
}

.info-value {
    color: #333;
    font-family: 'Courier New', monospace;
}

    .info-value.editable {
        cursor: pointer;
        padding: 2px 6px;
        border-radius: 4px;
        transition: all 0.2s;
        border: 1px dashed transparent;
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

        .info-value.editable:hover {
            background: rgba(102, 126, 234, 0.1);
            border: 1px dashed #667eea;
        }

        .info-value.editable .text {
            display: inline-block;
        }

        .info-value.editable .edit-icon {
            color: #667eea;
            font-size: 0.9em;
            opacity: 0.6;
            transition: opacity 0.2s;
        }

        .info-value.editable:hover .edit-icon {
            opacity: 1;
        }

    .info-value.editing {
        background: white;
        border: 2px solid #667eea;
        padding: 4px 8px;
        outline: none;
    }

        .info-value.editing .edit-icon {
            display: none;
        }

.export-modified-container {
    text-align: center;
    padding-top: 10px;
}

.export-hint {
    color: #888;
    font-size: 0.9em;
    margin-top: 10px;
    font-style: italic;
}

.export-section {
    display: block;
    opacity: 1;
    transition: all 0.5s ease;
}

    .export-section.disabled {
        opacity: 0.5;
        filter: grayscale(50%);
        pointer-events: none;
    }

    .export-section.visible {
        display: block;
        opacity: 1;
        filter: none;
        pointer-events: auto;
    }

    .export-section h2 {
        color: #667eea;
        margin-bottom: 20px;
        font-size: 1.3em;
        border-bottom: 2px solid rgba(102, 126, 234, 0.2);
        padding-bottom: 10px;
    }

    .export-section.disabled h2::after {
        content: ' (Load a SID file to enable)';
        font-size: 0.8em;
        color: #999;
        font-weight: normal;
    }

.song-selector-container {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

    .song-selector-container label {
        margin-right: 10px;
        color: #667eea;
        font-weight: 600;
    }

    .song-selector-container select {
        padding: 8px 12px;
        background: white;
        border: 2px solid #dee2e6;
        border-radius: 6px;
        color: #333;
        min-width: 200px;
        cursor: pointer;
        transition: all 0.2s;
    }

        .song-selector-container select:hover {
            border-color: #667eea;
        }

        .song-selector-container select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

.visualizer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.visualizer-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

    .visualizer-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        border-color: #667eea;
    }

    .visualizer-card.selected {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    }

    .visualizer-card.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        filter: grayscale(70%);
    }

        .visualizer-card.disabled:hover {
            transform: none;
            box-shadow: none;
            border-color: #e0e0e0;
        }

        .visualizer-card.disabled .visualizer-info::after {
            content: attr(data-reason);
            position: absolute;
            bottom: 5px;
            left: 15px;
            right: 15px;
            font-size: 0.8em;
            color: #ff6b6b;
            font-weight: 600;
        }

.disabled .visualizer-card {
    opacity: 0.6;
    filter: grayscale(30%);
}

    .disabled .visualizer-card:hover {
        transform: none;
        cursor: default;
    }

.visualizer-preview {
    width: 100%;
    height: 150px;
    background: #f0f0f0;
    overflow: hidden;
}

    .visualizer-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.visualizer-info {
    padding: 15px;
    position: relative;
}

    .visualizer-info h3 {
        margin: 0 0 8px 0;
        color: #333;
        font-size: 1.1em;
    }

    .visualizer-info p {
        margin: 0;
        color: #666;
        font-size: 0.9em;
        line-height: 1.4;
    }

.visualizer-selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    display: none;
}

.visualizer-card.selected .visualizer-selected-badge {
    display: block;
}

.visualizer-separator {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    border-top: 1px dashed #333;
    margin: 10px 0;
}

.visualizer-options-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    margin: 30px auto;
    max-width: 700px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.options-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 18px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

    .options-header h3 {
        margin: 0;
        color: white;
        font-size: 1.2em;
        font-weight: 600;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

.options-content {
    padding: 25px;
}

.option-group {
    margin-bottom: 25px;
}

    .option-group:last-child {
        margin-bottom: 0;
    }

.option-group-title {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
    letter-spacing: 0.5px;
}

.option-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    min-height: 40px;
}

    .option-row:last-child {
        margin-bottom: 0;
    }

.option-row-full {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
}

    .option-row-full .option-label {
        flex: none;
        margin-bottom: 10px;
        text-align: center;
    }

    .option-row-full .option-control {
        width: 100%;
        justify-content: center;
    }

.option-label {
    flex: 0 0 140px;
    font-weight: 600;
    color: #495057;
    font-size: 0.95em;
}

.option-control {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.image-input-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.layout-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.layout-radio-option {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

    .layout-radio-option:hover:not(.disabled) {
        border-color: #667eea;
        background: rgba(102, 126, 234, 0.05);
        transform: translateX(4px);
    }

    .layout-radio-option input[type="radio"] {
        margin-right: 12px;
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    .layout-radio-option:has(input:checked) {
        border-color: #667eea;
        background: rgba(102, 126, 234, 0.08);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    }

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

.layout-name {
    font-weight: 600;
    color: #333;
}

.layout-range {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-size: 0.9em;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
}

.layout-radio-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.layout-divider {
    margin: 15px 0 10px;
    color: #adb5bd;
    font-size: 0.85em;
    font-style: italic;
}

.file-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s;
}

    .file-button:hover {
        background: #764ba2;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

.file-status {
    color: #6c757d;
    font-size: 0.9em;
    font-style: italic;
}

    .file-status.has-file {
        color: #28a745;
        font-style: normal;
        font-weight: 500;
    }

.number-input, .select-input, .date-input {
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.2s;
    background: white;
}

.number-input {
    width: 80px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.select-input {
    min-width: 150px;
    cursor: pointer;
}

    .number-input:focus, .select-input:focus, .date-input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

.option-hint {
    color: #6c757d;
    font-size: 0.85em;
    font-style: italic;
}

.date-preview {
    color: #495057;
    font-size: 0.9em;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.option-warning {
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    text-align: center;
}

.image-preview-container {
    width: 100%;
    max-width: 400px;
}

.image-preview-wrapper {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

    .image-preview-wrapper:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.image-preview-frame {
    position: relative;
    width: 320px;
    height: 200px;
    margin: 0 auto;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}

.image-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.image-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-preview-wrapper:hover .image-preview-overlay {
    opacity: 1;
}

.preview-click-hint {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 4px;
}

.image-preview-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.preview-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #dee2e6;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: preview-spin 1s linear infinite;
}

@keyframes preview-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.image-preview-info {
    padding: 8px 12px;
    background: white;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
}

.preview-filename {
    font-weight: 600;
    color: #495057;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-size {
    color: #6c757d;
    font-family: monospace;
}

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.export-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .export-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    }

    .export-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        background: linear-gradient(135deg, #999 0%, #777 100%);
    }

.disabled .export-button:not(:disabled) {
    opacity: 0.7;
    background: linear-gradient(135deg, #999 0%, #777 100%);
}

.export-button:active:not(:disabled) {
    transform: translateY(0);
}

#exportModifiedSIDButton {
    width: auto;
    margin: 0 auto;
}

.export-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    display: none;
}

    .export-status.visible {
        display: block;
    }

    .export-status.success {
        background: #d4f4dd;
        color: #1e7e34;
        border: 1px solid #28a745;
    }

    .export-status.error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

    .export-status.info {
        background: #d1ecf1;
        color: #0c5460;
        border: 1px solid #bee5eb;
    }

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

    .loading.active {
        display: block;
    }

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
    display: none;
}

    .progress-bar.active {
        display: block;
    }

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

.error-message {
    background: #ff6b6b20;
    border: 1px solid #ff6b6b;
    color: #c92a2a;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}

    .error-message.visible {
        display: block;
    }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .modal-overlay.visible {
        display: flex;
        opacity: 1;
    }

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

    .modal-icon.success {
        color: #51cf66;
    }

    .modal-icon.error {
        color: #ff6b6b;
    }

.modal-message {
    font-size: 1.2em;
    color: #333;
}

.compression-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compression-radio-option {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

    .compression-radio-option:hover {
        border-color: #667eea;
        background: rgba(102, 126, 234, 0.05);
        transform: translateX(4px);
    }

    .compression-radio-option input[type="radio"] {
        margin-right: 12px;
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    .compression-radio-option:has(input:checked) {
        border-color: #667eea;
        background: rgba(102, 126, 234, 0.08);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    }

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

.compression-name {
    font-weight: 600;
    color: #333;
}

.compression-desc {
    color: #6c757d;
    font-size: 0.9em;
}

.color-slider-control {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-wrapper {
    flex: 1;
    position: relative;
    height: 30px;
}

.color-slider {
    width: 100%;
    height: 30px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    cursor: pointer;
    pointer-events: none;
}

.color-slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    height: 24px;
    display: flex;
    border-radius: 12px;
    border: 2px solid #dee2e6;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-segment {
    flex: 1;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
}

    .color-segment:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 1px;
        background: rgba(0, 0, 0, 0.2);
    }

    .color-segment:hover {
        opacity: 0.8;
        transform: scaleY(1.1);
    }

.color-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    opacity: 0;
    cursor: pointer;
}

.color-slider::-moz-range-thumb {
    width: 0;
    height: 0;
    opacity: 0;
    cursor: pointer;
    border: none;
}

.color-slider::-webkit-slider-runnable-track {
    height: 30px;
    background: transparent;
    cursor: pointer;
}

.color-slider::-moz-range-track {
    height: 30px;
    background: transparent;
    cursor: pointer;
}

.color-value {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 180px;
    padding: 4px 8px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
}

.color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1px solid #333;
    flex-shrink: 0;
}

.color-text {
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.color-number {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #667eea;
}

.color-name {
    color: #495057;
}

.textarea-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

    .textarea-container textarea {
        width: 100%;
        min-height: 60px;
        padding: 8px 12px;
        border: 2px solid #dee2e6;
        border-radius: 6px;
        background: white;
        color: #333;
        font-family: 'Courier New', monospace;
        font-size: 0.9em;
        resize: vertical;
        transition: all 0.2s;
    }

        .textarea-container textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

.textarea-controls {
    display: flex;
    gap: 8px;
}

.load-text-btn, .save-text-btn {
    padding: 6px 12px;
    font-size: 0.85em;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

    .load-text-btn:hover, .save-text-btn:hover {
        background: #764ba2;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }

@media (max-width: 768px) {
    .info-panels {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2em;
    }

    .main-content {
        padding: 20px;
    }

    .section-group {
        padding: 15px;
    }

    .export-buttons {
        flex-direction: column;
    }

    .export-button {
        width: 100%;
        justify-content: center;
    }

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

    .visualizer-preview {
        height: 120px;
    }

    .visualizer-options-panel {
        margin: 20px 10px;
    }

    .option-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .option-label {
        flex: none;
    }

    .option-control {
        width: 100%;
    }

    .color-slider-control {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .slider-wrapper {
        width: 100%;
    }

    .color-value {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
        border: 2px solid #667eea;
    }

    .color-swatch {
        width: 24px;
        height: 24px;
    }

    .color-text {
        font-size: 1em;
        font-weight: 500;
    }

    .layout-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .image-preview-frame {
        width: 280px;
        height: 175px;
    }

    .preview-click-hint {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 50px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p,
    .tagline {
        font-size: 0.9rem;
    }

    .version-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

.floating-notes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-note {
    position: absolute;
    pointer-events: none;
    font-size: 8rem;
    opacity: 0;
    color: rgba(0, 212, 255, 0.2);
}

@keyframes float-up {
    0% {
        opacity: 0;
        transform: translateY(0px) scale(0.5);
    }

    20% {
        opacity: 1;
        transform: translateY(-50px) scale(1);
    }

    80% {
        opacity: 1;
        transform: translateY(-200px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(-300px) scale(0.8);
    }
}

@keyframes float-down {
    0% {
        opacity: 0;
        transform: translateY(0px) scale(0.5);
    }

    20% {
        opacity: 1;
        transform: translateY(50px) scale(1);
    }

    80% {
        opacity: 1;
        transform: translateY(200px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(300px) scale(0.8);
    }
}

@keyframes diagonal-up-right {
    0% {
        opacity: 0;
        transform: translate(0px, 0px) rotate(0deg);
    }

    25% {
        opacity: 1;
        transform: translate(100px, -100px) rotate(90deg);
    }

    75% {
        opacity: 1;
        transform: translate(200px, -200px) rotate(270deg);
    }

    100% {
        opacity: 0;
        transform: translate(300px, -300px) rotate(360deg);
    }
}

@keyframes diagonal-down-left {
    0% {
        opacity: 0;
        transform: translate(0px, 0px) rotate(0deg);
    }

    25% {
        opacity: 1;
        transform: translate(-100px, 100px) rotate(90deg);
    }

    75% {
        opacity: 1;
        transform: translate(-200px, 200px) rotate(270deg);
    }

    100% {
        opacity: 0;
        transform: translate(-300px, 300px) rotate(360deg);
    }
}

@keyframes diagonal-up-left {
    0% {
        opacity: 0;
        transform: translate(0px, 0px) rotate(0deg);
    }

    25% {
        opacity: 1;
        transform: translate(-100px, -100px) rotate(90deg);
    }

    75% {
        opacity: 1;
        transform: translate(-200px, -200px) rotate(270deg);
    }

    100% {
        opacity: 0;
        transform: translate(-300px, -300px) rotate(360deg);
    }
}

@keyframes diagonal-down-right {
    0% {
        opacity: 0;
        transform: translate(0px, 0px) rotate(0deg);
    }

    25% {
        opacity: 1;
        transform: translate(100px, 100px) rotate(90deg);
    }

    75% {
        opacity: 1;
        transform: translate(200px, 200px) rotate(270deg);
    }

    100% {
        opacity: 0;
        transform: translate(300px, 300px) rotate(360deg);
    }
}

@keyframes float-left {
    0% {
        opacity: 0;
        transform: translateX(0px) rotate(0deg);
    }

    20% {
        opacity: 1;
        transform: translateX(-80px) rotate(60deg);
    }

    80% {
        opacity: 1;
        transform: translateX(-200px) rotate(300deg);
    }

    100% {
        opacity: 0;
        transform: translateX(-320px) rotate(360deg);
    }
}

@keyframes float-right {
    0% {
        opacity: 0;
        transform: translateX(0px) rotate(0deg);
    }

    20% {
        opacity: 1;
        transform: translateX(80px) rotate(60deg);
    }

    80% {
        opacity: 1;
        transform: translateX(200px) rotate(300deg);
    }

    100% {
        opacity: 0;
        transform: translateX(320px) rotate(360deg);
    }
}
