:root {
    --bg-deep: #0f172a;        
    --bg-panel: rgba(30, 41, 59, 0.85); 
    --text-main: #f8fafc;      
    --text-sub: #94a3b8;       
    --primary: #38bdf8;        
    --primary-hover: #0ea5e9;
    --accent: #f59e0b;         
    --border-color: rgba(255, 255, 255, 0.15);
}

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(circle at center, #1e293b 0%, #020617 100%);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-header {
    height: 54px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between; 
    padding: 0 20px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo { 
    font-size: 18px; 
    font-weight: 700; 
    color: #fff; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    width: 200px; 
}

.nav-links { 
    display: flex; 
    gap: 30px; 
    flex: 1; 
    justify-content: center; 
}

.nav-links a { 
    color: var(--text-sub); 
    text-decoration: none; 
    font-size: 14px; 
    font-weight: 600; 
    transition: 0.2s; 
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-links a:hover, .nav-links a.active { 
    color: var(--primary); 
    background: rgba(255,255,255,0.05); 
}

.mobile-menu-btn { 
    display: none; 
    color: #fff; 
    font-size: 22px; 
    cursor: pointer; 
    padding: 10px; 
}

.main-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.stage-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
        radial-gradient(white, rgba(255,255,255,.1) 1px, transparent 2px);
    background-size: 400px 400px, 250px 250px;
    background-position: 0 0, 120px 150px;
}

.panel-area {
    width: 400px;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 10;
    scrollbar-width: none;
}
.panel-area::-webkit-scrollbar { display: none; }

.control-group { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.control-group label { 
    font-size: 11px; 
    font-weight: 700; 
    color: var(--text-sub); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

select, .mini-select {
    width: 100%; 
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff; 
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat; 
    background-position: right 10px center; 
    background-size: 14px;
    outline: none; 
    cursor: pointer; 
    transition: 0.2s;
}
select:hover { border-color: var(--primary); }
option { background: #1e293b; }

.mode-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.toggle-group { 
    background: rgba(0,0,0,0.3); 
    border-radius: 4px; 
    padding: 2px; 
    display: flex; 
}
.toggle-btn { 
    background: transparent; 
    border: none; 
    color: var(--text-sub); 
    padding: 4px 12px; 
    font-size: 11px; 
    cursor: pointer; 
    border-radius: 3px; 
    font-weight: 600; 
}
.toggle-btn.active { 
    background: var(--primary); 
    color: #000; 
}

.result-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex; 
    flex-direction: column; 
    gap: 10px;
}
.arp-toolbar { display: flex; gap: 8px; }
.mini-select { height: 36px; padding: 0 10px 0 10px; font-size: 12px; }

.btn-play {
    background: var(--primary); 
    color: #000; 
    border: none;
    border-radius: 6px; 
    padding: 0 15px; 
    font-weight: 700; 
    height: 36px;
    cursor: pointer; 
    transition: 0.2s; 
    font-size: 12px; 
    flex-shrink: 0;
    min-width: 70px;
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.btn-play:hover { background: #7dd3fc; transform: translateY(-1px); }
.btn-play.playing { background: #ef4444; color: #fff; }

.notes-preview {
    font-family: 'Consolas', monospace; 
    color: var(--accent);
    font-size: 13px; 
    text-align: center; 
    padding: 8px;
    background: rgba(0,0,0,0.3); 
    border-radius: 4px; 
    line-height: 1.4;
}

.chords-section-wrapper { 
    margin-top: 5px; 
    border-top: 1px dashed var(--border-color); 
    padding-top: 8px; 
}
.toggle-link { 
    background: none; 
    border: none; 
    color: var(--primary); 
    font-size: 12px; 
    font-weight: 600; 
    cursor: pointer; 
    width: 100%; 
    text-align: left; 
    opacity: 0.8; 
}
.toggle-link:hover { opacity: 1; text-decoration: underline; }

.chords-container { display: none; padding-top: 8px; }

.chord-row { 
    display: flex; 
    align-items: center; 
    margin-bottom: 6px; 
}
.chord-label { 
    width: 45px; 
    font-size: 10px; 
    color: var(--text-sub); 
    font-weight: bold; 
    text-transform: uppercase; 
    flex-shrink: 0; 
}
.chord-tags { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }

.chord-tag {
    background: rgba(56, 189, 248, 0.1); 
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 4px; 
    padding: 2px 8px; 
    font-size: 11px; 
    font-weight: 600;
    cursor: pointer; 
    transition: 0.1s; 
    font-family: 'Consolas', monospace;
}
.chord-tag:hover { background: var(--primary); color: #000; }
.chord-empty { font-size: 11px; color: var(--text-sub); font-style: italic; }

.drum-rim {
    width: 500px; 
    height: 500px; 
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #e0c070 0%, #b8860b 20%, #8b4513 55%, #2a1b0e 95%);
  
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.8),
        0 15px 25px rgba(0,0,0,0.5),
        inset 0 5px 15px rgba(255,255,255,0.2),
        inset 0 -5px 15px rgba(0,0,0,0.3);
    position: relative;
    display: flex; 
    justify-content: center; 
    align-items: center;
    transition: transform 0.3s ease-out;
}
.drum-face {
    position: absolute; 
    inset: 12px; 
    border-radius: 50%;
  
    background-image: url('../img/bg.png');
    background-size: cover; 
    opacity: 0.9;
    
    box-shadow: inset 0 0 80px rgba(0,0,0,0.95);
}

.i-note {
    position: absolute; 
    width: 66px; 
    height: 66px;
    border-radius: 50%;
    background: rgba(30, 20, 10, 0.65);
    border: 1px solid rgba(255, 215, 0, 0.25);
    
    box-shadow: 0 5px 15px rgba(0,0,0,0.6), inset 0 2px 5px rgba(255,255,255,0.1);
    color: #f1f5f9; 
    font-weight: 700; 
    font-size: 15px;
    display: flex; 
    justify-content: center; 
    align-items: center;
    cursor: pointer; 
    z-index: 20;
    will-change: transform;
    transform: translate(-50%, -50%); 
    transition: transform 0.1s ease-out, background 0.1s;
    -webkit-tap-highlight-color: transparent;
}
.i-note.center-note { 
    width: 96px; 
    height: 96px; 
    background: rgba(40, 30, 20, 0.5); 
    font-size: 19px; 
}

.i-note:hover { 
    border-color: var(--primary); 
    transform: translate(-50%, -50%) scale(1.1); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.7), inset 0 2px 10px rgba(255,255,255,0.2);
}

.i-note.active {
    border-radius: 50% !important; 
    background: #fff !important;
    color: #000;
    box-shadow: 0 0 30px #fff, 0 0 60px var(--primary);
    transform: translate(-50%, -50%) scale(0.95);
    border-color: #fff;
    z-index: 30;
}

.note-index { 
    position: absolute; 
    bottom: 4px; 
    font-size: 9px; 
    color: rgba(255,255,255,0.3); 
    pointer-events: none; 
}

.info-bar { 
    margin-top: auto; 
    font-size: 12px; 
    color: var(--text-sub); 
    text-align: center; 
    display: none; 
}

.matrix-container { margin-top: 20px; }
.matrix-grid { 
    display: grid; 
    grid-template-columns: repeat(12, 1fr); 
    gap: 4px; 
    margin-top: 10px; 
}
.octave-title { 
    grid-column: span 12; 
    font-size: 10px; 
    color: var(--text-sub); 
    margin-top: 10px; 
    font-weight: bold; 
}
.note-btn { 
    aspect-ratio: 1; 
    border: 1px solid #334155; 
    background: #1e293b; 
    color: #64748b; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 9px; 
    cursor: pointer; 
    border-radius: 4px; 
}
.note-btn.available { 
    color: #fff; 
    border-color: #475569; 
}
.note-btn.selected { 
    background: var(--primary); 
    color: #000; 
    border-color: var(--primary); 
}