:root {
    --bg-color: #f0f7ff;
    --card-bg: #ffffff;
    --primary: #4a90e2;
    --secondary: #9b59b6;
    --success: #2ecc71;
    --error: #ff7675;
    --text: #2c3e50;
    --border-light: #eef2f7;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-color);
    margin: 0; 
    overflow: hidden;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh;
}

/* View Controllers */
.screen { 
    display: none; 
    width: 95%; 
    max-width: 900px; 
    text-align: center; 
}
.active-screen { 
    display: block; 
    animation: fadeIn 0.4s ease-out; 
}
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* Top Navigation Tabs */
.mode-selector { 
    margin-bottom: 25px; 
    background: #e0eafc; 
    padding: 5px; 
    border-radius: 30px; 
    display: inline-flex; 
}
.mode-btn { 
    padding: 10px 30px; 
    border-radius: 25px; 
    border: none; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.3s; 
    background: transparent; 
    color: #7f8c8d; 
    font-size: 15px;
}
.mode-btn.active { 
    background: var(--primary); 
    color: white; 
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3); 
}

/* Dashboard & Grid Views */
#list-screen { 
    background: var(--card-bg); 
    padding: 30px; 
    border-radius: 40px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.08); 
}
.view-container {
    display: none;
    padding: 10px 20px;
}
.view-container.active-view {
    display: block;
}

/* Training Card Styles */
.training-card { 
    background: #fff; 
    border: 3px dashed var(--secondary); 
    border-radius: 30px; 
    padding: 40px; 
    cursor: pointer; 
    transition: 0.3s; 
    margin-top: 15px;
}
.training-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); 
    background: #fdfaf7;
}

/* Songs Grid Styles */
.song-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 15px; 
    margin-top: 15px; 
    max-height: 400px; 
    overflow-y: auto; 
    padding: 10px; 
}
.song-card { 
    background: #f8fbff; 
    border: 2px solid var(--border-light); 
    padding: 20px 15px; 
    border-radius: 20px; 
    cursor: pointer; 
    transition: 0.2s; 
}
.song-card:hover { 
    border-color: var(--primary); 
    transform: scale(1.03); 
    background: #fff; 
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}
.song-card h3 { 
    margin: 0 0 10px 0; 
    font-size: 16px; 
    color: var(--text); 
}
.song-card span { 
    font-size: 12px; 
    color: #95a5a6; 
    border: 1px solid #ddd; 
    padding: 3px 10px; 
    border-radius: 12px; 
}

/* Main Game/Practice View */
#game-card { 
    background: var(--card-bg); 
    padding: 30px; 
    border-radius: 40px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.08); 
    position: relative; 
}

.header-section {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 20px;
}
#game-title {
    margin: 0; 
    color: var(--text);
    font-size: 24px;
}

/* Staff / Sheet Music Canvas */
#staff-viewport {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #fff;
    border-radius: 20px;
    border: 2px solid var(--border-light);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}
#target-line { 
    position: absolute; 
    left: 150px; 
    top: 0; 
    bottom: 0; 
    width: 3px; 
    background: var(--error); 
    z-index: 10; 
    box-shadow: 0 0 8px var(--error); 
    opacity: 0.8;
}
#staff-canvas {
    position: absolute; 
    left: 0; 
    top: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Visual Guitar Fretboard Hint */
#hint-tab-card {
    display: none;
    margin: 10px auto 15px auto;
    padding: 15px;
    background: #fff;
    border-radius: 20px;
    border: 2px solid #ffeaa7;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    max-width: 480px;
    animation: fadeIn 0.3s ease-out;
}
#hint-tab-card p {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #d63031;
}
#fretboard-canvas {
    background: #fdfaf7;
    border-radius: 10px;
    border: 1px solid #f1f2f6;
}

/* Text Prompts and UI Controls */
#hint-msg { 
    font-size: 24px; 
    font-weight: 800; 
    color: var(--primary); 
    margin: 10px 0 15px 0; 
    min-height: 35px; 
}

.controls { 
    display: flex; 
    gap: 12px; 
    justify-content: center; 
    flex-wrap: wrap;
}
button.action-btn { 
    padding: 14px 30px; 
    font-size: 16px; 
    border-radius: 50px; 
    border: none; 
    cursor: pointer; 
    font-weight: bold; 
    transition: all 0.2s; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
button.action-btn:hover:not(:disabled) { transform: scale(1.04); }
button.action-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-back { background: #95a5a6; color: white; }
.btn-listen { background: var(--secondary); color: white; }
.btn-start { background: var(--primary); color: white; }
.btn-replay { background: var(--success); color: white; display: none; }