body {
    font-family: Arial, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #f0f0f0;
}

.container {
    color: grey;
    font-size: 12px;
    text-align: left;
}

.kopf {
    display: flex;
    justify-content: left;
    align-items: center;
    /*padding: 20px;*/
    margin-bottom: 20px;
    width: 100%;
    /*max-width: 1200px;*/
    margin: 0 auto;
}

.kopf img {
    width: 293px;
    height: 59px;
    object-fit: contain;
    display: block;
}

.app-container {
    background-color: white;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.image-container {
    width: 100%;
    height: auto;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    /*margin-top: 10px;*/
    overflow: hidden;
    border-radius: 5px;
    position: relative;
    min-height: 400px;
}

.image-container img, .image-container canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.small-text {
    font-size: 10px; /* Passen Sie die Schriftgröße nach Bedarf an */
    word-wrap: break-word; /* Lange Wörter umbrechen */
}

.button, .asebutton, .kickbutton, #showInstructions, #savePalette, #uploadButton, #pickColorButton {
    height: 40px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    line-height: 1;
    border: none;
    cursor: pointer;
    width: fit-content;
    justify-content: flex-start;
}

.asebutton {
    background-color: #1565C0;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.asebutton:hover {
    background-color: #0D47A1;
}

#savePalette {
    background-color: #2E7D32;
    color: white;
    width: fit-content;
}

#savePalette:hover {
    background-color: #1B5E20;
}

#showInstructions {
    background-color: #2E7D32;
    color: white;
    width: fit-content;
}

#showInstructions:hover {
    background-color: #1B5E20;
}

.kickbutton {
    background-color: white;
    color: #333;
    border: none;
    padding: 0 10px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin: 0; /* Entfernt individuelle Margins, gap von .color-actions übernimmt */
    cursor: pointer;
    border-radius: 5px;
    min-width: 60px;
    height: 40px;
}

.kickbutton.trash-icon {
    font-size: 18px;
    min-width: 40px;
    padding: 0 8px;
    margin: 0; /* Konsistente Margin-Entfernung für trash-icon Button */
}

.kickbutton:hover {
    background-color: #f5f5f5;
}

#colorComparisonContainer {
    display: flex;
    margin-top: 5px;
}

.comparison-header {
    width: 200px;  /* oder eine andere passende Breite */
    padding-right: 20px;
    padding-left: 20px;
}

#colorComparison {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.color-item {
    margin: 10px;
    text-align: center;
}

#colorInfo {
    text-align: left;
    /*margin-top: 20px;*/
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

#selectedImage {
    max-width: 90vw;
    max-height: 70vh;
    object-fit: contain;
}

#imageCanvas {
    display: block;
    max-width: 100%;
    height: auto;
}

#selectedColorsList {
    /*margin: 20px 0;*/
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

#colorList {
    list-style: none;
    padding: 0;
    margin: 0 0 3px 0;
    max-width: 600px; /* Begrenzt die maximale Breite */
}

#colorList li {
    display: flex;
    align-items: center;
    margin: 10px 0;
    padding: 8px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    gap: 8px;
}

.color-sample-small {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-right: 10px;
}

.color-info-small {
    flex-grow: 1;
}

/* Color palette action buttons container */
.color-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex-shrink: 0; /* Verhindert Schrumpfen der Button-Container */
}

/* Responsive color text display */
.color-text-mobile {
    display: none;
}

.color-text-desktop {
    display: inline;
}

.kickbutton {
    background-color: white;
    color: #333;
    border: none;
    padding: 0 10px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin: 0; /* Entfernt individuelle Margins, gap von .color-actions übernimmt */
    cursor: pointer;
    border-radius: 5px;
    min-width: 60px;
    height: 40px;
}

.kickbutton.trash-icon {
    font-size: 18px;
    min-width: 40px;
    padding: 0 8px;
    margin: 0; /* Konsistente Margin-Entfernung für trash-icon Button */
}

.kickbutton:hover {
    background-color: #f5f5f5;
}

#selectedColorSample {
    /*width: 90%;*/
    height: 80px;
    display: flex;
    flex-direction: column;
    /*justify-content: center;*/
    align-items: flex-start;
    border: 1px solid #000;
    margin: 3px;
    position: relative;
}

#selectedColorSample h3,
#selectedColorSample p {
    margin: 5px;
    padding: 2px;
    text-align: left;
    background-color: rgba(255, 255, 255, 0.2); /* Leichter Hintergrund für bessere Lesbarkeit */
    border-radius: 3px;
    /*text-shadow: 
        -1px -1px 0 rgba(0,0,0,0.3),
        1px -1px 0 rgba(0,0,0,0.3),
        -1px 1px 0 rgba(0,0,0,0.3),
        1px 1px 0 rgba(0,0,0,0.3); /* Textschatten für besseren Kontrast */
}

