/* ===================================
   INSTRUMENTOS MUSICAIS - CSS
   Design infantil e colorido
   =================================== */

/* Container Principal */
#instrumentos-musicais-app {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
}

/* Telas (apenas uma visível por vez) */
.screen {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================
   TELA DE SELEÇÃO
   =================================== */

.welcome-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.welcome-header h2 {
    font-size: 2rem;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.welcome-text {
    font-size: 1.2rem;
    margin: 10px 0;
    opacity: 0.95;
}

.cost-info {
    font-size: 1rem;
    margin: 10px 0 0 0;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    display: inline-block;
}

/* Grid de Instrumentos */
.instruments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Card de Instrumento */
.instrument-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.instrument-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instrument-card:hover::before {
    opacity: 1;
}

.instrument-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    border-color: #667eea;
}

/* Estados do Card */
.instrument-card.locked {
    opacity: 0.7;
}

.instrument-card.unlocked {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    border-color: #10b981;
}

.instrument-card.unlocked:hover {
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.4);
}

/* Emoji do Instrumento */
.instrument-emoji {
    font-size: 4rem;
    margin: 10px 0;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    animation: bounce 2s infinite;
}

/* Imagem customizada do instrumento */
.instrument-custom-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: transparent;
    margin: 10px 0;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.instrument-card:hover .instrument-emoji,
.instrument-card:hover .instrument-custom-image {
    animation: spin 0.6s ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}

/* Nome do Instrumento */
.instrument-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2d3748;
    margin: 10px 0;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* Status Badge */
.instrument-status {
    margin: 10px 0;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-badge.locked {
    background: #f56565;
    color: white;
}

.status-badge.unlocked {
    background: #48bb78;
    color: white;
}

/* Timer de Desbloqueio */
.unlock-timer {
    margin-top: 8px;
    color: #4a5568;
    font-size: 0.8rem;
}

/* ===================================
   TELA DO INSTRUMENTO
   =================================== */

.instrument-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-back {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: white;
    color: #667eea;
    transform: translateX(-5px);
}

#instrument-title {
    margin: 0;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.timer-display {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 1rem;
}

/* Container de Instrumento */
#instrument-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    min-height: 400px;
}

/* ===================================
   ESTILOS DOS INSTRUMENTOS
   =================================== */

