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

body {
    background: #0a0e14;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #1e2a3a;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.header-title {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1px;
}

.header-title span {
    color: #4a5568;
}

.header-bpm {
    font-size: 13px;
    color: #4a5568;
    letter-spacing: 1px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
}

.panel {
    padding: 0 20px;
}

.left-panel {
    border-right: 1px solid #1e2a3a;
}

.center-panel {
    border-right: 1px solid #1e2a3a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.section-title {
    font-size: 12px;
    color: #8b92a8;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.mood-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 10px;
}

.mood-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 8px;
    transition: background 0.2s;
}

.mood-item:hover {
    background: rgba(100, 255, 218, 0.03);
}

.mood-item.active {
    background: rgba(100, 255, 218, 0.05);
}

.mood-orb-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.mood-orb-ring {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.ring-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

.ring-dot.top {
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
}

.ring-dot.right {
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
}

.ring-dot.bottom {
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
}

.ring-dot.left {
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
}

.mood-orb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.mood-orb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px currentColor;
}

.calm-orb {
    background: radial-gradient(circle, rgba(150, 220, 255, 0.9) 0%, rgba(80, 160, 220, 0.6) 40%, rgba(30, 80, 140, 0.3) 70%, transparent 100%);
    color: #64c8ff;
    box-shadow: 0 0 20px rgba(100, 200, 255, 0.4);
}

.dream-orb {
    background: radial-gradient(circle, rgba(180, 170, 255, 0.9) 0%, rgba(120, 100, 200, 0.6) 40%, rgba(60, 50, 120, 0.3) 70%, transparent 100%);
    color: #9682ff;
    box-shadow: 0 0 20px rgba(150, 130, 255, 0.4);
}

.tension-orb {
    background: radial-gradient(circle, rgba(255, 130, 130, 0.9) 0%, rgba(200, 80, 80, 0.6) 40%, rgba(120, 40, 40, 0.3) 70%, transparent 100%);
    color: #ff6464;
    box-shadow: 0 0 20px rgba(255, 100, 100, 0.4);
}

.chaos-orb {
    background: radial-gradient(circle, rgba(255, 220, 150, 0.9) 0%, rgba(200, 160, 80, 0.6) 40%, rgba(120, 90, 40, 0.3) 70%, transparent 100%);
    color: #ffc864;
    box-shadow: 0 0 20px rgba(255, 200, 100, 0.4);
}

.mood-item.active .mood-orb-ring {
    border-color: rgba(100, 255, 218, 0.5);
}

.mood-name {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 3px;
    color: #fff;
    text-align: center;
}

.mood-desc {
    font-size: 10px;
    color: #4a5568;
    text-align: center;
    line-height: 1.3;
}

.divider-h {
    height: 1px;
    background: #1e2a3a;
    margin: 16px 0;
}

.balance-list {
    list-style: none;
}

.balance-list li {
    font-size: 12px;
    color: #8b92a8;
    margin-bottom: 8px;
    padding-left: 12px;
    position: relative;
}

.balance-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #64ffda;
}

.balance-list li span {
    color: #64ffda;
    font-family: 'Courier New', monospace;
}

/* Center Panel */
.waveform {
    position: absolute;
    top: 12px;
    left: 16px;
    z-index: 10;
}

.mode-label {
    position: absolute;
    top: 12px;
    right: 16px;
    text-align: right;
    z-index: 10;
}

.mode-id {
    font-size: 10px;
    color: #4a5568;
    letter-spacing: 1px;
}

.mode-name {
    font-size: 12px;
    color: #64ffda;
    margin-top: 2px;
}

.orb-container {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Right Panel - Sliders */
.sliders-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 40px;
}

.slider-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: lowercase;
    margin-bottom: 4px;
}

.slider-value {
    font-size: 13px;
    color: #9ca3af;
    font-family: 'Courier New', monospace;
    margin-bottom: 20px;
}

.slider-container {
    position: relative;
    width: 18px;
    height: 260px;
    cursor: pointer;
    touch-action: none;
    user-select: none;
}

.slider-track {
    position: absolute;
    width: 14px;
    height: 100%;
    background: linear-gradient(to bottom, #3a4a5a 0%, #4a6a8a 50%, #5a8ab5 100%);
    border-radius: 7px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.slider-track::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.slider-fill {
    position: absolute;
    width: 14px;
    background: transparent;
    border-radius: 7px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    transition: height 0.05s ease-out;
}

.slider-thumb {
    position: absolute;
    width: 20px;
    height: 28px;
    background: #e5e7eb;
    border-radius: 10px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: bottom 0.05s ease-out;
    pointer-events: none;
    z-index: 5;
}

.slider-container:hover .slider-thumb {
    background: #f3f4f6;
}

.slider-container.dragging .slider-thumb {
    background: #f3f4f6;
    box-shadow: 0 2px 10px rgba(100, 200, 255, 0.4);
}

.surprise-btn {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: 1px solid #4a5568;
    border-radius: 24px;
    color: #9ca3af;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.surprise-btn:hover {
    border-color: #64ffda;
    color: #64ffda;
    background: rgba(100, 255, 218, 0.05);
}

.surprise-icon {
    font-size: 15px;
}

.h-divider {
    height: 1px;
    background: #1e2a3a;
    margin: 16px 0 12px;
    flex-shrink: 0;
}

.keyboard {
    display: flex;
    gap: 8px;
    padding: 0 80px;
    justify-content: center;
    flex-shrink: 0;
}

.key {
    flex: 1;
    max-width: 100px;
    height: 180px;
    background: linear-gradient(180deg, #2a3040 0%, #3a5070 100%);
    border-radius: 12px 12px 8px 8px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 18px;
    cursor: pointer;
    transition: all 0.1s;
    user-select: none;
    border: 1px solid #1e2a3a;
}

.key span {
    font-size: 20px;
    font-weight: 300;
    color: #8b92a8;
}

.key.active {
    background: linear-gradient(180deg, #ffffff 0%, #c0d0e0 100%);
    border-color: #64ffda;
    transform: translateY(3px);
    box-shadow: 0 0 25px rgba(100, 255, 218, 0.4);
}

.key.active span {
    color: #0a0e14;
}

.footer {
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #1e2a3a;
    margin-top: 14px;
    font-size: 11px;
    color: #4a5568;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    flex-direction: column;
    gap: 15px;
}

.overlay h2 {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    color: #64ffda;
}

.overlay p {
    color: #4a5568;
    font-size: 13px;
}