body {
    margin: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #333;
    color: white;
}

#controls {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 300px;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.control-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

input[type=number],
input[type=range] {
    width: 100%;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

h2 {
    margin-top: 0;
    font-size: 18px;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
}

.note {
    font-size: 12px;
    color: #aaa;
    margin-top: 5px;
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    display: none;
}

.help-btn {
    width: 100%;
    padding: 8px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 15px;
}

.help-btn:hover {
    background-color: #218838;
}

.help-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid #28a745;
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.help-section.hidden {
    max-height: 0;
    padding: 0 15px;
    margin-bottom: 0;
    opacity: 0;
    overflow: hidden;
}

.help-section h3 {
    font-size: 15px;
    margin-top: 10px;
    margin-bottom: 8px;
    color: #4CAF50;
}

.help-section h3:first-child {
    margin-top: 0;
}

.help-section p {
    font-size: 13px;
    line-height: 1.6;
    margin: 8px 0;
    color: #ddd;
}

.help-section p strong {
    color: #4CAF50;
}

#toggleBtn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    z-index: 1001;
    display: none;
}

#toggleBtn:hover {
    background-color: rgba(0, 86, 179, 0.9);
}

#langBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto;
    min-width: 60px;
    height: 40px;
    padding: 0 12px;
    background-color: rgba(40, 167, 69, 0.9);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    z-index: 1001;
    transition: background-color 0.3s ease;
}

#langBtn:hover {
    background-color: rgba(33, 136, 56, 0.9);
}

/* Mobile responsive styles */
@media screen and (max-width: 600px) {
    #toggleBtn {
        display: block;
    }

    #controls {
        width: calc(100vw - 30px);
        max-width: 300px;
        max-height: 70vh;
        overflow-y: auto;
        transition: transform 0.3s ease;
        left: 5px;
        padding: 15px;
    }

    #controls.hidden {
        transform: translateX(-120%);
    }
}