/* ============================================================
   Kids Kingdom - Pro Harmonica
   Dark professional theme, split Blow/Draw cells (each hole is
   its own column with two directly-clickable cells stacked),
   realistic metal harmonica body, particle effects.
   ============================================================ */

.harm-wrap {
    --harm-bg:      #0a0f1e;
    --harm-surface: #111827;
    --harm-card:    #1a2035;
    --harm-border:  #2a3550;
    --harm-accent:  #3b82f6;
    --harm-gold:    #f59e0b;
    --harm-green:   #10b981;
    --harm-text:    #e2e8f0;
    --harm-muted:   #64748b;
    --blow-color:   #3b82f6;
    --draw-color:   #f59e0b;

    background: var(--harm-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 60px rgba(59,130,246,0.15);
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 30px auto;
}

/* ================= TOOLBAR ================= */
.harm-toolbar {
    background: var(--harm-surface);
    border-bottom: 1px solid var(--harm-border);
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.harm-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.harm-tab-btn {
    background: var(--harm-card);
    color: var(--harm-muted);
    border: 1px solid var(--harm-border);
    border-radius: 30px;
    padding: 7px 16px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.harm-tab-btn:hover,
.harm-tab-btn.active {
    background: var(--harm-accent);
    color: #fff;
    border-color: var(--harm-accent);
    box-shadow: 0 0 14px rgba(59,130,246,0.4);
}

.harm-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.harm-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
}

.harm-ctrl label {
    color: var(--harm-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.harm-ctrl select {
    background: var(--harm-card);
    color: var(--harm-text);
    border: 1px solid var(--harm-border);
    border-radius: 8px;
    padding: 6px 10px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

.harm-ctrl input[type="range"] {
    width: 80px;
    accent-color: var(--harm-accent);
}

.harm-toggle {
    background: var(--harm-card);
    color: var(--harm-muted);
    border: 1px solid var(--harm-border);
    border-radius: 8px;
    padding: 6px 14px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.harm-toggle.active { color: #fff; }
.harm-toggle.blow.active { background: var(--blow-color); border-color: var(--blow-color); }
.harm-toggle.draw.active { background: var(--draw-color); border-color: var(--draw-color); color: #000; }

.harm-metro-btn {
    background: var(--harm-card);
    color: var(--harm-muted);
    border: 1px solid var(--harm-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.harm-metro-btn.active {
    background: var(--harm-green);
    color: #000;
    border-color: var(--harm-green);
}

/* ================= SONGS PANEL ================= */
.harm-songs-panel {
    display: none;
    padding: 14px 18px;
    border-bottom: 1px solid var(--harm-border);
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.harm-songs-panel.active { display: flex; }

.harm-song-cat {
    color: var(--harm-muted);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    background: var(--harm-surface);
    border-radius: 20px;
    border: 1px solid var(--harm-border);
    width: 100%;
}

.harm-song-btn {
    background: var(--harm-card);
    color: var(--harm-text);
    border: 1px solid var(--harm-border);
    border-radius: 20px;
    padding: 7px 16px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.harm-song-btn:hover {
    border-color: var(--harm-accent);
    color: var(--harm-accent);
}

.harm-song-btn.playing {
    background: var(--harm-accent);
    color: #fff;
    border-color: var(--harm-accent);
}

/* ================= HARMONICA BODY ================= */
.harm-body-wrap {
    padding: 24px 18px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.harm-tab-row {
    display: flex;
    gap: 0;
    margin-bottom: 8px;
    min-width: 560px;
}

.harm-tab-cell {
    flex: 1;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--harm-muted);
    padding: 4px 2px;
}

.harm-tab-cell.blow-flash { color: var(--blow-color); }
.harm-tab-cell.draw-flash { color: var(--draw-color); }

.harm-body {
    display: flex;
    min-width: 560px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6), inset 0 2px 4px rgba(255,255,255,0.05);
    border: 2px solid #334155;
    background: linear-gradient(180deg, #2d3a4a 0%, #1e2a38 50%, #2d3a4a 100%);
}

.harm-hole-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.harm-hole-col:last-child { border-right: none; }

.harm-hole-num {
    background: rgba(0,0,0,0.4);
    color: var(--harm-muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    padding: 5px 2px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.harm-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    transition: all 0.12s;
    position: relative;
    min-height: 68px;
}

.harm-cell.blow-cell {
    background: linear-gradient(180deg, rgba(59,130,246,0.08) 0%, rgba(59,130,246,0.04) 100%);
    border-bottom: 1px solid rgba(59,130,246,0.1);
}

.harm-cell.draw-cell {
    background: linear-gradient(180deg, rgba(245,158,11,0.04) 0%, rgba(245,158,11,0.08) 100%);
}

.harm-cell.blow-cell:hover { background: rgba(59,130,246,0.2); }
.harm-cell.draw-cell:hover { background: rgba(245,158,11,0.2); }

.harm-cell.blow-cell.is-active {
    background: rgba(59,130,246,0.5);
    box-shadow: inset 0 0 20px rgba(59,130,246,0.4);
    transform: scale(0.97);
}

.harm-cell.draw-cell.is-active {
    background: rgba(245,158,11,0.5);
    box-shadow: inset 0 0 20px rgba(245,158,11,0.4);
    transform: scale(0.97);
}

.harm-cell-note {
    font-size: 0.72rem;
    font-weight: 800;
}

.harm-cell.blow-cell .harm-cell-note { color: var(--blow-color); }
.harm-cell.draw-cell .harm-cell-note { color: var(--draw-color); }
.harm-cell.is-active .harm-cell-note { color: #fff; }

.harm-cell-arrow {
    font-size: 0.78rem;
    opacity: 0.55;
}

.harm-cell.blow-cell .harm-cell-arrow { color: var(--blow-color); }
.harm-cell.draw-cell .harm-cell-arrow { color: var(--draw-color); }

.harm-key-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 12px 18px 18px;
    color: var(--harm-muted);
    font-size: 0.75rem;
}

/* Scrollbar for the harmonica body wrap (only appears on very narrow screens) */
.harm-body-wrap::-webkit-scrollbar { height: 4px; }
.harm-body-wrap::-webkit-scrollbar-track { background: var(--harm-surface); }
.harm-body-wrap::-webkit-scrollbar-thumb { background: var(--harm-border); border-radius: 2px; }

/* ================= PARTICLE CANVAS ================= */
.harm-particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .harm-toolbar { padding: 10px 14px; }
    .harm-tab-btn { padding: 6px 12px; font-size: 0.78rem; }
    .harm-body-wrap { padding: 16px 10px 8px; }
    .harm-body { min-width: 460px; }
    .harm-tab-row { min-width: 460px; }
    .harm-cell { min-height: 56px; padding: 7px 2px; }
    .harm-cell-note { font-size: 0.65rem; }
}

@media (max-width: 480px) {
    .harm-body { min-width: 380px; }
    .harm-tab-row { min-width: 380px; }
    .harm-cell { min-height: 48px; }
    .harm-cell-note { font-size: 0.6rem; }
    .harm-hole-num { font-size: 0.62rem; }
}
