:root {
    --primary: #6C63FF;
    --secondary: #FF6584;
    --accent: #36D1DC;
    --dark: #2A2D43;
    --light: #F7F9FC;
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;
    --text: #333333;
    --text-light: #6C757D;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 1rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    font-size: 1.8rem;
}

.user-actions {
    display: flex;
    gap: 15px;
}


.icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: var(--transition);
    outline: none;
}

.icon-btn:focus {
    box-shadow: 0 0 0 3px var(--accent);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.08);
}

/* Main Content */
main {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Progress Section */
.progress-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
}

.streak {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--warning);
    color: var(--dark);
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    background: #E0E0E0;
    border-radius: 10px;
    overflow: hidden;
    height: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    width: 45%;
    transition: width 0.5s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

.badges-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-radius: var(--border-radius);
    background: #F0F0F0;
    color: var(--text-light);
    font-size: 0.8rem;
    min-width: 70px;
}

.badge.earned {
    background: var(--primary);
    color: white;
}

.badge i {
    font-size: 1.2rem;
}


.modules-section {
    margin-bottom: 1.5rem;
}

.modules-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: thin;
}

.module-card {
    min-width: 280px;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.module-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 10px;
    position: relative;
}

.module-tag {
    background: var(--secondary);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.module-content {
    padding: 1rem;
}

.module-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.module-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.module-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.module-stats {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-light);
}


.start-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(108,99,255,0.08);
    outline: none;
}

.start-btn:focus {
    box-shadow: 0 0 0 3px var(--accent);
}

.start-btn:hover:not(:disabled) {
    background: #5a52e0;
    transform: translateY(-2px);
}

.start-btn:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
    opacity: 0.7;
}


.video-section {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; 
    background: #000;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    cursor: pointer;
}

.video-controls {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group {
    display: flex;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.control-btn:hover {
    color: var(--primary);
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 5px;
}


.exercises-section {
    margin-bottom: 1.5rem;
}

.exercise-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.tab {
    padding: 10px 20px;
    background: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}


.tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(108,99,255,0.08);
}

.exercise-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    min-height: 300px;
}

.quiz-container,
.challenge-container,
.revision-container {
    display: none;
}

.quiz-container.active,
.challenge-container.active,
.revision-container.active {
    display: block;
}

.quiz-question {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.option {
    padding: 12px 15px;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.option:hover {
    border-color: var(--primary);
}

.option.selected {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.1);
}

.option-letter {
    font-weight: bold;
    color: var(--primary);
}

.option-text {
    flex: 1;
}

.challenge-instruction {
    text-align: center;
    margin-bottom: 1.5rem;
}

.metronome {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 1rem 0;
}

.metronome-beat {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #E0E0E0;
    transition: var(--transition);
}

.metronome-beat.active {
    background: var(--primary);
}

.revision-info {
    margin-bottom: 1.5rem;
}

.revision-cards {
    display: flex;
    gap: 10px;
    margin: 1rem 0;
}

.revision-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: var(--border-radius);
    background: #F0F0F0;
    min-width: 100px;
}

.chord-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 5px;
}

.revision-due {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-top: 5px;
}

.revision-due.today {
    background: var(--warning);
    color: var(--dark);
}

.revision-due.tomorrow {
    background: #E0E0E0;
    color: var(--text-light);
}

.revision-due.overdue {
    background: var(--danger);
    color: white;
}

