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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.controls {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.controls summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
}

.controls summary::-webkit-details-marker {
    display: none;
}

.controls summary::before {
    content: "▶";
    margin-right: 0.5rem;
    display: inline-block;
    transition: transform 0.2s;
}

.controls[open] summary::before {
    transform: rotate(90deg);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid #eee;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
}

select, input[type="range"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: #ddd;
    border-radius: 4px;
    outline: none;
    padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #4a90e2;
    border-radius: 50%;
    cursor: pointer;
}

.visualization {
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 1rem;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

#pattern, #circular-pattern, #chladni-pattern {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    mix-blend-mode: screen;
    display: block;
    background: #000;
}

.actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

button {
    padding: 0.5rem 1rem;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #357abd;
}

@media (max-width: 768px) {
    .container {
        margin: 0.5rem auto;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}

.typo-text {
    position: fixed;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 24px;
    z-index: 1000;
}

.key-display {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 24px;
    z-index: 9999;
    text-align: center;
    padding: 10px 20px;
    background-color: transparent;
    border-radius: 8px;
    font-weight: bold;
}

.tab-container {
    width: 100%;
}

.tab-content {
    display: none;
    padding: 20px;
    background-color: #111;
    border-radius: 0 5px 5px 5px;
}

.tab-content.active {
    display: block;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tab-button {
    padding: 10px 15px;
    margin-right: 5px;
    background-color: #222;
    border: 1px solid #333;
    color: #CCC;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    transition: background-color 0.3s;
}

.tab-button:hover {
    background-color: #333;
}

.tab-button.active {
    background-color: #444;
    color: white;
    border-bottom: 1px solid #444;
}

#animate.active {
    background-color: #e24a4a;
}

/* Button-ähnliche Radio-Buttons */
.radio-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.5rem;
}

.radio-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

.radio-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-button span {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f5f5f5;
    transition: all 0.2s ease;
}

.radio-button input[type="radio"]:checked + span {
    background-color: #4a90e2;
    color: white;
    border-color: #3a80d2;
}

.radio-button:hover span {
    background-color: #e5e5e5;
}

.radio-button input[type="radio"]:checked:hover + span {
    background-color: #3a80d2;
}

/* Bestehende Radio-Stile können entfernt oder weiterhin verwendet werden */
.radio-group {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.radio-label input[type="radio"] {
    margin-bottom: 0.5rem;
    cursor: pointer;
    width: auto;
}

.radio-label .shape-icon {
    font-size: 0.85rem;
    line-height: 1;
    font-weight: bold;
}

.radio-label:hover {
    color: #444;
}

/* Neue Stile für Layout mit Überschriften links und Parametern rechts */
.param-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
}

.param-heading {
    display: flex;
    align-items: center;
}

.param-heading h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #555;
    text-align: right;
    width: 100%;
    padding-right: 1rem;
    border-right: 1px solid #ddd;
}

.param-controls {
    padding: 10px 0;
}

.params-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
}

.params-container .control-group {
    flex: 1;
    min-width: 200px;
    max-width: 350px;
}

@media (max-width: 768px) {
    .param-grid {
        grid-template-columns: 1fr;
    }
    
    .param-heading h4 {
        text-align: left;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 0 0 5px 0;
        margin-bottom: 10px;
    }
    
    .params-container {
        flex-direction: column;
    }
    
    .params-container .control-group {
        max-width: none;
    }
}

/* Button-Styling verbessern */
.button-group button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 4px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #000;
    font-weight: normal;
}

.button-group button:hover {
    background-color: #e0e0e0;
}

.button-emoji {
    display: inline-block;
    font-family: 'Noto Emoji', sans-serif;
    font-weight: normal;
    font-size: 1.1em;
    -webkit-font-feature-settings: "COLR" 0, "CPAL" 0;
    font-feature-settings: "COLR" 0, "CPAL" 0;
    font-variation-settings: 'COLR' 0, 'CPAL' 0;
}

/* Spezielle Stile für den Play-Button */
#playHarmonograph .button-emoji {
    color: #2196F3;
}

/* Spezielle Stile für den Akkord-Button */
#chordProgressionButton .button-emoji {
    color: #4CAF50;
}

/* Spezielle Stile für den Download-Button */
#downloadHarmonograph .button-emoji, 
#downloadHarmonographPackage .button-emoji {
    color: #FF5252;
}

/* Spezielle Stile für den Toggle-Button */
#toggleAutoSound .button-emoji {
    color: #FFC107;
} 