/**
 * Premium Glassmorphic Theme for Music Practice Tools
 */

/* Core Suite Containers */
.mpt-suite-container, 
.mpt-tool-container {
    background-color: #0d111d;
    background-image: radial-gradient(circle at 10% 20%, rgba(26, 32, 60, 0.6) 0%, rgba(13, 17, 29, 0.95) 90%);
    border-radius: 16px;
    padding: 24px;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    max-width: 1200px;
    margin: 20px auto;
}

/* Tabs Header */
.mpt-tabs-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.mpt-tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 10px 20px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mpt-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.15);
}

.mpt-tab-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.mpt-tab-panel {
    display: none;
}

.mpt-tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Layout Columns & Alignment */
.mpt-glass-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
}

@media (min-width: 900px) {
    .mpt-glass-layout {
        grid-template-columns: 360px minmax(0, 1fr) !important;
        gap: 50px !important;
        align-items: center !important;
    }
}

/* Left Image Column - Holds the giant instrument */
.mpt-image-column {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 250px;
}

.mpt-instrument-img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 380px !important;
    object-fit: contain !important;
    margin-bottom: 25px !important;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.75)) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.mpt-instrument-img:hover {
    transform: scale(1.04) translateY(-5px) !important;
}

.mpt-audio-status {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.mpt-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #eab308;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #eab308;
}

.mpt-pulse-dot.mpt-loaded {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

/* Right Controls Column */
.mpt-controls-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 25px !important;
    min-width: 0;
    width: 100%;
}

.mpt-header-section {
    margin-bottom: 10px;
}

/* Premium Music Academy Headers */
.mpt-tool-subtitle {
    display: block !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    color: #3b82f6 !important;
    letter-spacing: 0.18em !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
}

.mpt-tool-title {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 0 15px 0 !important;
    position: relative !important;
    display: inline-block !important;
    padding-bottom: 10px !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

.mpt-tool-title::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 60px !important;
    height: 4px !important;
    background: linear-gradient(90deg, #3b82f6, #60a5fa) !important;
    border-radius: 2px !important;
}

.mpt-desc {
    color: #94a3b8 !important;
    font-size: 14px !important;
    margin: 15px 0 0 0 !important;
    line-height: 1.5 !important;
}

/* Control Cards and Grids */
.mpt-control-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 20px !important;
}

.mpt-control-card {
    background: rgba(13, 17, 29, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px);
}

.mpt-control-card label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

/* Inputs and Buttons Styling */
.mpt-select {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    color: #f1f5f9 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 36px !important;
}

.mpt-select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.mpt-double-select {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}

.mpt-btn {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-width: auto !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: 1.2 !important;
}

.mpt-btn:hover:not(:disabled) {
    background: #334155 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-1px) !important;
}

.mpt-btn:active:not(:disabled) {
    transform: translateY(0) !important;
}

.mpt-btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

.mpt-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
}

.mpt-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35) !important;
}

.mpt-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2) !important;
}

.mpt-btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3) !important;
}

.mpt-btn-group {
    display: flex;
    align-items: center;
    background: #1e293b;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.mpt-btn-group .mpt-btn {
    border: none;
    border-radius: 0;
    flex: 1;
}

.mpt-display-val {
    flex: 1.5;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.mpt-slider {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    height: 6px !important;
    border-radius: 4px !important;
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    outline: none !important;
    margin: 12px 0 !important;
    padding: 0 !important;
}

.mpt-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #3b82f6 !important;
    cursor: pointer !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: 2px solid #ffffff !important;
}

.mpt-slider::-moz-range-thumb {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #3b82f6 !important;
    cursor: pointer !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: 2px solid #ffffff !important;
}

.mpt-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2) !important;
}

.mpt-slider::-moz-range-thumb:hover {
    transform: scale(1.2) !important;
}