#selectedColorRGB {
    display: inline-block;
    vertical-align: middle;
}

#colorList .color-sample {
    width: 20px;
    height: 20px;
    align-items: left;
    display: inline-block;
    margin-right: 15px;
    border: 1px solid #000;
}

#shareColors {
    margin-top: 10px;
    display: block;
    background-color: #3498db; /* Blau, um es vom "Löschen"-Button zu unterscheiden */
}

#aseColors {
    margin-top: 10px;
    display: block;
    background-color: #ff52b1; /* Pink, um es vom "Löschen"-Button zu unterscheiden */
}

.delete-btn {
    margin-left: 10px;
    cursor: pointer;
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    min-width: 60px;
}

#clearAllColors {
    margin-top: 3px;
    display: block;
}

#colorComparison {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px 30px; /* Erster Wert: Vertikaler Abstand, Zweiter Wert: Horizontaler Abstand */
    /*margin-top: 20px;*/
}

.color-item {
    flex: 0 0 auto; /* Verhindert das Dehnen der Elemente */
    margin: 0; /* Entfernt den ursprünglichen Margin */
    text-align: center;
    /* Fixed width to prevent layout shifts */
    width: 130px;
    /* Ensure consistent height */
    min-height: 120px;
    /* Prevent content overflow */
    overflow: hidden;
}

.color-option {
    margin: 5px;
    /*text-align: center;*/
    cursor: pointer;
    flex: 0 0 auto; /* Verhindert das Dehnen der Elemente */
    width: 90px; /* Basis ist die Breite des color-sample (40px) + 10px extra */
    box-sizing: border-box;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 3px;
}

.color-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-color: #666;
}

.color-option:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.color-option:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.color-sample {
    width: 80px;
    height: 80px;
    display: inline-block;
    border: 1px solid #000;
    vertical-align: middle;
    /*margin-right: 15px;*/
}

.footer {
    background-color: #f5f5f5;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e0e0e0;
  }
  
  .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 1rem;
  }
  
  .footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 1rem;
  }
  
  .footer-logo {
    height: 40px;
    margin-bottom: 0.5rem;
  }
  
  .footer h3 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: -0.5rem;
  }
  
  .footer p {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }
  
  .footer-link {
    color: #3366cc;
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-block;
    margin-bottom: 0.25rem;
  }
  
  .footer-link:hover {
    text-decoration: underline;
  }
  
  .instagram-link::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    background-image: url('instagram_icon.png');
    background-size: contain;
    margin-right: 0.25rem;
    vertical-align: middle;
  }
  
  .footer-disclaimer {
    font-size: 0.75rem;
    
  }


/* Media Queries für responsive Design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .color-sample {
        width: 40px;
        height: 40px;
    }

    .colorList .color-sample {
        width: 15px;
        height: 15px;
    }

    .delete-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .kopf img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    .color-option {
        flex-basis: calc(50% - 20px); /* Zwei Elemente pro Zeile auf mobilen Geräten */
    }

    .footer-container {
        flex-direction: column;
      }
      
      .footer-column {
        width: 100%;
        margin-bottom: 1.5rem;
      }

      #colorComparison {
        gap: 15px;
        justify-content: center; /* Zentriert auf kleinen Bildschirmen */
    }
    
    .color-item {
        min-width: 100px;
    }
  
}

/* BREADCRUMB STYLES DISABLED - Now using hamburger menu instead */
/* Entferne alle bestehenden .breadcrumb Styles und ersetze sie durch diese einheitliche Definition */

/* Breadcrumb nur auf Desktop anzeigen */
.breadcrumb {
    background-color: #f8f9fa;
    
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    margin: 0;
    border-radius: 0;
}