.exercise-actions {
    display: flex;
    justify-content: space-between;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.secondary-btn {
    background: #E0E0E0;
    color: var(--text);
}

.secondary-btn:hover:not(:disabled) {
    background: #D0D0D0;
}

.primary-btn {
    background: var(--primary);
    color: white;
}

.primary-btn:hover:not(:disabled) {
    background: #5a52e0;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.outline-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}


.outline-btn:focus {
    box-shadow: 0 0 0 3px var(--accent);
}
.outline-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}


.chord-visualizer {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px solid var(--primary);
    box-shadow: var(--shadow);
}

.visualizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.chord-name-display {
    font-size: 1.1rem;
    font-weight: 600;
}

.fret-info {
    background: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.guitar-neck {
    position: relative;
    width: 100%;
    height: 200px;
    background: #8B4513;
    border-radius: 10px;
    margin: 1rem 0;
    overflow: hidden;
}

.fret-markers {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10%;
    transform: translateY(-50%);
    z-index: 1;
}

.fret-marker {
    width: 25px;
    height: 25px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    font-weight: bold;
}

.guitar-fretboard {
    position: relative;
    width: 100%;
    height: 100%;
}

.frets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.fret-line {
    position: absolute;
    height: 100%;
    width: 3px;
    background: linear-gradient(to right, #ddd, #fff, #ddd);
}

.fret-0 { left: 10%; }
.fret-1 { left: 25%; }
.fret-2 { left: 40%; }
.fret-3 { left: 55%; }
.fret-4 { left: 70%; }
.fret-5 { left: 85%; }

.strings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.string {
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 10%, 
        #f0f0f0 10%, 
        #f0f0f0 90%, 
        transparent 90%);
    position: relative;
}

.open-strings {
    position: absolute;
    left: 2%;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    z-index: 2;
}

.open-string {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--dark);
}

.fingers-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.finger {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.finger.finger-1 { background: var(--primary); }
.finger.finger-2 { background: var(--secondary); }
.finger.finger-3 { background: var(--accent); }
.finger.finger-4 { background: var(--success); }

.muted-strings {
    position: absolute;
    right: 2%;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    z-index: 2;
}

.muted-string {
    width: 20px;
    height: 20px;
    background: rgba(244, 67, 54, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    font-weight: bold;
}

.chord-feedback {
    margin-top: 1rem;
    text-align: center;
}

.chord-hint {
    padding: 10px;
    border-radius: var(--border-radius);
    background: #f8f9fa;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Recording Section */
.recording-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.recording-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.recording-instruction {
    text-align: center;
    margin-bottom: 1rem;
    font-style: italic;
}

.recording-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 1.5rem 0;
}

.record-btn {
    background: var(--secondary);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.record-btn.recording {
    animation: pulse 1.5s infinite;
    background: var(--danger);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.timer {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin: 1rem 0;
}

.recording-visualizer {
    display: flex;
    justify-content: center;
    gap: 5px;
    height: 40px;
    align-items: flex-end;
    margin: 1rem 0;
}

.visualizer-bar {
    width: 8px;
    background: var(--primary);
    border-radius: 4px;
    transition: height 0.2s ease;
}

.visualizer-bar:nth-child(odd) {
    height: 10px;
}

.visualizer-bar:nth-child(even) {
    height: 20px;
}


.resources-section {
    margin-bottom: 1.5rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.resource-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-5px);
}

.resource-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.resource-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.resource-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}


.download-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 2px 8px rgba(108,99,255,0.08);
    outline: none;
}

.download-btn:focus {
    box-shadow: 0 0 0 3px var(--accent);
}

.download-btn:hover {
    background: #5a52e0;
    transform: translateY(-2px);
}


footer {
    background: var(--dark);
    color: white;
    padding: 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


.footer-link {
    color: #CCCCCC;
    text-decoration: none;
    transition: var(--transition);
    outline: none;
}

.footer-link:focus {
    box-shadow: 0 0 0 2px var(--accent);
    outline: none;
}
.footer-link:hover {
    color: white;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent);
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #CCCCCC;
}


.install-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
    max-width: 300px;
}

.install-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.close-prompt {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
}

.install-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;

    .resource-card:focus {
        box-shadow: 0 0 0 3px var(--accent);
        outline: none;
    }
    .resource-card:hover {
        transform: translateY(-7px) scale(1.03);
        box-shadow: 0 8px 24px rgba(108,99,255,0.12);
    }
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}


@keyframes bounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}


@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .footer-section {
        flex: 1;
    }
    
    .exercise-tabs {
        justify-content: center;
    }
    
    .revision-cards {
        justify-content: center;
    }
}



