* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px;
    color: #212529;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 20px;
}

header h1 {
    font-size: 2.5em;
    color: #212529;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: #6c757d;
    font-size: 1.1em;
    font-style: italic;
    font-weight: 400;
}

.search-box {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
}

#searchInput {
    flex: 1;
    padding: 12px 20px;
    font-size: 1em;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s;
    font-family: inherit;
}

#searchInput:focus {
    outline: none;
    border-color: #495057;
    box-shadow: 0 0 0 3px rgba(73, 80, 87, 0.1);
}

#searchBtn {
    padding: 12px 30px;
    font-size: 1em;
    background: #212529;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-family: inherit;
}

#searchBtn:hover {
    background: #343a40;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#searchBtn:active {
    transform: translateY(0);
}

.autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 100px;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background 0.2s;
    font-size: 0.95em;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.result-count {
    text-align: center;
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 1em;
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.chord-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.chord-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #dee2e6;
}

.chord-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.chord-name {
    font-size: 1.8em;
    font-weight: 600;
    color: #212529;
}

.difficulty {
    display: flex;
    gap: 3px;
}

.star {
    color: #ffc107;
    font-size: 1.1em;
}

.star.empty {
    color: #e9ecef;
}

.chord-diagram {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.diagram-grid {
    display: grid;
    grid-template-columns: 40px repeat(5, 1fr);
    gap: 2px;
    margin-bottom: 10px;
}

.string-label {
    text-align: center;
    font-weight: 600;
    font-size: 0.85em;
    color: #495057;
    padding: 5px;
    background: white;
    border-radius: 4px;
}

.fret-cell {
    text-align: center;
    padding: 8px;
    border: 1px solid #e9ecef;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    background: white;
    color: #6c757d;
}

.fret-cell.fret-number {
    background: white;
    font-weight: 600;
    color: #495057;
}

.fret-cell.pressed {
    background: #212529;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    border-color: #212529;
}

.fret-cell.open {
    background: #28a745;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    border-color: #28a745;
}

.fret-cell.muted {
    background: #dc3545;
    color: white;
    font-weight: bold;
    border-color: #dc3545;
}

.positions {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    font-weight: 600;
    color: #495057;
    padding: 10px;
    background: white;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.chord-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
}

.info-label {
    font-weight: 600;
    color: #495057;
}

.info-value {
    color: #212529;
}

.badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.badge.grave {
    background: #e7f1ff;
    color: #004085;
}

.badge.media {
    background: #fff3cd;
    color: #856404;
}

.badge.aguda {
    background: #f8d7da;
    color: #721c24;
}

.description {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9em;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-results p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.hint {
    color: #adb5bd !important;
    font-size: 1em !important;
}

footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.95em;
}

footer .small {
    font-size: 0.85em;
    margin-top: 10px;
    color: #adb5bd;
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    #searchBtn {
        width: 100%;
    }
    
    .results-container {
        grid-template-columns: 1fr;
    }
    
    .autocomplete {
        right: 0;
    }
}

/* Loading animation */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #495057;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/*Scrollbar personalizado */
.autocomplete::-webkit-scrollbar {
    width: 8px;
}

.autocomplete::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.autocomplete::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

.autocomplete::-webkit-scrollbar-thumb:hover {
    background: #ced4da;
}
