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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

header {
    background: #16213e;
    padding: 15px 20px;
    border-bottom: 2px solid #0f3460;
}

header h1 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #e94560;
}

#connection-panel {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#ws-url {
    background: #0f3460;
    border: 1px solid #533483;
    color: #eee;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 250px;
}

#btn-connect {
    background: #e94560;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#btn-connect:hover {
    background: #c73e54;
}

#btn-connect.connected {
    background: #4caf50;
}

#status {
    font-size: 0.85rem;
    color: #e94560;
    font-weight: bold;
}

#status.connected {
    color: #4caf50;
}

main {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    main {
        grid-template-columns: 1fr;
    }
}

section {
    background: #16213e;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #0f3460;
}

h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #e94560;
}

#pattern-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

#pattern-select {
    background: #0f3460;
    color: #eee;
    border: 1px solid #533483;
    padding: 8px;
    border-radius: 4px;
    flex: 1;
    min-width: 150px;
}

#pattern-controls button {
    background: #533483;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#pattern-controls button:hover {
    background: #6a4c9c;
}

#pattern-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#btn-soft {
    background: #e94560 !important;
    touch-action: none;
}

#pattern-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-group {
    background: #0f3460;
    padding: 12px;
    border-radius: 6px;
}

.option-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #aaa;
}

.option-group input[type="range"] {
    width: 100%;
    accent-color: #e94560;
}

.option-group .range-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
}

.option-group .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-group .radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: normal;
    cursor: pointer;
    font-size: 0.85rem;
    color: #eee;
}

#power-channels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    text-align: center;
}

.channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.channel label {
    font-weight: bold;
    font-size: 0.85rem;
}

.bar-container {
    border: 1px solid #e94560;
    border-radius: 4px;
    overflow: hidden;
}

.power-bar {
    display: block;
    background: #000;
}

.power-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    height: 80px;
    width: 24px;
    accent-color: #e94560;
}

.power-label {
    font-size: 0.75rem;
    color: #aaa;
}