.dark-mode {
    --light: #1E1E2E;
    --dark: #F7F9FC;
    --text: #F7F9FC;
    --text-light: #A0A0A0;
    --accent: #36D1DC;
    --primary: #6C63FF;
    --secondary: #FF6584;
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #F44336;
}

.dark-mode header {
    background: linear-gradient(135deg, #4A00E0, #8E2DE2);
}

.dark-mode .progress-section,
.dark-mode .module-card,
.dark-mode .video-section,
.dark-mode .exercise-content,
.dark-mode .recording-section,
.dark-mode .resource-card,
.dark-mode .tab,
.dark-mode .badge:not(.earned),
.dark-mode .chord-visualizer {
    background: #2A2D43;
    color: var(--text);
}

.dark-mode .secondary-btn {
    background: #3A3D53;
    color: var(--text);
}

.dark-mode .install-prompt {
    background: #2A2D43;
    color: white;
}

.dark-mode .chord-hint {
    background: #3A3D53;
    color: var(--text-light);
}


@keyframes slideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}


.finger {
    transition: all 0.3s ease;
}

.finger:hover {
    transform: translate(-50%, -50%) scale(1.1);
}


.loading {
    opacity: 0.7;
    pointer-events: none;
}


@media (max-width: 768px) {
    .chord-visualizer {
        padding: 1rem;
    }
    
    .guitar-neck {
        height: 180px;
    }
    
    .fret-markers {
        padding: 0 5%;
    }
}


   

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  /*background: #f9f9f9;
  color: #333;*/
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2em;
}

main {
  padding: 20px;
  max-width: 800px;
  margin: auto;
}

/* ...existing code... */


   Quiz
======================= */
#quiz-container {
  margin: 20px 0;
}

#quiz-chord-visualizer {
  margin: 10px auto;
}

#quiz-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.quiz-option {
  background: #2196F3;
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 1em;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.quiz-option:hover {
  background: #1976D2;
}

#quiz-feedback {
  margin-top: 15px;
  font-weight: bold;
  font-size: 1.2em;
}

/* Botão novo quiz */
#new-quiz-btn {
  margin-top: 20px;
  /*background: #4CAF50;
  color: white;*/
  border: none;
  padding: 12px 20px;
  font-size: 1em;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

 
#chord-select {
  padding: 8px;
  font-size: 1em;
  margin-bottom: 15px;
}

#chord-visualizer {
  margin-top: 10px;
}

.fret-dot {
  fill: #ff5722;
  stroke: black;
  stroke-width: 1.5px;
  r: 10;
  filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.4));
}



.scale-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.scale-controls {
    margin-bottom: 20px;
}

.scale-controls h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-item label {
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-item select {
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
}

.scale-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.scale-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.scale-fretboard-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow-x: auto;
    background: #8b451300;
    border-radius: 10px;
    margin: 20px 0;
    border: 3px solid #5d403700;
    padding-left: 50px; 
}

.scale-fretboard {
    position: relative;
    height: 100%;
    min-width: 800px;
}


.scale-section {
    background: rgba(255, 255, 255, 0);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.scale-controls {
    margin: 20px 0;
    padding: 15px;
    background: #f0f0f000;
    border-radius: 5px;
}

.scale-controls select, .scale-controls button {
    padding: 8px 12px;
    margin: 5px;
    font-size: 14px;
    border: 1px solid #0c71e41a;
    border-radius: 4px;
}

.scale-controls button {
    background: #007bff86;
    color: rgba(46, 6, 6, 0.842);
    cursor: pointer;
}

.scale-controls button:hover {
    background: #0057b300;
}

.fretboard-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow-x: auto;
    border: 2px solid #333;
    background: #8b4513;
    margin: 20px 0;
}

.fretboard {
    position: relative;
    height: 100%;
    min-width: 2000px;
}

.scale-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.fret-number {
    position: absolute;
    top: -25px;
    font-size: 12px;
    font-weight: bold;
    color: #333333e8;
}

.note-label {
    position: absolute;
    font-size: 10px;
    font-weight: bold;
    color: #333;
    text-align: center;
    width: 30px;
    margin-left: -15px;
    background: rgba(255,255,255,0.9);
    border-radius: 3px;
    padding: 2px;
    z-index: 2;
}



