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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #020208;
    font-family: 'Poppins', sans-serif;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

/* Encabezado perfectamente centrado y ordenado */
.top-header {
    text-align: center;
    margin-top: 10px;
}

.header-small {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 235, 59, 0.6);
    margin-bottom: -5px;
}

.header-large {
    font-family: 'Caveat', cursive;
    font-size: 3.2rem;
    color: #ffeb3b;
    letter-spacing: 2px;
    text-shadow: 0 0 15px #ffeb3b, 0 0 30px #ff9800;
}

/* Tarjeta de dedicatoria limpia en la esquina inferior derecha */
.bottom-card {
    pointer-events: auto;
    background: rgba(12, 10, 22, 0.65);
    border: 1px solid rgba(255, 235, 59, 0.35);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 12px 18px;
    text-align: center;
    max-width: 320px;
    position: absolute;
    bottom: 18px;
    right: 18px;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.2);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Antes esta regla bajaba la opacidad a 0.15 y hacía invisible el botón de música */
.bottom-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 28px rgba(255, 193, 7, 0.35);
}

.main-phrase {
    color: #ffffff;
    font-size: 0.75rem;
    line-height: 1.35;
    margin-bottom: 6px;
    font-weight: 300;
}

.sub-phrase {
    color: #ffd54f;
    font-size: 0.7rem;
    font-style: italic;
    margin-bottom: 6px;
}

.author {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.72rem;
    margin-bottom: 8px;
}

.music-btn {
    background: linear-gradient(45deg, #ffc107, #ff8f00);
    border: none;
    color: #000;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.78rem;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
    transition: transform 0.2s;
}

.music-btn:hover {
    transform: scale(1.05);
}

/* Aviso cuando el audio no se puede cargar (antes fallaba en silencio) */
.audio-error {
    color: #ffd54f;
    font-size: 0.68rem;
    line-height: 1.3;
    margin-top: 8px;
}

.file-btn {
    margin-top: 6px;
    background: transparent;
    border: 1px solid rgba(255, 235, 59, 0.6);
    color: #ffeb3b;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.72rem;
    transition: background 0.2s, transform 0.2s;
}

.file-btn:hover {
    background: rgba(255, 235, 59, 0.15);
    transform: scale(1.03);
}

/* Pantalla de inicio */
#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #020208;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-card {
    text-align: center;
    background: rgba(20, 15, 35, 0.95);
    border: 1.5px solid #ffeb3b;
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 235, 59, 0.4);
}

.welcome-card h1 {
    font-family: 'Caveat', cursive;
    color: #ffeb3b;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.welcome-card p {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

#startBtn {
    background: linear-gradient(45deg, #ffc107, #ff8f00);
    border: none;
    color: #000;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 22px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.8);
}
