/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Sidebar menu không có dấu gạch đầu dòng */
.lessons-sidebar ul {
    list-style: none;
    padding-left: 0;
}
.lessons-sidebar li {
    margin-bottom: 6px;
}

/* Sidebar Link Styles */
.sidebar-link {
    display: block;
    padding: 10px 16px;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    font-size: 1.08rem;
    margin-bottom: 4px;
    cursor: pointer;
}
.sidebar-link:hover, .sidebar-link.active {
    background: #3498db;
    color: #fff;
}

/* Main Content */
main {
    padding: 2rem;
}

#hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    margin-bottom: 3rem;
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Content Sections */
.content-section {
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 2rem;
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2.5rem;
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateX(10px);
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 500px;
}

/* Buttons */
.interactive-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 200px;
}

.interactive-btn:hover {
    background-color: #2980b9;
    transform: translateX(5px);
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Interactive Elements */
.note-display, .scale-display, .chord-display {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.note-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.note-btn {
    padding: 0.5rem;
    border: 1px solid #1a237e;
    background-color: white;
    color: #1a237e;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.note-btn:hover {
    background-color: #1a237e;
    color: white;
}

.play-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    margin: 1rem 0;
    transition: background-color 0.3s ease;
}

.play-btn:hover {
    background-color: #27ae60;
}

.close-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: #c0392b;
}

/* Lesson Content */
.lesson-content {
    display: block;
    opacity: 1;
    padding: 20px 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;

}

.lesson-content h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
}

.lesson-content ul {
    padding-left: 24px;
}

.lesson-content h4 {
    color: #2c3e50;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.lesson-points {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.lesson-points h4 {
    color: #2c3e50;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.lesson-points p {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.lesson-points ul {
    list-style-position: inside;
    padding-left: 24px;
}

.lesson-points li {
    margin-bottom: 0.8rem;
    color: #2c3e50;
    line-height: 1.6;
}

/* Staff Examples */
.staff-example, .ledger-lines-example {
    position: relative;
    height: 150px;
    margin: 2rem 0;
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.staff-lines {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 100px;
}

.staff-lines::before,
.staff-lines::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #333;
}

.staff-lines::before {
    top: 0;
}

.staff-lines::after {
    bottom: 0;
}

.staff-lines::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #333;
    top: 25%;
}

.staff-lines::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #333;
    bottom: 25%;
}

.staff-lines::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #333;
    top: 50%;
}

.note {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #3498db;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    left: 50%;
    transform: translateX(-50%);
}

.ledger-notes .note {
    background-color: #e74c3c;
}