.scale-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: -10px;
    margin-top: -10px;
    opacity: 0.7;
    border: 2px solid rgba(17, 236, 170, 0.486);
}

.scale-dot.tonic { background: rgba(255, 0, 0, 0.7); }
.scale-dot.second { background: rgba(255, 165, 0, 0.7); }
.scale-dot.third { background: rgba(255, 255, 0, 0.7); }
.scale-dot.fourth { background: rgba(0, 255, 0, 0.7); }
.scale-dot.fifth { background: rgba(0, 0, 255, 0.7); }
.scale-dot.sixth { background: rgba(75, 0, 130, 0.7); }
.scale-dot.seventh { background: rgba(238, 130, 238, 0.7); }

.scale-legend {
    margin-top: 20px;
    padding: 15px;
    background: #290d2279;
    border-radius: 5px;
}

.legend-items {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}


.scale-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.scale-controls {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(108, 99, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(108, 99, 255, 0.1);
}


.control-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    outline: none;
}

.control-btn:focus {
    box-shadow: 0 0 0 3px var(--accent);
}

.control-btn:hover:not(:disabled) {
    background: #5a52e0;
    color: white;
    transform: translateY(-2px);
}

.control-item label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.control-item select {
    padding: 0.75rem;
    border: 2px solid rgba(108, 99, 255, 0.2);
    border-radius: var(--border-radius);
    background: white;
    color: var(--text);
    font-size: 0.9rem;
    transition: var(--transition);
}

.control-item select:focus {
    border-color: var(--primary);
    outline: none;
}

.modern-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.modern-btn:hover {
    background: #5a52e0;
    transform: translateY(-2px);
}

.fretboard-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow-x: auto;
    border: 2px solid var(--dark);
    background: #8B4513;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    padding-left: 60px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

.fretboard {
    position: relative;
    height: 100%;
    min-width: 800px;
}

.scale-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

/* String Labels */
.string-labels {
    position: absolute;
    left: -50px;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 5;
}

.string-label {
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    background: var(--primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 45px;
    border: 2px solid rgba(255,255,255,0.3);
}

/* Open String Labels */
.open-string-label {
    position: absolute;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--warning);
    background: rgba(0,0,0,0.8);

    .module-card:focus {
        box-shadow: 0 0 0 3px var(--accent);
        outline: none;
    }
    .module-card:hover {
        transform: translateY(-7px) scale(1.03);
        box-shadow: 0 12px 32px rgba(108,99,255,0.12);
    }
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-align: center;
    min-width: 25px;
    z-index: 3;
    border: 1px solid var(--warning);
    transform: translateY(-50%);
}

/* Fret Numbers */
.fret-number {
    position: absolute;
    top: -30px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    background: var(--dark);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-align: center;
    width: 25px;
    margin-left: -12.5px;
    z-index: 3;
}

/* Note Labels */
.note-label {
    position: absolute;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text);
    text-align: center;
    width: 25px;
    margin-left: -12.5px;
    background: var(--light);
    border-radius: 3px;
    padding: 0.15rem 0.25rem;
    z-index: 2;
    border: 1px solid var(--border-color, rgba(0,0,0,0.1));
}