.breadcrumb ul {
    list-style-type: none;
    padding: 0 15px;
    margin: 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.breadcrumb li {
    margin: 5px 10px;
    white-space: nowrap;
}

.breadcrumb a {
    text-decoration: none;
    color: #6c757d;
    font-weight: bold;
}

.breadcrumb a.active {
    color: #007bff;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Auf mobilen Geräten komplett ausblenden */
@media (max-width: 600px) {
    .breadcrumb {
        display: none !important;
    }
    
    /* Entferne das Padding am Body für mobile Geräte */
    body {
        padding-bottom: 20px; /* Nur minimales Padding */
    }
}

/* Desktop behält das Padding */
@media (min-width: 601px) {
    body {
        padding-bottom: 80px;
    }
}

.breadcrumb ul {
    list-style-type: none;
    padding: 0 15px;
    margin: 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.breadcrumb li {
    margin: 5px 10px;
    white-space: nowrap;
}

.breadcrumb a {
    text-decoration: none;
    color: #6c757d;
    font-weight: bold;
}

.breadcrumb a.active {
    color: #007bff;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Erhöhe das Padding am unteren Rand des Body-Elements */
body {
    padding-bottom: 120px; /* Erhöht für alle Geräte */
}

/* Mobile Anpassungen */
@media (max-width: 600px) {
    .breadcrumb {
        font-size: 0.85em;
    }
    
    .breadcrumb ul {
        padding: 0 10px;
    }
    
    .breadcrumb li {
        margin: 3px 5px;
    }
    
    body {
        padding-bottom: 150px; /* Noch mehr Platz für mobile Geräte */
    }
    
    /* Verbesserte Darstellung der color-palette-controls */
    .color-palette-controls {
        margin-bottom: 30px; /* Mehr Abstand nach unten */
        display: flex;
        justify-content: center; /* Zentriert die Buttons */
        gap: 10px; /* Abstand zwischen den Buttons */
    }
    
    /* Stelle sicher, dass die Buttons gut sichtbar sind */
    #clearAllColors, #savePalette {
        margin-bottom: 10px;
        min-height: 44px; /* Größere Touch-Targets für mobile Geräte */
    }
}

.color-option .color-sample {
    width: 60px;
    height: 60px;
    display: inline-block;
    border: 1px solid #000;
    margin-bottom: 3px;
    border-radius: 2px;
}

.color-option p {
    margin: 2px 0;
    font-size: 0.8em;
    word-wrap: break-word; /* Verhindert Textüberlauf */
}

.color-option .small-text {
    font-size: 0.7em;
}

@media (max-width: 600px) {
    .color-option {
        flex-basis: calc(33.33% - 10px);
    }
    
    .color-option:hover {
        transform: none;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
}

#colorComparison {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Gleichmäßiger Abstand zwischen den Elementen */
    justify-content: flex-start;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.zoom-control input[type="range"] {
    width: 150px;
}

.zoom-control label {
    font-size: 14px;
}

#zoomValue {
    min-width: 45px;
}

#selectedImage {
    cursor: grab;
    transform-origin: top left;
    transition: transform 0.1s ease-out;
}

#selectedImage.dragging {
    cursor: grabbing;
    transition: none;
}

/* Füge diese CSS-Regeln hinzu */
.eyedropper-cursor {
    cursor: crosshair !important;
}

.eyedropper-cursor-white {
    cursor: crosshair !important;
}

@media (max-width: 600px) {
    /* ... andere mobile Styles ... */

    #colorComparison {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
    }

    .color-option {
        width: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .color-option .color-sample {
        width: 100%;
        aspect-ratio: 1; /* Macht das Farbquadrat quadratisch */
        max-width: 60px;
    }

    .color-option p {
        margin: 2px 0;
        text-align: center;
        width: 100%;
        font-size: 12px;
    }

    .color-option .small-text {
        font-size: 10px;
    }
}

/* Entferne oder überschreibe möglicherweise störende Styles */
#colorComparison {
    gap: 8px;
}

.color-item {
    margin: 0;
}

.advanced-settings {
    background: white;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.setting-group {
    margin: 15px 0;
}

.setting-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #666;
}

.manufacturer-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.manufacturer-list label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .manufacturer-list {
        grid-template-columns: repeat(2, 1fr);
    }
}


.color-sample.clickable {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.color-sample.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.color-item.selected .color-sample {
    border: 2px solid rgb(52, 52, 52);
    box-shadow: 0 2px 4px rgba(158, 158, 158, 0.3);
}

/* Füge diese Styles am Ende der style.css hinzu */
.add-color-button {
    padding: 5px 10px;
    margin-top: 5px;
    background-color: #2E7D32;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-color-button:hover {
    background-color: #1B5E20;
}

.add-color-button.added {
    background-color: #888;
    cursor: default;
}

.color-list-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
    padding: 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.remove-color-button {
    padding: 5px 10px;
    margin-left: auto;
    background-color: #C62828;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.remove-color-button:hover {
    background-color: #B71C1C;
}

.no-colors-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.manufacturer-section {
    margin: 20px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.manufacturer-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

#colorComparison {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-item {
    display: flex;
    align-items: center;
    padding: 5px;
    background-color: white;
    border-radius: 3px;
    /*margin: 5px 0;*/
}

.color-difference {
    font-size: 0.9em;
    color: #666;
}

#colorComparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 15px;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-sample {
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 3px;
    /*margin-bottom: 8px;*/
}