.mpt-slider-val-group {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.mpt-slider-val {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #3b82f6 !important;
    white-space: nowrap !important;
    min-width: 60px !important;
}

/* VIRTUAL PIANO KEYBED */
.mpt-piano-keybed-wrapper {
    background: #090d16;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mpt-piano-keys {
    display: flex;
    position: relative;
    height: 180px;
    min-width: max-content;
}

.mpt-piano-key {
    cursor: pointer;
    position: relative;
    transition: background 0.1s ease, box-shadow 0.1s ease;
    user-select: none;
}

.white-key {
    width: 32px;
    height: 100%;
    background: linear-gradient(to bottom, #ffffff 0%, #e2e8f0 100%);
    border: 1px solid #94a3b8;
    border-radius: 0 0 4px 4px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 10px;
}

.white-key .key-label {
    color: #475569;
    font-size: 10px;
    font-weight: bold;
}

.white-key .kb-map-char {
    color: #94a3b8;
    font-size: 9px;
    margin-top: 2px;
}

.white-key.active {
    background: linear-gradient(to bottom, #cbd5e1 0%, #94a3b8 100%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.black-key {
    width: 20px;
    height: 60%;
    background: linear-gradient(to bottom, #1e293b 0%, #0f172a 100%);
    border: 1px solid #000;
    border-radius: 0 0 3px 3px;
    z-index: 2;
    margin-left: -10px;
    margin-right: -10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 5px;
}

.black-key .key-label {
    color: #cbd5e1;
    font-size: 8px;
    font-weight: bold;
}

.black-key .kb-map-char {
    color: #64748b;
    font-size: 8px;
    margin-top: 1px;
}

.black-key.active {
    background: linear-gradient(to bottom, #475569 0%, #334155 100%);
}

/* Piano Scale Highlights */
.mpt-piano-key.scale-highlight.white-key {
    background: linear-gradient(to bottom, #e0f2fe 0%, #bae6fd 100%);
    border-color: #38bdf8;
}

.mpt-piano-key.scale-highlight.black-key {
    background: linear-gradient(to bottom, #075985 0%, #0369a1 100%);
}

.mpt-piano-key.scale-root.white-key {
    background: linear-gradient(to bottom, #fef08a 0%, #fde047 100%);
    border-color: #eab308;
}

.mpt-piano-key.scale-root.black-key {
    background: linear-gradient(to bottom, #854d0e 0%, #a16207 100%);
}

/* METRONOME LIGHTS */
.mpt-metro-lights {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 10px 0;
}

.mpt-metro-light {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: bold;
    transition: all 0.05s ease;
}

.mpt-metro-light.active {
    background: #10b981;
    color: #fff;
    box-shadow: 0 0 20px #10b981;
    border-color: #10b981;
    transform: scale(1.1);
}

.mpt-metro-light.active.accent {
    background: #ef4444;
    box-shadow: 0 0 20px #ef4444;
    border-color: #ef4444;
}

/* TABLA SIMULATOR & RHYTHMIC CYCLE */
.mpt-visualizer-card {
    background: rgba(13, 17, 29, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 20px !important;
}

.mpt-visualizer-card h4 {
    margin: 0 0 16px 0 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

.mpt-tabla-cycle {
    display: grid !important;
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 10px !important;
}

@media (max-width: 600px) {
    .mpt-tabla-cycle {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

.mpt-beat-cell {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
    padding: 12px 6px !important;
    text-align: center !important;
    position: relative !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.mpt-beat-cell.active {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3) !important;
    transform: scale(1.05) !important;
}

.beat-num {
    font-size: 9px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin-bottom: 6px !important;
}

.beat-bol {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #f1f5f9 !important;
}

.beat-marker {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}

.marker-sam {
    background: #ef4444 !important; /* Red Sam */
}

.marker-khali {
    background: #3b82f6 !important; /* Blue Khali */
}

.marker-tali {
    background: #eab308 !important; /* Gold Tali */
}

/* MANUAL DRUM PADS */
.mpt-drum-pads-section {
    background: rgba(13, 17, 29, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 20px !important;
}

.mpt-drum-pads-section h4 {
    margin: 0 0 16px 0 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

.mpt-drum-pads {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 480px) {
    .mpt-drum-pads {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mpt-drum-pad {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 18px 15px !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    box-shadow: none !important;
    width: auto !important;
    min-width: auto !important;
}

.mpt-drum-pad:hover {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.mpt-drum-pad.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4) !important;
    transform: scale(0.96) !important;
}

.pad-label {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.2;
}

.pad-desc {
    font-size: 9px !important;
    color: #64748b !important;
    margin-top: 6px !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mpt-drum-pad.active .pad-desc {
    color: #bfdbfe !important;
}

/* =============================================
   TANPURA / SHRUTI BOX — MP3 Player UI
   All selectors scoped to #mpt-tool-tanpura for
   higher specificity to override WP themes.
   ============================================= */

/* Pattern Selection Section */
#mpt-tool-tanpura .mpt-tanpura-pattern-section {
    text-align: center;
}

#mpt-tool-tanpura .mpt-tanpura-label {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0 0 12px 0;
}

#mpt-tool-tanpura .mpt-tanpura-pattern-toggle {
    display: inline-flex !important;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 30px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    overflow: hidden;
    padding: 4px;
}

#mpt-tool-tanpura .mpt-pattern-btn {
    background: transparent !important;
    border: none !important;
    padding: 10px 24px !important;
    cursor: pointer;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.3s ease;
    color: #64748b !important;
    border-radius: 26px !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: 1.3;
    min-width: auto;
}

#mpt-tool-tanpura .mpt-pattern-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #94a3b8 !important;
}

#mpt-tool-tanpura .mpt-pattern-btn.active {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

#mpt-tool-tanpura .mpt-pattern-hindi {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

#mpt-tool-tanpura .mpt-pattern-eng {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* Scale Selection Grid (4x3) */
#mpt-tool-tanpura .mpt-tanpura-scale-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    max-width: 400px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

#mpt-tool-tanpura .mpt-scale-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    padding: 14px 8px !important;
    cursor: pointer;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    outline: none !important;
    box-shadow: none !important;
    line-height: 1.2;
    min-width: auto;
    width: auto;
    display: block;
}

#mpt-tool-tanpura .mpt-scale-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

#mpt-tool-tanpura .mpt-scale-btn.active {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Play / Pause Button */
#mpt-tool-tanpura .mpt-tanpura-play-section {
    display: flex !important;
    justify-content: center;
    margin: 15px 0;
}

#mpt-tool-tanpura .mpt-tanpura-play-btn {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    border-radius: 50% !important;
    border: none !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    font-size: 24px !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4), 0 0 0 4px rgba(245, 158, 11, 0.15) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none !important;
    padding: 0 !important;
    line-height: 1;
}

#mpt-tool-tanpura .mpt-tanpura-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(245, 158, 11, 0.5), 0 0 0 6px rgba(245, 158, 11, 0.2) !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

#mpt-tool-tanpura .mpt-tanpura-play-btn:active {
    transform: scale(0.96);
}

#mpt-tool-tanpura .mpt-tanpura-play-btn.playing {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4), 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
}

#mpt-tool-tanpura .mpt-tanpura-play-btn.playing:hover {
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.5), 0 0 0 6px rgba(59, 130, 246, 0.2) !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

#mpt-tool-tanpura .mpt-play-icon {
    line-height: 1;
    display: inline-block;
}

/* Volume Section */
#mpt-tool-tanpura .mpt-tanpura-volume-section {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
}

#mpt-tool-tanpura .mpt-tanpura-vol-label {
    font-size: 12px !important;
    font-weight: 700;
    color: #94a3b8 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    flex-shrink: 0;
}

#mpt-tool-tanpura .mpt-tanpura-vol-icon {
    font-size: 18px;
    flex-shrink: 0;
}

#mpt-tool-tanpura .mpt-tanpura-vol-slider {
    flex: 1 1 auto !important;
    max-width: 200px !important;
    min-width: 100px;
    margin: 0 !important;
}