/* Dark Mode para Note Labels */
.dark-mode .note-label {
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Ajuste para garantir que o texto seja legível no dark mode */
.dark-mode .note-label {
    background: rgba(255, 255, 255, 0.9);
    color: #2A2D43; /* Cor escura para contraste com fundo branco */
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Scale Dots */
.scale-dot {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-left: -11px;
    margin-top: -11px;
    border: 3px solid white;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.scale-dot:hover {
    transform: scale(1.2);
    z-index: 10;
}

/* Cores dos graus da escala usando suas variáveis */
.scale-dot.tonic { 
    background: var(--primary); 
    animation: pulse 2s infinite;
}
.scale-dot.second { 
    background: var(--secondary); 
}
.scale-dot.third { 
    background: var(--accent); 
}
.scale-dot.fourth { 
    background: var(--success); 
}
.scale-dot.fifth { 
    background: #9C27B0; /* Roxo para variar */
}
.scale-dot.sixth { 
    background: #FF9800; /* Laranja para variar */
}
.scale-dot.seventh { 
    background: #795548; /* Marrom para variar */
}

/* Fret Markers */
.fret-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--warning);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 8px var(--warning);
}

.fret-marker.double {
    width: 6px;
    height: 6px;
}

/* Scale Legend */
.scale-legend {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(108, 99, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(108, 99, 255, 0.1);
}

.legend-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
}

.legend-item .scale-dot {
    position: static;
    margin: 0;
    width: 16px;
    height: 16px;
    display: inline-block;
}

/* Tooltips */
.scale-dot:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    white-space: pre-line;
    z-index: 10;
    min-width: 150px;
    text-align: center;
    box-shadow: var(--shadow);
}

/* Dark Mode Support */
.dark-mode .scale-section {
    background: #2A2D43;
}

.dark-mode .scale-controls {
    background: rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.2);
}

.dark-mode .control-item select {
    background: #3A3D53;
    color: white;
    border-color: rgba(108, 99, 255, 0.3);
}

.dark-mode .note-label {
    background: rgba(255,255,255,0.9);
    color: var(--dark);
}

.dark-mode .scale-legend {
    background: rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .control-grid {
        grid-template-columns: 1fr;
    }
    
    .fretboard-container {
    position: relative;
    width: 100%;
    height: 250px; /* (ou o valor que estava antes) */
    overflow-x: auto;
    border: 2px solid var(--dark);
    background: #8B4513;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    padding-left: 60px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}
    
    .legend-items {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .string-label {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        min-width: 35px;
    }
}

/* Animações */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Seção MIDI Player */
.midi-section {
            background: var(--card-bg);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: var(--shadow);
        }

        .midi-controls {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-top: 15px;
            flex-wrap: wrap;
        }


        .control-btn {
            background: #e0e0e0;
            color: var(--text);
            border: none;
            padding: 10px 15px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s, color 0.3s;
        }

        .control-btn:hover:not(:disabled),
        .control-btn:focus:not(:disabled) {
            background: #cccccc;
            color: var(--primary);
        }

        .control-btn:disabled {
            background: #ccc;
            color: #888;
            cursor: not-allowed;
        }

        .volume-control {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        #midi-list {
            list-style: none;
            padding: 0;
            margin: 15px 0;
            max-height: 200px;
            overflow-y: auto;
            border: 1px solid var(--border-color);
            border-radius: 8px;
        }

        .midi-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 15px;
            border-bottom: 1px solid var(--border-color);
            transition: background 0.3s;
        }

        .midi-item:last-child {
            border-bottom: none;
        }

        .midi-item:hover {
            background: var(--hover-color);
        }

        .midi-item.active {
            background: var(--primary-light);
        }

        .play-btn {
            background: var(--success-color);
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.3s;
        }

        .play-btn:hover {
            background: var(--success-dark);
        }

        .play-btn.playing {
            background: var(--warning-color);
        }

        .status-message {
            margin-top: 10px;
            padding: 10px;
            border-radius: 5px;
            text-align: center;
            font-weight: 500;
        }

        .status-message.success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .status-message.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .status-message.loading {
            background: #cce7ff;
            color: #004085;
            border: 1px solid #b3d7ff;
        }

        .status-message.playing {
            background: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }

        .midi-info {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
        }

        .midi-icon {
            color: var(--primary-color);
        }


        .search-container {
            position: relative;
            margin-bottom: 15px;
        }

        #midi-search:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 2px var(--accent);
            outline: none;
        }

        #midi-search {
            width: 100%;
            padding: 10px 15px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 14px;
        }

        .search-icon {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #666;
        }

        /* Seção n8n */
.n8n-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.installation-steps {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-card {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.step-number {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-bottom: 1rem;
    font-weight: bold;
}

.code-block {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.additional-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.additional-info h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}
        