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

/* Nút nghe mẫu nhịp và nghe mẫu đẹp, hiện đại */
.play-rhythm-btn, .play-pattern-btn {
  display: inline-block;
  padding: 12px 28px;
  margin: 12px 0 8px 0;
  border: none;
  border-radius: 32px;
  background: linear-gradient(90deg, #b8d6dd 0%, #6dd5ed 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 4px 18px rgba(33,147,176,0.12), 0 1.5px 4px rgba(33,147,176,0.18);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}
.play-rhythm-btn:hover, .play-pattern-btn:hover {
  background: linear-gradient(90deg, #6dd5ed 0%, #2193b0 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px rgba(33,147,176,0.18), 0 2px 8px rgba(33,147,176,0.22);
}
.play-rhythm-btn:active, .play-pattern-btn:active {
  background: #2193b0;
  transform: scale(0.98);
}

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




/* 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;
}




/* Interval Practice (Nghe Quãng) */
.interval-practice {
    background: #fff;
    border: 1.5px solid #e4e9f0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(33,147,176,0.07);
    padding: 2rem 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    max-width: 500px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (max-width: 600px) {
  .interval-practice {
    padding: 1.2rem 0.5rem;
    max-width: 100%;
  }
  .interval-controls {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  .play-interval-btn {
    min-width: 95%;
    max-width: 100%;
    font-size: 0.98rem;
    padding: 10px 0;
  }
}
.interval-practice h5 {
    margin-bottom: 1.2rem;
    color: #2196f3;
    font-size: 1.13rem;
    font-weight: 600;
    text-align: center;
}
.interval-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-bottom: 1.2rem;
    width: 100%;
    box-sizing: border-box;
}
.play-interval-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 32px;
    background: linear-gradient(90deg, #b8d6dd 0%, #6dd5ed 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1.01rem;
    box-shadow: 0 4px 18px rgba(33,147,176,0.10), 0 1.5px 4px rgba(33,147,176,0.16);
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
    outline: none;
    min-width: 120px;
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
}
.play-interval-btn:hover, .play-interval-btn:focus {
    background: linear-gradient(90deg, #2193b0 0%, #6dd5ed 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 24px rgba(33,147,176,0.13);
}
.play-interval-btn:active {
    background: #2193b0;
    color: #fff;
    transform: scale(0.98);
}
.interval-feedback {
    text-align: center;
    background: #f6fbfd;
    color: #6b7b8a;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-top: 1rem;
    font-size: 1.03rem;
    min-height: 36px;
    box-shadow: 0 1px 3px rgba(33,147,176,0.06);
}
.interval-message {
    margin: 0;
    color: #6b7b8a;
    font-size: 1.03rem;
    letter-spacing: 0.01em;
}

/* 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;
}




.lessons-sidebar {
    position: relative;
    z-index: 1002;
}




/* 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: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
}




.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;
}




/* 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: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}




/* 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 a {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    text-decoration: none !important;
    color: #2c3e50;
    display: block;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    font-size: 1.08rem;
    margin-bottom: 4px;
}




.lessons-list li a:hover,
.lessons-list li a.active {
    text-decoration: none !important;
    background: #3498db;
    color: #fff;
}




/* 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;
    }



    
    .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);
}