.color-info {
    text-align: center;
    width: 100%;
}

.color-name {
    margin: 5px auto;
    /*font-weight: bold;*/
    font-size: 0.9em;
    /* Prevent text wrapping and add ellipsis for long names */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    /* Add tooltip behavior */
    cursor: help;
    /* Center align to match manufacturer and color-difference */
    text-align: center;
}

.manufacturer {
    color: #666;
    font-size: 0.8em;
    margin: 2px 0;
    font-weight: bold;
}

.color-difference {
    font-size: 0.8em;
    color: #888;
    margin: 2px 0;
}

/* Responsive Design für kleinere Bildschirme */
@media (max-width: 600px) {
    #colorComparison {
        gap: 10px;
        padding: 10px;
    }

    .color-sample {
        width: 60px;
        height: 60px;
    }

    .color-name {
        font-size: 0.8em;
        /* Maintain ellipsis behavior on mobile */
        max-width: 100px;
    }
}

.manufacturer-selection {
    /*margin: 20px 0;*/
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.manufacturer-selection h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

.manufacturer-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 5px;
}

.manufacturer-list label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: #444;
}

.manufacturer-list input[type="checkbox"] {
    margin: 0;
}

.color-selection-container {
    /*margin-top: 5px;*/
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#colorInfo {
    display: flex;
    flex-direction: column; /* Ändert die Richtung von row zu column */
    gap: 10px; /* Abstand zwischen den Elementen */
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
    /*width: 95%; /* Volle Breite des Containers */
    max-width: 300px; /* Maximale Breite */
}

.manufacturer-selection {
    margin: 2px 0;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

#savePalette {
    background-color: #2E7D32;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    height: 40px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    line-height: 1;
    justify-content: center;
}

#savePalette:hover {
    background-color: #1B5E20;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-column .button,
.footer-column .asebutton {
    width: fit-content;
    /*margin: 5px 0;*/
}

.asebutton {
    background-color: #1565C0;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 1em;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    height: 44px;
    box-sizing: border-box;
    line-height: 1;
}

.asebutton:hover {
    background-color: #0D47A1;
}

#showInstructions {
    background-color: #2E7D32;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

#showInstructions:hover {
    background-color: #1B5E20;
}

/* Upload Button */
#uploadButton {
    background-color: #1565C0;  /* Darker blue for better contrast */
    color: white;
    height: 40px;
    font-size: 1em;
}

#uploadButton:hover {
    background-color: #0D47A1;
}

/* Pick Color Button */
#pickColorButton {
    background-color: #4CAF50;  /* Grün */
    color: white;
}

#pickColorButton:hover {
    background-color: #1B5E20;
}

/* Container für die Hauptbuttons */
/*#uploadButton, */
#pickColorButton,
/*.color-palette-controls {
    margin-left: 10px;
}*/

/* Container für Kick All und Save Palette Buttons */
/* Ändere die Ausrichtung der Buttons in color-palette-controls */
.color-palette-controls {
    display: flex;
    flex-direction: row; /* Buttons nebeneinander anordnen */
    justify-content: flex-start; /* Buttons am Anfang ausrichten */
    align-items: center; /* Buttons vertikal zentrieren */
    gap: 10px; /* Abstand zwischen den Buttons */
    margin-bottom: 20px; /* Abstand nach unten */
}

/* Stelle sicher, dass die Buttons die richtige Größe haben */
.color-palette-controls button {
    flex: 0 0 auto; /* Verhindert, dass die Buttons gedehnt werden */
}

/* Mobile Anpassungen */
@media (max-width: 600px) {
    .color-palette-controls {
        gap: 5px; /* Geringerer Abstand auf mobilen Geräten */
    }
    
    /* Ensure proper alignment on mobile for color list buttons */
    .color-actions {
        gap: 2px; /* Sehr kleiner Abstand zwischen den Buttons */
        flex-shrink: 0; /* Prevent shrinking */
        margin-left: auto; /* Verstärkt die rechtsbündige Ausrichtung auf mobilen Geräten */
        display: flex; /* Explizit als Flexbox definieren */
        align-items: center; /* Vertikal zentrieren */
    }
    
    /* Make sure color info doesn't push buttons */
    .color-info-small {
        min-width: 0; /* Allow shrinking */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1; /* Lässt den Text-Container den verfügbaren Platz nutzen */
    }
    
    /* Switch to mobile text format */
    .color-text-desktop {
        display: none;
    }
    
    .color-text-mobile {
        display: inline;
    }
}

/* Behalt das erhöhte Padding für den Body bei */
body {
    padding-bottom: 100px; /* Immer noch genug Platz für die Breadcrumb */
}