#mpt-tool-tanpura .mpt-tanpura-vol-val {
    font-size: 14px !important;
    font-weight: 700;
    color: #3b82f6 !important;
    min-width: 40px;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Loading indicator */
#mpt-tool-tanpura .mpt-tanpura-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    font-size: 13px;
    color: #94a3b8;
}

#mpt-tool-tanpura .mpt-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: mptSpin 0.8s linear infinite;
    display: inline-block;
}

@keyframes mptSpin {
    to { transform: rotate(360deg); }
}

/* Tanpura header — stylized "Click Here To Play!" */
#mpt-tool-tanpura .mpt-header-section h2 {
    text-align: center;
    font-size: 26px;
    background: linear-gradient(to right, #818cf8, #94a3b8, #f1f5f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive: scale grid smaller on mobile */
@media (max-width: 480px) {
    #mpt-tool-tanpura .mpt-tanpura-scale-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    #mpt-tool-tanpura .mpt-scale-btn {
        padding: 10px 6px !important;
        font-size: 13px !important;
    }

    #mpt-tool-tanpura .mpt-tanpura-play-btn {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        min-height: 56px !important;
        font-size: 20px !important;
    }

    #mpt-tool-tanpura .mpt-tanpura-volume-section {
        flex-wrap: wrap !important;
        gap: 8px;
    }
}

