.engine-module {
    --engine-module-bg-darker: #070707;
    --engine-module-bg-card: #181818;
    --engine-module-copper: #ff5e00;
    --engine-module-gold: #dfa527;
    --engine-module-steel-dark: #3a3f47;
    --engine-module-text-light: #f1f3f5;
    --engine-module-text-gray: #a0aec0;
    --engine-module-heading: "Oswald", "Arial Narrow", sans-serif;
    --engine-module-shadow-copper: 0 0 15px rgba(255, 94, 0, 0.3);
    --engine-module-shadow-gold: 0 0 15px rgba(223, 165, 39, 0.4);
    box-sizing: border-box;
    color: var(--engine-module-text-light);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.engine-module *,
.engine-module *::before,
.engine-module *::after {
    box-sizing: inherit;
}

.engine-module-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    padding: 30px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--engine-module-steel-dark);
    backdrop-filter: blur(5px);
}

.engine-module-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 12px 32px;
    background: var(--engine-module-bg-darker);
    color: var(--engine-module-gold);
    border: 2px solid var(--engine-module-gold);
    border-radius: 0;
    box-shadow: var(--engine-module-shadow-gold);
    font-family: var(--engine-module-heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.engine-module-button:hover,
.engine-module-button:focus-visible {
    background: var(--engine-module-gold);
    color: #000;
    box-shadow: 0 0 25px var(--engine-module-gold);
    transform: translateY(-2px);
}

.engine-module-button.is-running {
    border-color: var(--engine-module-copper);
    color: var(--engine-module-copper);
    box-shadow: var(--engine-module-shadow-copper);
}

.engine-module-button.is-running:hover,
.engine-module-button.is-running:focus-visible {
    background: var(--engine-module-copper);
    color: #fff;
}

.engine-module-button-icon {
    display: inline-block;
    min-width: 1em;
}

.engine-module-throttle {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.engine-module-throttle-label {
    color: var(--engine-module-text-light);
    font-family: var(--engine-module-heading);
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.engine-module-throttle-input {
    width: 100%;
    height: 6px;
    margin: 0;
    background: #222;
    border: none;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.engine-module-throttle-input:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.engine-module-throttle-input::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background: var(--engine-module-gold);
    border: none;
    border-radius: 0;
    box-shadow: var(--engine-module-shadow-gold);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.engine-module-throttle-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--engine-module-gold);
    border: none;
    border-radius: 0;
    box-shadow: var(--engine-module-shadow-gold);
    cursor: pointer;
}

.engine-module-throttle-input:disabled::-webkit-slider-thumb {
    background: #555;
    box-shadow: none;
    cursor: not-allowed;
}

.engine-module-throttle-input:disabled::-moz-range-thumb {
    background: #555;
    box-shadow: none;
    cursor: not-allowed;
}

.engine-module-visualizer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 300px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--engine-module-steel-dark);
}

.engine-module-visualizer-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 40%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(223, 165, 39, 0.1) 0%, transparent 70%);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.engine-module-visualizer.is-running .engine-module-visualizer-glow {
    opacity: 1;
}

.engine-module-equalizer {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 260px;
}

.engine-module-eq-bg {
    stroke: #222;
}

.engine-module-eq-path {
    stroke: #dfa527;
}

@media (max-width: 640px) {
    .engine-module-controls {
        padding: 22px;
    }

    .engine-module-button {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .engine-module-visualizer {
        min-height: 220px;
    }

    .engine-module-equalizer {
        min-height: 200px;
    }
}