@media (max-width: 600px) {
    body {
        padding-bottom: 120px; /* Mehr Platz auf mobilen Geräten */
    }
}

#toggleManufacturers {
    background-color: #f2ff00;
    color: #333;
    border: 1px solid #ddd;
    width: fit-content;
    height: 40px;
    font-size: 1em;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    line-height: 1;
    cursor: pointer;
    justify-content: flex-start;
}

#toggleManufacturers:hover {
    background-color: #d3de00;
}

.manufacturer-selection {
    margin: 10px ;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Optional: Animation für das Ein-/Ausblenden */
.manufacturer-selection {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Horizontaler Button-Container */
.button-container {
    display: flex;
    gap: 10px;
    padding: 5px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    justify-content: space-between;
}

/* Modal für Hersteller-Auswahl */
.manufacturer-selection {
    position: relative;
    z-index: 100;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: calc(100% - 40px);
    /*margin: 10px 20px;*/
    padding: 15px;
    display: none;
}

/* Color Info Container Anpassungen */
#colorInfo {
    display: flex;
    gap: 10px;
    max-width: 100%;
    /*height: 40px;*/
    /*margin: 10px 0;*/
}

#selectedColorSample,
#lastPickedColorSample {
    height: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

/* Color Comparison Grid */
#colorComparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: fit-content; /* Begrenzt die Höhe auf den Inhalt */
    padding: 5px;
}

.color-sample.clickable {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.color-info {
    flex-grow: 0; /* Verhindert das Aufblähen */
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.9em;
    line-height: 1.2;
}

/* Desktop Layout */
@media (min-width: 768px) {
    #colorComparison {
        /*display: flex;*/
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .color-item {
        flex: 0 1 calc(33.333% - 10px);
        max-height: fit-content; /* Zusätzliche Höhenbegrenzung für Desktop */
    }
}

/* Basis-Container */
#colorComparisonContainer {
    width: 100%;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
}

/* Mobile First: 3x3 Grid */
#colorComparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 5px;
    height: fit-content;
    padding: 5px;
}

.color-sample.clickable {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.color-info {
    flex-grow: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8em;
    line-height: 1.1;
}

/* Desktop Layout: Horizontale Anordnung */
@media (min-width: 1024px) {
    #colorComparison {
        display: flex;
        grid-template-columns: none;
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .color-item {
        flex: 1;
        /*max-width: calc(100% / 9); /* Teilt den verfügbaren Platz durch 9 */
        min-width: 100px;
    }

    .color-info {
        font-size: 0.75em;
        line-height: 1;
    }
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
    .kopf img {
        width: 220px; /* 75% der ursprünglichen Breite */
        height: 44px; /* 75% der ursprünglichen Höhe */
    }
}

#selectedColorsList h3 {
    margin: 0;  /* Entfernt alle Margins */
    padding: 0 0 3px 0;  /* Fügt unten etwas Abstand hinzu */
}

/* Mobile Ansicht */
@media (max-width: 600px) {
    #colorComparisonContainer {
        max-width: 100%;
        padding: 0 5px; /* Kleiner Abstand an den Seiten */
    }
    
    #colorComparison {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        width: 100%;
    }
    
    .color-item {
        width: 100%;
        min-width: 0; /* Verhindert, dass Mindestbreite das Grid sprengt */
        padding: 3px;
    }
    
    .color-sample.clickable {
        width: 100%;
        max-width: 40px;
        height: 40px;
    }
    
    .color-info {
        font-size: 0.7em; /* Kleinere Schrift für mobile Ansicht */
        word-break: break-word; /* Verhindert Textüberlauf */
    }
}

/* Basis-Styling für Buttons */
.button, .asebutton, .kickbutton, #showInstructions, #savePalette, #uploadButton, #pickColorButton {
    height: 40px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    line-height: 1;
    border: none;
    cursor: pointer;
    width: fit-content;
    justify-content: flex-start;
}