/* Strum Vibration animations (kept for tabla/other instruments) */
.mpt-vibrate-line {
    animation: vibrateLine 0.8s ease-out;
}

.mpt-vibrate {
    animation: vibrateInstrument 0.3s infinite alternate;
}

.mpt-pulse-active {
    animation: pulseInstrument 0.15s ease-out;
}

/* General Layout helpers */
.mpt-action-row {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.mpt-play-btn {
    flex: 1.5;
}

.mpt-mt-10 {
    margin-top: 10px;
}

.mpt-tempo-setter {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100%;
}

.mpt-btn-mini {
    padding: 10px 14px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    height: 40px !important;
    line-height: 1 !important;
    flex: 1 1 auto;
}

.mpt-tap-btn {
    background: #475569 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    flex: 2 1 auto !important;
}

.mpt-number-input {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-align: center !important;
    width: 70px !important;
    height: 40px !important;
    padding: 5px !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

.mpt-number-input::-webkit-inner-spin-button,
.mpt-number-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes vibrateLine {
    0% { transform: scaleX(1); opacity: 1; }
    5% { transform: scaleX(2.5) translateX(-1px); opacity: 0.9; }
    10% { transform: scaleX(2.5) translateX(1px); }
    15% { transform: scaleX(2) translateX(-1px); }
    20% { transform: scaleX(2) translateX(1px); }
    30% { transform: scaleX(1.5) translateX(-0.5px); }
    40% { transform: scaleX(1.5) translateX(0.5px); }
    60% { transform: scaleX(1.2) translateX(0); }
    100% { transform: scaleX(1); }
}

@keyframes vibrateInstrument {
    0% { transform: rotate(-0.5deg) scale(1); }
    100% { transform: rotate(0.5deg) scale(1.01); }
}

@keyframes pulseInstrument {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Custom Checkbox */
.mpt-checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 13px;
    color: #f1f5f9;
    user-select: none;
}

.mpt-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.mpt-checkbox-container:hover input ~ .checkmark {
    background-color: #334155;
}

.mpt-checkbox-container input:checked ~ .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.mpt-checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.mpt-checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* =============================================
   VIRTUAL HARMONIUM — Spardha-Style Widget
   ============================================= */

/* Widget container */
.harm-widget {
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* "Click Here To Play !" prompt */
.harm-click-prompt {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #3b82f6 !important;
    text-decoration: underline !important;
    text-underline-offset: 4px;
    cursor: pointer;
    text-align: center;
    padding: 8px 0;
    transition: color 0.3s ease, transform 0.2s ease;
    font-style: italic;
}

.harm-click-prompt:hover {
    color: #60a5fa !important;
    transform: scale(1.03);
}

.harm-click-prompt.harm-unlocked {
    color: #10b981 !important;
    text-decoration: none !important;
    font-style: normal;
}

/* Volume row */
.harm-volume-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px;
    width: 100%;
    max-width: 380px;
    padding: 4px 0;
}

.harm-vol-text {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    white-space: nowrap;
}

.harm-vol-slider {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    flex: 1 !important;
    height: 8px !important;
    border-radius: 4px !important;
    background: linear-gradient(90deg, #1e40af 0%, #3b82f6 100%) !important;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
}

.harm-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #3b82f6 !important;
    cursor: pointer !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.5) !important;
}

.harm-vol-slider::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #3b82f6 !important;
    cursor: pointer !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.5) !important;
}