/* Scale Example */
.scale-example {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scale-example h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.scale-image {
    margin: 2rem 0;
    text-align: center;
}

.scale-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Scale Example with Staff */
.scale-example-with-staff {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scale-example-with-staff h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.staff-container {
    margin: 2rem 0;
    position: relative;
    padding: 2rem 0;
}

.staff-lines {
    height: 64px;
    position: relative;
    margin: 2rem 1rem;
    background: repeating-linear-gradient(
        to bottom,
        #000,
        #000 1px,
        transparent 1px,
        transparent 16px
    );
}

.treble-clef {
    position: absolute;
    left: 0;
    top: -20px;
    width: 40px;
    height: 100px;
    background: url('images/treble-clef.svg') no-repeat;
    background-size: contain;
}

.notes {
    position: absolute;
    top: 0;
    left: 60px;
    right: 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notes .note {
    width: 20px;
    height: 28px;
    background: #000;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(-20deg);
    position: relative;
}

/* Position each note on the staff */
.note.c4 { top: 32px; }
.note.d4 { top: 24px; }
.note.e4 { top: 16px; }
.note.f4 { top: 8px; }
.note.g4 { top: 0px; }
.note.a4 { top: -8px; }
.note.b4 { top: -16px; }
.note.c5 { top: -24px; }

.note-names, .note-names-vi {
    display: flex;
    justify-content: space-between;
    padding: 0 60px 0 80px;
    margin-top: 1rem;
}

.note-names span, .note-names-vi span {
    font-weight: bold;
    color: #2c3e50;
}

.note-names-vi {
    color: #666;
}

/* Scale Interactive Styles */
.scale-interactive {
    margin: 20px 0;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow-x: auto;
}

.scale-notes {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 320px;
}

.scale-note {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 2px solid #2196f3;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    color: #2196f3;
    font-size: 14px;
}

.scale-note:hover {
    background-color: #e3f2fd;
    transform: scale(1.1);
}

.scale-note.active {
    background-color: #2196f3;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.6);
}

.scale-note::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.8) 0%, rgba(33, 150, 243, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scale-note.active::after {
    opacity: 1;
}

.play-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.play-controls button {
    padding: 8px 16px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.play-controls button:hover {
    background-color: #1976d2;
}

.play-controls button:active {
    background-color: #1565c0;
}

/* Media query for small screens */
@media screen and (max-width: 480px) {
    .scale-notes {
        padding: 10px;
    }
    
    .scale-note {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 12px;
    }
    
    .play-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .play-controls button {
        width: 100%;
        max-width: 200px;
    }
}

/* Clef Examples */
.clef-example {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.clef-image {
    text-align: center;
    margin-bottom: 2rem;
}

.clef-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.clef-notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.clef-note {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.clef-note h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.clef-note p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Media query for small screens */
@media screen and (max-width: 600px) {
    .clef-notes {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Main Container */
.main-container {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Content Area */
.content-area {
    flex: 1;
    min-width: 0;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Lessons Sidebar */
.lessons-sidebar {
    width: 300px;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.lessons-sidebar h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.lesson-category {
    margin-bottom: 1rem;
}

.lesson-category h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 0rem;
}

.lessons-list ul {
    list-style: none;
    padding-left: 1rem;
}

.lessons-list li {
    transition: background-color 0.2s;
    margin-bottom: 0rem;
}



/* Piano Example */
.piano-example {
    margin: 2rem 0;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.piano-keys {
    display: flex;
    justify-content: center;
    gap: 2px;
    position: relative;
    height: 150px;
}

.white-key {
    width: 40px;
    height: 100%;
    background: white;
    border: 1px solid #ddd;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
    font-weight: bold;
    color: #333;
}

.black-key {
    width: 30px;
    height: 60%;
    background: #333;
    color: white;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
    font-weight: bold;
    position: absolute;
    margin-left: -15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    #hero h1 {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .interactive-btn {
        min-width: 180px;
    }
    
    .staff-example, .ledger-lines-example {
        height: 120px;
    }
    
    .note {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }

    .main-container {
        flex-direction: column;
        padding: 1rem;
    }

    .lessons-sidebar {
        width: 100%;
        position: static;
    }

    .content-area {
        margin-top: 1rem;
    }
}

/* Mobile Responsive Sidebar */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .lessons-sidebar {
        width: 100%;
        position: relative;
        padding: 0;
        margin-bottom: 1rem;
        transition: all 0.3s ease;
    }

    .lessons-sidebar h2 {
        padding: 1rem;
        margin: 0;
        background: linear-gradient(135deg, #2c3e50, #3498db);
        color: white;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: background 0.3s ease;
    }

    .lessons-sidebar h2:hover {
        background: linear-gradient(135deg, #243747, #2980b9);
    }

    .lessons-sidebar h2::after {
        content: '▼';
        font-size: 0.8em;
        transition: transform 0.3s ease;
    }

    .lessons-sidebar.collapsed h2::after {
        transform: rotate(-90deg);
    }

    .lessons-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        background: white;
    }

    .lessons-sidebar:not(.collapsed) .lessons-list {
        max-height: 1000px;
        border: 1px solid #ddd;
        border-top: none;
    }

    .lessons-sidebar.lesson-selected .lessons-list {
        max-height: 0;
    }

    .lessons-sidebar.lesson-selected h2 {
        background: linear-gradient(135deg, #2c3e50, #3498db);
    }

    .lesson-category {
        padding: 0.5rem 1rem;
    }

    .lesson-category h3 {
        margin: 0.5rem 0;
    }
}

/* Key Signature Styles */
.key-signature-example {
    margin: 2rem 0;
    text-align: center;
}

.key-signature-circle {
    margin: 3rem 0;
    text-align: center;
}

.key-signature-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.key-signature-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.key-signature-table th,
.key-signature-table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid #eee;
}

.key-signature-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

.key-signature-table tr:hover {
    background-color: #f8f9fa;
}

.key-signature-quiz {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.key-signature-display {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.quiz-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.quiz-btn:hover {
    background-color: #45a049;
}

.feedback-message {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

.feedback-message.correct {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.feedback-message.incorrect {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Theory Image */
.theory-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lessons-list li a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.lessons-list li a:hover,
.lessons-list li a.active {
    background: #3498db;
    color: #fff;
}/* Key Signature Styles */
.key-signature-example {
    margin: 2rem 0;
    text-align: center;
}

.key-signature-circle {
    margin: 3rem 0;
    text-align: center;
}

.key-signature-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.key-signature-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.key-signature-table th,
.key-signature-table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid #eee;
}

.key-signature-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

.key-signature-table tr:hover {
    background-color: #f8f9fa;
}

.key-signature-quiz {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.key-signature-display {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.quiz-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.quiz-btn:hover {
    background-color: #45a049;
}

.feedback-message {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

.feedback-message.correct {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.feedback-message.incorrect {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Theory Image */
.theory-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Rhythm lesson specific buttons */
.play-rhythm-btn, 
.play-pattern-btn, 
.play-meter-btn, 
.play-note-btn,
.stop-scale-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 16px;
    margin: 8px 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.play-rhythm-btn:hover, 
.play-pattern-btn:hover, 
.play-meter-btn:hover, 
.play-note-btn:hover,
.stop-scale-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.play-rhythm-btn:active, 
.play-pattern-btn:active, 
.play-meter-btn:active, 
.play-note-btn:active,
.stop-scale-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Playing state for rhythm buttons */
.play-rhythm-btn.playing, 
.play-meter-btn.playing {
    background-color: #e74c3c;
}

.play-rhythm-btn.playing:hover, 
.play-meter-btn.playing:hover {
    background-color: #c0392b;
}

/* Add ripple effect on click */
.play-rhythm-btn::after, 
.play-pattern-btn::after, 
.play-meter-btn::after, 
.play-note-btn::after,
.stop-scale-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.8s;
}

.play-rhythm-btn:active::after, 
.play-pattern-btn:active::after, 
.play-meter-btn:active::after, 
.play-note-btn:active::after,
.stop-scale-btn:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Metronome controls */
.metronome-controls {
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.metronome-controls label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

/* Slider styles */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #dfe6e9;
    outline: none;
    transition: background 0.2s;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.slider::-moz-range-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

/* Rhythm pattern displays */
.rhythm-pattern {
    display: flex;
    justify-content: center;
    margin: 15px 0;
    gap: 12px;
}

.beat {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.beat.active {
    background-color: #3498db;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

/* Rhythm pattern images */
.rhythm-pattern-image, 
.rhythm-image, 
.time-sig-example,
.time-sig-image,
.dotted-note-image,
.tie-image,
.beam-image {
    margin: 20px 0;
    text-align: center;
}

.rhythm-pattern-image img,
.rhythm-image img,
.time-sig-example img,
.time-sig-image img,
.dotted-note-image img,
.tie-image img,
.beam-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Rhythm interactive sections */
.rhythm-interactive {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.rhythm-interactive h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.rhythm-exercise, 
.meter-practice, 
.duration-exercise {
    margin: 15px 0;
}

/* Note duration tables */
.note-duration-table, 
.rest-table {
    margin: 20px 0;
    width: 100%;
    border-collapse: collapse;
}

.note-duration-table table, 
.rest-table table {
    width: 100%;
    border-collapse: collapse;
}

.note-duration-table th, 
.note-duration-table td,
.rest-table th, 
.rest-table td {
    border: 1px solid #e0e0e0;
    padding: 10px;
    text-align: center;
}

.note-duration-table th, 
.rest-table th {
    background-color: #f2f6f9;
    color: #2c3e50;
    font-weight: 600;
}

.note-duration-table tr:hover, 
.rest-table tr:hover {
    background-color: #f8f9fa;
}

.note-image, 
.rest-image {
    height: 40px;
    display: inline-block;
    vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rhythm-pattern {
        flex-wrap: wrap;
    }
    
    .beat {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .play-rhythm-btn, 
    .play-pattern-btn, 
    .play-meter-btn, 
    .play-note-btn,
    .stop-scale-btn {
        width: 100%;
        margin: 8px 0;
    }
    
    .meter-practice {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .meter-practice button {
        width: 100%;
        margin: 4px 0;
    }
}

@media (max-width: 480px) {
    .meter-practice {
        grid-template-columns: 1fr;
    }
    
    .note-duration-table, 
    .rest-table {
        font-size: 0.9rem;
    }
    
    .note-image, 
    .rest-image {
        height: 30px;
    }
    
    .metronome-controls label {
        font-size: 0.9rem;
    }
}
/* Interval Practice Sections */
.interval-practice {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.interval-practice h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.interval-controls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.play-interval-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.play-interval-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.play-interval-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.play-interval-btn.playing {
    background-color: #e74c3c;
}

.play-interval-btn.playing:hover {
    background-color: #c0392b;
}

.interval-feedback {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    margin-top: 10px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interval-message {
    color: #7f8c8d;
    text-align: center;
    margin: 0;
    font-size: 0.95rem;
}

/* Responsive adjustments for interval practice */
@media (max-width: 768px) {
    .interval-controls {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .play-interval-btn {
        width: 100%;
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .interval-controls {
        grid-template-columns: 1fr;
    }
    
    .interval-message {
        font-size: 0.9rem;
    }
}