/* Mobile Anpassungen für Buttons */
@media (max-width: 600px) {
    .button, .asebutton, .kickbutton, #showInstructions, #savePalette, #uploadButton, #pickColorButton, #toggleManufacturers {
        height: 32px; /* Reduzierte Höhe */
        padding: 4px 12px; /* Reduzierter Innenabstand */
        font-size: 0.9em; /* Kleinere Schrift */
        min-width: auto; /* Entfernt minimale Breite */
    }

    .kickbutton {
        min-width: 40px; /* Gleichmäßige Breite für beide Buttons auf mobilen Geräten */
        height: 32px; /* Reduzierte Höhe für mobile Ansicht */
        margin: 0; /* Konsistent mit Desktop-Version, gap übernimmt Abstände */
        padding: 0 6px; /* Kompakteres Padding */
        font-size: 14px; /* Kleinere Schrift für mobile */
    }
    
    .kickbutton.trash-icon {
        min-width: 40px; /* Gleiche Breite wie normaler kickbutton */
        height: 32px; /* Gleiche Höhe wie normaler kickbutton */
        padding: 0 6px; /* Gleiches Padding wie normaler kickbutton */
        font-size: 16px; /* Etwas größeres Icon für bessere Sichtbarkeit */
    }

    .button-container {
        gap: 5px; /* Reduzierter Abstand zwischen Buttons */
        padding: 3px; /* Reduzierter Container-Padding */
    }
}

/* Basis-Styling für colorInfo */
#colorInfo {
    display: flex;
    gap: 10px;
    max-width: 100%;
}

#selectedColorSample,
#lastPickedColorSample {
    height: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

#selectedColorSample h3,
#lastPickedColorSample h3,
#selectedColorRGB,
#lastPickedColorRGB {
    margin: 0;
    padding: 0;
}

/* Hide the "Chosen Color" section while keeping functionality intact */
#lastPickedColorSample {
    display: none !important;
}

/* Mobile Anpassungen für colorInfo */
@media (max-width: 600px) {
    #colorInfo {
        gap: 5px;
    }

    #selectedColorSample,
    #lastPickedColorSample {
        height: 32px; /* Reduzierte Höhe */
        padding: 0 5px;
        gap: 5px;
    }

    #selectedColorSample h3,
    #lastPickedColorSample h3 {
        font-size: 0.8em; /* Kleinere Überschriften */
    }

    #selectedColorRGB,
    #lastPickedColorRGB {
        font-size: 0.7em; /* Kleinere RGB-Werte */
    }
}

.button-container {
    display: flex;
    gap: 10px;
    padding: 5px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

#showInstructions {
    margin-left: auto; /* Schiebt den Button nach rechts */
}

/* Mobile Anpassungen */
@media (max-width: 600px) {
    .button-container {
        gap: 5px;
        padding: 3px;
    }

    #showInstructions {
        margin-left: auto; /* Behält die rechtsbündige Position auch in mobiler Ansicht */
        font-size: 0.85em; /* Optional: noch kleinere Schrift für mobile Ansicht */
    }
}

/* Bestehende Navigation Styles */
.breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.breadcrumb a {
    text-decoration: none;
    color: inherit;
}

/* Mobile Anpassungen */
@media (max-width: 600px) {
    .breadcrumb {
        font-size: 0.85em; /* Kleinere Schrift auf mobilen Geräten */
    }

    .breadcrumb ul {
        gap: 10px; /* Geringerer Abstand zwischen den Links */
    }

    .breadcrumb a {
        padding: 5px 8px; /* Kleinere Padding für Touch-Targets */
    }
}

/* Noch kleinere Geräte */
@media (max-width: 360px) {
    .breadcrumb {
        font-size: 0.75em; /* Noch kleinere Schrift für sehr kleine Geräte */
    }
}

/* Tutorial Overlay Styles */
.tutorial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 240, 240, 0.95);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0px;
    border-radius: 5px;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.tutorial-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.tutorial-content {
    text-align: center;
    max-width: 400px;
    max-height: 90vh;
    padding: 0px 0px;
    overflow-y: auto;
}

.tutorial-media {
    margin-bottom: 20px;
}

.tutorial-image {
    max-width: 100%;
    max-height: 250px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tutorial-text h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.tutorial-text p {
    color: #666;
    margin-bottom: 10px;
    font-size: 1em;
    line-height: 1.4;
}

/* Mobile responsive tutorial */
@media (max-width: 600px) {
    .tutorial-content {
        max-width: 90%;
        padding: 15px;
    }
    
    .tutorial-text h3 {
        font-size: 1.2em;
    }
    
    .tutorial-text p {
        font-size: 0.9em;
    }
}

/* Hamburger Menu Styles */
.hamburger-button {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 18px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-button.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-button.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.hamburger-button.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #4CAF50;
    color: white;
}

.mobile-menu-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.close-menu-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-menu-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-content {
    padding: 0;
}

.menu-section {
    border-bottom: 1px solid #eee;
}

.menu-section:last-child {
    border-bottom: none;
}

.menu-section h3 {
    margin: 0;
    padding: 15px 20px 10px 20px;
    font-size: 1.1em;
    color: #333;
    background: #f8f9fa;
}

.menu-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-links li {
    border-bottom: 1px solid #f0f0f0;
}

.menu-links li:last-child {
    border-bottom: none;
}

.menu-links a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #495057;
    transition: background-color 0.2s ease;
}