/* Harmonium Body - contains bellows, title, controls, keyboard */
.harm-body {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Bellows visual — wood texture with dot & X-line pattern */
.harm-bellows {
    height: 90px;
    position: relative;
    background:
        /* X-line pattern (forward diagonal) */
        repeating-linear-gradient(
            52deg,
            transparent,
            transparent 18px,
            rgba(40, 20, 5, 0.35) 18px,
            rgba(40, 20, 5, 0.35) 19.5px
        ),
        /* X-line pattern (backward diagonal) */
        repeating-linear-gradient(
            -52deg,
            transparent,
            transparent 18px,
            rgba(40, 20, 5, 0.35) 18px,
            rgba(40, 20, 5, 0.35) 19.5px
        ),
        /* Wood grain base */
        linear-gradient(
            90deg,
            #8B5E3C 0%, #a0703f 15%, #8B5E3C 30%,
            #9e6e3d 45%, #7a5232 60%, #a0703f 75%,
            #8B5E3C 90%, #9e6e3d 100%
        );
}

.harm-bellows::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, #3d1c08 6px, transparent 6px);
    background-size: 26px 26px;
    background-position: 6px 8px;
}

/* Red accent strip */
.harm-accent-strip {
    height: 6px;
    background: linear-gradient(90deg, #c0392b, #e74c3c, #c0392b);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

/* Title bar */
.harm-title-bar {
    background: linear-gradient(135deg, #2c1a0e 0%, #3d2415 50%, #2c1a0e 100%);
    text-align: center;
    padding: 12px 20px;
}

.harm-title-bar span {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #d4a04a !important;
    letter-spacing: 0.35em !important;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Controls bar */
.harm-controls-bar {
    background: #1a1a2e;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px;
    padding: 10px 20px;
    flex-wrap: wrap;
}

.harm-ctrl-group {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
}

/* Note toggle button */
.harm-note-toggle-btn {
    background: #2a2a3e !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    padding: 8px 20px !important;
    color: #e2e8f0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none !important;
    box-shadow: none !important;
    min-width: auto !important;
    line-height: 1.3;
    white-space: nowrap;
}

.harm-note-toggle-btn:hover {
    background: #3a3a50 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Octave display */
.harm-octave-display {
    background: #2a2a3e !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    padding: 8px 20px !important;
    color: #e2e8f0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-block;
    white-space: nowrap;
}

/* Arrow buttons */
.harm-arrow-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    font-size: 14px !important;
    color: #ffffff !important;
    transition: all 0.2s ease;
    outline: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    padding: 0 !important;
    line-height: 1;
}

.harm-arrow-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.harm-arrow-orange:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
}

.harm-arrow-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.harm-arrow-blue:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

/* Keyboard wrapper */
.harm-keyboard-wrapper {
    background: linear-gradient(180deg, #1c1208 0%, #100a04 100%);
    padding: 0 10px 14px;
    overflow-x: auto;
}

/* Keys container */
.mpt-harmonium-keys {
    display: flex;
    position: relative;
    height: 210px;
    min-width: max-content;
    justify-content: center;
}

/* Key base */
.harm-key {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background 0.06s ease, transform 0.06s ease, box-shadow 0.06s ease;
}

/* White key */
.harm-white {
    width: 46px;
    height: 100%;
    background: linear-gradient(180deg, #faf8f4 0%, #eae6dc 82%, #ddd8cc 100%);
    border: 1px solid #a09888;
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 10px;
    box-shadow: -1px 0 0 rgba(0,0,0,0.08), 1px 0 0 rgba(0,0,0,0.08), inset 0 -4px 6px rgba(0,0,0,0.04);
}

.harm-white .harm-label {
    color: #3d3428;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

.harm-white .harm-kb-hint {
    color: #b0a898;
    font-size: 9px;
    font-weight: 600;
    margin-top: 3px;
}

.harm-white.pressed {
    background: linear-gradient(180deg, #e8e4d8 0%, #d0cabe 82%, #c4bcae 100%) !important;
    transform: translateY(2px);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.12) !important;
}

/* Black key */
.harm-black {
    width: 30px;
    height: 60%;
    background: linear-gradient(180deg, #2c2218 0%, #1e1610 75%, #110c06 100%);
    border: 1px solid #0a0604;
    border-radius: 0 0 4px 4px;
    z-index: 2;
    margin-left: -15px;
    margin-right: -15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 8px;
    box-shadow:
        -2px 0 2px rgba(0,0,0,0.25),
        2px 0 2px rgba(0,0,0,0.25),
        0 4px 6px rgba(0,0,0,0.5);
}

.harm-black .harm-label {
    background: rgba(20, 14, 8, 0.85);
    color: #f0e6d2;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    line-height: 1.2;
    text-align: center;
    min-width: 20px;
}

.harm-black .harm-kb-hint {
    color: #706050;
    font-size: 8px;
    font-weight: 600;
    margin-top: 2px;
}

.harm-black.pressed {
    background: linear-gradient(180deg, #3e3228 0%, #2a2018 75%, #1a1208 100%) !important;
    transform: translateY(1px);
    box-shadow:
        -1px 0 1px rgba(0,0,0,0.2),
        1px 0 1px rgba(0,0,0,0.2),
        0 2px 3px rgba(0,0,0,0.4) !important;
}

.harm-black.pressed .harm-label {
    background: rgba(217, 119, 6, 0.85);
    color: #ffffff;
}

/* Audio status — reposition for harmonium */
.harm-widget .mpt-audio-status {
    margin-top: 4px;
}

/* Responsive adjustments */
@media (max-width: 700px) {
    .harm-white {
        width: 36px;
    }

    .harm-black {
        width: 24px;
        margin-left: -12px;
        margin-right: -12px;
    }

    .mpt-harmonium-keys {
        height: 180px;
    }

    .harm-bellows {
        height: 70px;
    }

    .harm-title-bar span {
        font-size: 13px !important;
        letter-spacing: 0.25em !important;
    }

    .harm-controls-bar {
        gap: 12px;
        padding: 8px 12px;
    }

    .harm-note-toggle-btn,
    .harm-octave-display {
        padding: 6px 14px !important;
        font-size: 12px !important;
    }

    .harm-arrow-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .harm-white {
        width: 28px;
    }

    .harm-black {
        width: 20px;
        margin-left: -10px;
        margin-right: -10px;
    }

    .harm-white .harm-label {
        font-size: 10px;
    }

    .harm-black .harm-label {
        font-size: 8px;
        padding: 2px 4px;
    }

    .mpt-harmonium-keys {
        height: 155px;
    }

    .harm-bellows {
        height: 55px;
    }

    .harm-click-prompt {
        font-size: 16px !important;
    }
}