/* Piano */
.piano-keys {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.piano-key {
    width: 80px;
    height: 200px;
    border-radius: 10px;
    border: 3px solid #2d3748;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.piano-key:active {
    transform: translateY(5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.piano-key.key-c { background: linear-gradient(180deg, #f56565 0%, #c53030 100%); }
.piano-key.key-d { background: linear-gradient(180deg, #ed8936 0%, #c05621 100%); }
.piano-key.key-e { background: linear-gradient(180deg, #ecc94b 0%, #b7791f 100%); }
.piano-key.key-f { background: linear-gradient(180deg, #48bb78 0%, #2f855a 100%); }
.piano-key.key-g { background: linear-gradient(180deg, #4299e1 0%, #2b6cb0 100%); }
.piano-key.key-a { background: linear-gradient(180deg, #9f7aea 0%, #6b46c1 100%); }
.piano-key.key-b { background: linear-gradient(180deg, #ed64a6 0%, #b83280 100%); }

/* Bateria */
.drum-pads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.drum-pad {
    height: 150px;
    border-radius: 50%;
    border: 4px solid #2d3748;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.drum-pad:active {
    transform: scale(0.95);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.drum-pad .emoji {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.drum-pad.kick { background: linear-gradient(135deg, #f56565 0%, #c53030 100%); }
.drum-pad.snare { background: linear-gradient(135deg, #ed8936 0%, #c05621 100%); }
.drum-pad.hihat { background: linear-gradient(135deg, #ecc94b 0%, #b7791f 100%); }
.drum-pad.tom { background: linear-gradient(135deg, #4299e1 0%, #2b6cb0 100%); }
.drum-pad.cymbal { background: linear-gradient(135deg, #9f7aea 0%, #6b46c1 100%); }

/* Xilofone */
.xilofone-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    margin: 40px 0;
}

.xilofone-bar {
    width: 60px;
    border-radius: 8px;
    border: 3px solid #2d3748;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.xilofone-bar:active {
    transform: translateY(5px);
}

/* Xilofone: barras DECRESCEM do grave (maior) ao agudo (menor) */
.xilofone-bar:nth-child(1) { height: 220px !important; background: linear-gradient(180deg, #f56565 0%, #c53030 100%); } /* C5 - GRAVE/MAIOR */
.xilofone-bar:nth-child(2) { height: 200px !important; background: linear-gradient(180deg, #ed8936 0%, #c05621 100%); } /* D5 */
.xilofone-bar:nth-child(3) { height: 180px !important; background: linear-gradient(180deg, #ecc94b 0%, #b7791f 100%); } /* E5 */
.xilofone-bar:nth-child(4) { height: 160px !important; background: linear-gradient(180deg, #48bb78 0%, #2f855a 100%); } /* F5 */
.xilofone-bar:nth-child(5) { height: 140px !important; background: linear-gradient(180deg, #4299e1 0%, #2b6cb0 100%); } /* G5 */
.xilofone-bar:nth-child(6) { height: 130px !important; background: linear-gradient(180deg, #9f7aea 0%, #6b46c1 100%); } /* A5 */
.xilofone-bar:nth-child(7) { height: 120px !important; background: linear-gradient(180deg, #ed64a6 0%, #b83280 100%); } /* B5 */
.xilofone-bar:nth-child(8) { height: 110px !important; background: linear-gradient(180deg, #667eea 0%, #764ba2 100%); } /* C6 - AGUDO/MENOR */

/* Violão/Guitarra - Cordas */
.string-instrument {
    max-width: 600px;
    margin: 40px auto;
}

.strings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.string {
    height: 50px;
    background: linear-gradient(90deg, #2d3748 0%, #4a5568 50%, #2d3748 100%);
    border-radius: 25px;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.string::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    top: 0;
    left: -100%;
    transition: left 0.3s ease;
}

.string:active::before {
    left: 100%;
}

.string:active {
    transform: scale(0.98);
}

.string:nth-child(1) { height: 40px; }
.string:nth-child(2) { height: 45px; }
.string:nth-child(3) { height: 50px; }
.string:nth-child(4) { height: 55px; }
.string:nth-child(5) { height: 60px; }
.string:nth-child(6) { height: 65px; }

/* Instrumentos de Sopro (Flauta, Tuba, Saxofone) */
.wind-instrument {
    max-width: 500px;
    margin: 40px auto;
}

.wind-keys {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.wind-key {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #2d3748;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.wind-key:active {
    transform: scale(0.95);
}

.wind-key .note {
    font-size: 1.5rem;
}

/* Pandeiro */
.pandeiro-pad {
    width: 300px;
    height: 300px;
    margin: 40px auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6ad55 0%, #dd6b20 100%);
    border: 8px solid #744210;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.1s ease;
}

.pandeiro-pad:active {
    transform: scale(0.95);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* PANDEIRO - 4 ZONAS INTERATIVAS */
.pandeiro-zone {
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    will-change: filter;
}

/* Hover - Efeito sutil ao passar o mouse */
.pandeiro-zone:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
}

/* Active - Animação ao clicar/tocar (usando classe para não destruir transforms) */
.pandeiro-zone-active {
    filter: brightness(1.4) !important;
    animation: pulse-pandeiro 0.1s ease-out !important;
}

@keyframes pulse-pandeiro {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.5); }
    100% { filter: brightness(1.4); }
}

/* Platinelas - Animação shimmer (brilho metálico) */
.pandeiro-platinela {
    animation: shimmer 2s infinite ease-in-out;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

/* Hover nas platinelas - Shimmer mais rápido */
.pandeiro-platinela:hover {
    animation: shimmer-fast 0.5s infinite ease-in-out;
}

@keyframes shimmer-fast {
    0%, 100% { filter: brightness(1.15); }
    50% { filter: brightness(1.5); }
}

/* Animação global para teclado (todos os instrumentos) - Preserva transforms */
.keyboard-triggered {
    filter: brightness(1.3) !important;
    animation: keyboard-pulse 0.15s ease-out !important;
}

@keyframes keyboard-pulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.4); }
    100% { filter: brightness(1.3); }
}

/* Harpa */
.harp-strings {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    margin: 40px 0;
}

.harp-string {
    width: 40px;
    background: linear-gradient(180deg, #f6e05e 0%, #d69e2e 100%);
    border-radius: 20px;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    border: 2px solid #744210;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.harp-string:active {
    transform: scale(0.95);
}

/* Harpa: cordas DECRESCEM do grave (maior) ao agudo (menor) */
.harp-string:nth-child(1) { height: 200px !important; } /* C4 - GRAVE/MAIOR */
.harp-string:nth-child(2) { height: 185px !important; } /* D4 */
.harp-string:nth-child(3) { height: 170px !important; } /* E4 */
.harp-string:nth-child(4) { height: 155px !important; } /* F4 */
.harp-string:nth-child(5) { height: 140px !important; } /* G4 */
.harp-string:nth-child(6) { height: 130px !important; } /* A4 */
.harp-string:nth-child(7) { height: 120px !important; } /* B4 */
.harp-string:nth-child(8) { height: 110px !important; } /* C5 */
.harp-string:nth-child(9) { height: 100px !important; } /* D5 */
.harp-string:nth-child(10) { height: 90px !important; } /* E5 - AGUDO/MENOR */

/* Sanfona */
.sanfona-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 500px;
    margin: 40px auto;
}

.sanfona-button {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 3px solid #2d3748;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.sanfona-button:active {
    transform: scale(0.95);
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

@media (max-width: 768px) {
    .instruments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .instrument-emoji {
        font-size: 3rem;
    }

    .instrument-custom-image {
        width: 60px;
        height: 60px;
    }

    .instrument-name {
        font-size: 1.1rem;
    }

    .welcome-header h2 {
        font-size: 1.5rem;
    }

    .piano-key {
        width: 60px;
        height: 150px;
    }

    .drum-pad {
        height: 120px;
    }

    .xilofone-bar {
        width: 40px;
    }

    #instrument-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    #instrumentos-musicais-app {
        padding: 10px;
    }

    .instruments-grid {
        gap: 10px;
    }

    .instrument-card {
        padding: 15px;
    }

    .instrument-emoji {
        font-size: 2.5rem;
    }

    .instrument-custom-image {
        width: 50px;
        height: 50px;
    }

    .piano-key {
        width: 45px;
        height: 120px;
        font-size: 0.9rem;
    }

    .drum-pads {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   MODAL DE CONFIRMAÇÃO
   =================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    font-size: 1.1rem;
    color: #2d3748;
    margin: 0 0 20px 0;
    text-align: center;
}

.modal-info {
    background: #f7fafc;
    border-radius: 12px;
    padding: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.info-icon {
    font-size: 1.5rem;
    min-width: 30px;
    text-align: center;
}

.info-text {
    font-size: 1rem;
    color: #4a5568;
}

.info-text strong {
    color: #2d3748;
}

.modal-footer {
    padding: 20px 25px;
    display: flex;
    gap: 12px;
    background: #f7fafc;
}

.btn-modal {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-cancel:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Modal Responsivo */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .btn-modal {
        width: 100%;
    }
}

/* ===================================
   BATERIA - TRANSPARÊNCIA FORÇADA
   =================================== */

.drum-piece {
    background: transparent !important;
    border: none !important;
    outline: none !important;
}

.drum-piece img {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    opacity: 1 !important;
}

/* Garantir que não há herança de estilos */
.drum-piece * {
    background: transparent !important;
    border: none !important;
}

/* ===================================
   PROTEÇÃO MOBILE - ANTI-SCROLL/ZOOM
   Para crianças pequenas (2 anos)
   =================================== */

@media (max-width: 768px) {
    /* Quando instrumento está ativo, bloquear gestos indesejados */
    #instrument-screen.active {
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        touch-action: none; /* Bloqueia gestos de toque */
        user-select: none; /* Previne seleção de texto */
        -webkit-touch-callout: none; /* iOS: desabilita callout */
        -webkit-tap-highlight-color: transparent; /* Remove destaque de tap */
        overscroll-behavior: contain; /* Previne pull-to-refresh */
    }
    
    /* Bloquear scroll do body quando instrumento está ativo */
    body.instrument-active {
        overflow: hidden !important;
        position: fixed !important;
        width: 100%;
        height: 100vh;
        touch-action: none !important;
        overscroll-behavior: none !important;
    }
    
    /* Container do instrumento - bloquear todos os gestos exceto toques diretos */
    #instrument-container {
        touch-action: manipulation; /* Permite toques, bloqueia zoom */
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    /* Prevenir zoom no meta viewport (aplicado via JS se necessário) */
    html {
        touch-action: manipulation; /* Permite scroll suave mas bloqueia zoom */
    }
}

/* ===================================
   LOADING OVERLAY (Carregamento de Samples)
   =================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.loading-content {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px auto;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-subtext {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-style: italic;
}

/* Animação de "Ready" (quando carregado) */
.instrument-ready-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #00c853, #00e676);
    color: white;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.4);
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}