.menu-links a:hover {
    background-color: #f8f9fa;
}

.menu-links a.active {
    background-color: #e8f5e8;
    color: #2e7d32;
    font-weight: 500;
}

.instructions-content {
    padding: 10px 20px 20px 20px;
}

/* PWA Installation Section */
.pwa-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin: 10px;
    color: white;
}

.pwa-section h3 {
    color: white;
    background: rgba(255,255,255,0.1);
    margin: 0;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
}

.pwa-content {
    padding: 15px 20px 20px 20px;
}

.pwa-content p {
    margin: 8px 0;
    line-height: 1.4;
}

.pwa-benefits {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.pwa-benefits li {
    padding: 4px 0;
    font-size: 14px;
}

.pwa-instructions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.pwa-instructions p {
    margin: 6px 0;
    font-size: 13px;
}

/* Language Selection */
.language-section {
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px;
}

.language-section h3 {
    background: #e9ecef;
    margin: 0;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    color: #495057;
    font-size: 14px;
}

.language-selector {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.lang-btn {
    background: white;
    border: 2px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 120px;
}

.lang-btn:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.lang-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* Flag-based language selector */
.lang-flag {
    background: transparent;
    border: 2px solid transparent;
    padding: 8px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.lang-flag[data-lang="en"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><rect width="60" height="30" fill="%23B22234"/><path d="M0,3.5h60M0,7h60M0,10.5h60M0,14h60M0,17.5h60M0,21h60M0,24.5h60M0,28h60" stroke="%23FFF" stroke-width="2"/><rect width="24" height="17" fill="%233C3B6E"/><g fill="%23FFF"><circle cx="6" cy="3" r="1"/><circle cx="12" cy="3" r="1"/><circle cx="18" cy="3" r="1"/><circle cx="6" cy="7" r="1"/><circle cx="12" cy="7" r="1"/><circle cx="18" cy="7" r="1"/><circle cx="6" cy="11" r="1"/><circle cx="12" cy="11" r="1"/><circle cx="18" cy="11" r="1"/><circle cx="6" cy="15" r="1"/><circle cx="12" cy="15" r="1"/><circle cx="18" cy="15" r="1"/></g></svg>');
    background-size: 30px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

.lang-flag[data-lang="de"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><rect width="60" height="13.33" fill="%23000"/><rect y="13.33" width="60" height="13.33" fill="%23DD0000"/><rect y="26.67" width="60" height="13.33" fill="%23FFCE00"/></svg>');
    background-size: 30px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

.lang-flag:hover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.1);
}

.lang-flag.active {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.lang-flag[data-lang="en"]:hover,
.lang-flag[data-lang="en"].active {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><rect width="60" height="30" fill="%23B22234"/><path d="M0,3.5h60M0,7h60M0,10.5h60M0,14h60M0,17.5h60M0,21h60M0,24.5h60M0,28h60" stroke="%23FFF" stroke-width="2"/><rect width="24" height="17" fill="%233C3B6E"/><g fill="%23FFF"><circle cx="6" cy="3" r="1"/><circle cx="12" cy="3" r="1"/><circle cx="18" cy="3" r="1"/><circle cx="6" cy="7" r="1"/><circle cx="12" cy="7" r="1"/><circle cx="18" cy="7" r="1"/><circle cx="6" cy="11" r="1"/><circle cx="12" cy="11" r="1"/><circle cx="18" cy="11" r="1"/><circle cx="6" cy="15" r="1"/><circle cx="12" cy="15" r="1"/><circle cx="18" cy="15" r="1"/></g></svg>');
    background-size: 30px 20px;
}

.lang-flag[data-lang="de"]:hover,
.lang-flag[data-lang="de"].active {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><rect width="60" height="13.33" fill="%23000"/><rect y="13.33" width="60" height="13.33" fill="%23DD0000"/><rect y="26.67" width="60" height="13.33" fill="%23FFCE00"/></svg>');
}

.instruction-step {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.instruction-step strong {
    color: #2e7d32;
}

.about-content {
    padding: 10px 20px 20px 20px;
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
}

.about-content a {
    color: #4CAF50;
    text-decoration: none;
}

.about-content a:hover {
    text-decoration: underline;
}

.privacy-note {
    margin-top: 15px;
    font-size: 0.8em;
    color: #868e96;
    text-align: center;
    font-style: italic;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
        right: -100%;
    }
    
    .hamburger-button .button-text {
        display: none;
    }
}

/* Visual Marker System Styles */
@keyframes markerPulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
}

@keyframes lockedMarkerGlow {
    0% {
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
    }
    100% {
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
    }
}

/* Canvas cursor states for marker interaction */
.picking-active {
    cursor: crosshair !important;
}

.marker-grab {
    cursor: grab !important;
}

.marker-grabbing {
    cursor: grabbing !important;
}

/* Smooth transitions for marker state changes */
.marker-transition {
    transition: all 0.3s ease-out;
}

/* Additional visual feedback for touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Touch-specific styles if needed */
    .marker-touch-feedback {
        transform: scale(1.2);
        transition: transform 0.2s ease;
    }
}

/* ===== FINE-TUNE MODAL STYLES ===== */

/* Modal overlay */
.finetune-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal content */
.finetune-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    max-height: 90vh;
    width: 100%;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal header */
.finetune-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid #eee;
    background: #4CAF50;
    color: white;
    border-radius: 8px 8px 0 0;
}

.finetune-modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
}

