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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #7f7fd5, #86a8e7, #91eae4);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    text-align: center;
    max-width: 520px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

h1 {
    color: #2d3748;
    margin-bottom: 0.8rem;
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

p {
    color: #718096;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Botão de gravar */
.btn-record {
    background: linear-gradient(135deg, #ff3e55, #e02c3e);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 1.25rem;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 62, 85, 0.3);
}

.btn-record:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 62, 85, 0.4);
}

.btn-record:disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Botão de carregar microfones */
.btn-load {
    background: linear-gradient(135deg, #5a67d8, #4c51bf);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    margin-top: 8px;
}

.btn-load:hover:not(:disabled) {
    background: linear-gradient(135deg, #4c51bf, #434190);
    transform: translateY(-2px);
}

.btn-load:disabled {
    background: #cbd5e0;
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

/* Seletor de microfone */
.mic-selector {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.mic-selector label {
    font-weight: 600;
    color: #4a5568;
    font-size: 1rem;
}

.mic-selector select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    width: 100%;
    max-width: 320px;
    background: #f7fafc;
    color: #2d3748;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.mic-selector select:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.2);
}

/* Resultado */
.result-box {
    margin-top: 2.5rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 20px;
    text-align: left;
    border: 1px solid #e9ecef;
    animation: fadeInUp 0.6s ease;
}

.result-box.hidden {
    display: none;
}

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

#songInfo {
    display: flex;
    align-items: center;
    gap: 24px;
}

#cover {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transition: transform 0.3s;
}

#cover:hover {
    transform: scale(1.05);
}

#title {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

#artist, #album {
    color: #4a5568;
    font-size: 1.05rem;
    margin: 4px 0;
}

/* Loading */
.loading {
    margin-top: 2rem;
    animation: pulse 1.5s infinite;
}

.loading.hidden {
    display: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff3e55;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

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

/* Erro */
.error {
    color: #e53e3e;
    background: #fff5f5;
    padding: 16px;
    border-radius: 12px;
    margin-top: 1.5rem;
    border: 1px solid #fed7d7;
    font-weight: 500;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error.hidden {
    display: none;
}

/* Responsividade */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
        margin: 10px;
    }

    h1 {
        font-size: 1.8rem;
    }

    #songInfo {
        flex-direction: column;
        text-align: center;
    }

    #cover {
        width: 80px;
        height: 80px;
    }

    .btn-record {
        padding: 14px 36px;
        font-size: 1.1rem;
    }
}