.finetune-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.finetune-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 3x3 Grid */
.finetune-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
}

.finetune-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.finetune-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.finetune-grid-item.selected {
    border: 2px solid #4CAF50;
    background: #f0f8f0;
}

/* Color samples in grid */
.finetune-color-sample {
    width: 80px;
    height: 80px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.finetune-color-sample.original {
    border: 3px solid #333;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.2);
}

.finetune-color-sample.clickable {
    cursor: pointer;
}

.finetune-color-sample.clickable:hover {
    transform: scale(1.05);
    border-color: #4CAF50;
}

.finetune-color-sample.selected {
    border: 3px solid #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.finetune-color-sample.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.finetune-color-sample.unavailable {
    background: repeating-linear-gradient(
        45deg,
        #f0f0f0,
        #f0f0f0 10px,
        #e0e0e0 10px,
        #e0e0e0 20px
    );
    border-color: #ccc;
    cursor: not-allowed;
}

/* Color information text */
.finetune-color-name {
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.finetune-color-code {
    font-size: 0.8em;
    color: #666;
    font-family: monospace;
}

/* Modal footer */
.finetune-modal-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    border-radius: 0 0 8px 8px;
    text-align: center;
}

#finetuneCurrentColor {
    font-weight: 500;
    color: #333;
    font-size: 1em;
}

/* Mobile responsive styles */
@media (max-width: 600px) {
    .finetune-modal-overlay {
        padding: 10px;
    }
    
    .finetune-modal-content {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .finetune-modal-header {
        padding: 15px;
    }
    
    .finetune-modal-header h3 {
        font-size: 1.1em;
    }
    
    .finetune-grid {
        gap: 10px;
        padding: 15px;
    }
    
    .finetune-grid-item {
        padding: 10px;
    }
    
    .finetune-color-sample {
        width: 60px;
        height: 60px;
    }
    
    .finetune-color-name {
        font-size: 0.8em;
    }
    
    .finetune-color-code {
        font-size: 0.7em;
    }
    
    .finetune-modal-footer {
        padding: 12px 15px;
    }
    
    #finetuneCurrentColor {
        font-size: 0.9em;
    }
}

/* Downloads Modal Styles */
.downloads-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.downloads-modal.open {
    opacity: 1;
    visibility: visible;
}

.downloads-modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.downloads-modal-header {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.downloads-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.close-modal-button {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-modal-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.downloads-modal-body {
    padding: 30px;
}

.downloads-intro {
    text-align: center;
    margin-bottom: 30px;
}

.downloads-intro p {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
    line-height: 1.6;
}

.software-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.software-list li {
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #e9ecef;
    font-weight: 500;
}

.downloads-note {
    font-weight: 600;
    color: #1565C0;
    margin-top: 20px !important;
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.download-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.download-item:hover {
    border-color: #1565C0;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.15);
    transform: translateY(-2px);
}

.download-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.download-info {
    flex-grow: 1;
}

.download-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.download-info p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.downloads-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.downloads-help {
    color: #666;
    font-size: 1em;
    line-height: 1.5;
    margin: 0;
}

.downloads-help strong {
    color: #333;
}

/* Mobile responsiveness for Downloads Modal */
@media (max-width: 768px) {
    .downloads-modal {
        padding: 10px;
    }
    
    .downloads-modal-header {
        padding: 15px 20px;
    }
    
    .downloads-modal-header h2 {
        font-size: 1.2em;
    }
    
    .downloads-modal-body {
        padding: 20px;
    }
    
    .downloads-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .download-item {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .software-list {
        flex-direction: column;
        align-items: center;
    }
    
    .downloads-intro p {
        font-size: 1em;
    }
}

/* Modal Overlay Base Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}