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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #d755f8 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    overflow-x: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: #e9ff61 ;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.game-setup {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.setup-row {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.setup-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.setup-group label {
    font-weight: bold;
    font-size: 1.1em;
}

select,
button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

select {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.btn-primary {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    font-weight: bold;
    transform: scale(1);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.game-area {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.bingo-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #333;
    min-width: 300px;
}

.card-title {
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #4A5568;
}

.bingo-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.grid-6 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.grid-9 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.bingo-cell {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    border: 2px solid #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    min-height: 80px;
}

.bingo-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bingo-cell.marked {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-color: #4CAF50;
    transform: scale(0.95);
}

.bingo-cell.marked::after {
    content: "✓";
    position: absolute;
    font-size: 1.5em;
    font-weight: bold;
}

.empty-cell {
    background: linear-gradient(135deg, #f9f9f9, #e9e9e9);
    border: 2px dashed #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.empty-cell:hover {
    transform: none;
    box-shadow: none;
}

.empty-message {
    color: #999;
    font-size: 0.85em;
    text-align: center;
}

.control-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 300px;
}

.current-song {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.song-number {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.song-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.song-artist {
    font-size: 1em;
    opacity: 0.9;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-control {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-next {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.btn-check {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.btn-reset {
    background: linear-gradient(45deg, #FF9800, #F57C00);
}

.game-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.winner-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 30px 50px;
    border-radius: 20px;
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: celebration 1s ease-in-out;
    display: none;
}

@keyframes celebration {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.played-songs {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.played-song {
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-bottom: 5px;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .game-area {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .header p {
        font-size: 1em;
    }

    .setup-row {
        flex-direction: column;
        gap: 15px;
    }

    .setup-group {
        width: 100%;
    }

    .setup-group select {
        width: 100%;
        max-width: 250px;
    }

    .bingo-card {
        min-width: 280px;
        width: 100%;
        max-width: 350px;
        padding: 15px;
    }

    .control-panel {
        min-width: 280px;
        width: 100%;
        max-width: 350px;
        padding: 15px;
    }

    .bingo-cell {
        font-size: 0.8em;
        min-height: 70px;
        padding: 6px;
    }

    .current-song {
        padding: 15px;
        margin-bottom: 15px;
    }

    .song-title {
        font-size: 1.1em;
    }

    .played-songs {
        max-height: 150px;
    }

    .game-setup {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .bingo-card,
    .control-panel {
        min-width: 260px;
        padding: 12px;
    }

    .bingo-cell {
        font-size: 0.75em;
        min-height: 60px;
        padding: 4px;
    }

    .current-song {
        padding: 12px;
    }

    .song-title {
        font-size: 1em;
    }

    .song-artist {
        font-size: 0.9em;
    }

    .btn-control {
        padding: 12px;
        font-size: 0.9em;
    }

    .game-setup {
        padding: 15px;
    }
}

@media (max-width: 320px) {
    .bingo-cell {
        font-size: 0.7em;
        min-height: 55px;
    }

    .current-song {
        padding: 10px;
    }

    .song-title {
        font-size: 0.95em;
    }
}

/* Modal de Instrucciones */
.instructions-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instructions-modal.show {
    opacity: 1;
}

.instructions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.instructions-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.instructions-modal.show .instructions-content {
    transform: scale(1);
}

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

.instructions-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

.instructions-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.instructions-body {
    padding: 30px;
}

.instructions-list {
    list-style: none;
    counter-reset: instructions-counter;
    padding: 0;
    margin: 0;
}

.instructions-list li {
    counter-increment: instructions-counter;
    position: relative;
    padding: 15px 15px 15px 60px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    font-size: 0.95em;
    line-height: 1.6;
}

.instructions-list li::before {
    content: counter(instructions-counter);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
}

.instructions-list li strong {
    color: #667eea;
}

.warning-icon {
    color: #ff6b6b;
    font-size: 1.2em;
}

.instructions-footer {
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #eee;
}

.btn-close-instructions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-close-instructions:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-close-instructions:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 600px) {
    .instructions-content {
        max-width: 95%;
    }
    
    .instructions-body {
        padding: 20px;
    }
    
    .instructions-list li {
        padding: 12px 12px 12px 55px;
        font-size: 0.9em;
    }
}

/* Estilos para el loader de inicialización */
.initialization-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.initialization-loader.show {
    opacity: 1;
}

.loader-content {
    text-align: center;
    color: white;
    max-width: 300px;
}

.musical-note {
    font-size: 4em;
    animation: bounce 1s ease-in-out infinite alternate;
    margin-bottom: 20px;
}

.loader-text {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 25px;
    animation: pulse 2s ease-in-out infinite;
}

.loader-bar {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-progress {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF6B6B);
    border-radius: 3px;
    transition: width 0.8s ease-out;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Animación de pulso para las celdas vacías */
.pulse-animation {
    animation: cellPulse 1.5s ease-in-out infinite;
}

@keyframes cellPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0.2);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 20px rgba(255, 215, 0, 0);
    }
}

/* Efecto de typewriter para el texto */
.typewriter-cursor {
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50% {
        border-right-color: rgba(255, 255, 255, 0.8);
    }

    51%,
    100% {
        border-right-color: transparent;
    }
}

/* Mejoras para las animaciones de aparición */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-scale {
    animation: fadeInScale 0.8s ease-out forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Partículas de bienvenida */
.welcome-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
}

.particle {
    position: absolute;
    font-size: 1.5em;
    animation: float 3s linear infinite;
    opacity: 0.7;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.7;
    }

    90% {
        opacity: 0.7;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Animaciones adicionales para los elementos del juego */
.game-intro-animation {
    animation: gameIntro 1.2s ease-out forwards;
}

@keyframes gameIntro {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateX(30deg);
    }

    60% {
        opacity: 0.8;
        transform: translateY(-10px) rotateX(-5deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* Efecto de brillo para el título de bienvenida */
.welcome-glow {
    text-shadow:
        0 0 5px rgba(255, 215, 0, 0.8),
        0 0 10px rgba(255, 215, 0, 0.6),
        0 0 15px rgba(255, 215, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.2);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow:
            0 0 5px rgba(255, 215, 0, 0.8),
            0 0 10px rgba(255, 215, 0, 0.6),
            0 0 15px rgba(255, 215, 0, 0.4),
            0 0 20px rgba(255, 215, 0, 0.2);
    }

    to {
        text-shadow:
            0 0 10px rgba(255, 215, 0, 1),
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 30px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.4);
    }
}

/* Animaciones comunes */
@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-20px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: 200px 0;
    }
}

/* Estilos responsivos para los efectos */
@media (max-width: 768px) {
    .musical-note {
        font-size: 3em;
    }

    .loader-text {
        font-size: 1.1em;
    }

    .loader-bar {
        width: 150px;
    }

    .particle {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .musical-note {
        font-size: 2.5em;
    }

    .loader-text {
        font-size: 1em;
    }

    .loader-bar {
        width: 120px;
        height: 4px;
    }

    .particle {
        font-size: 1em;
    }
}

/* Mejoras para la transición suave entre estados */
.smooth-transition {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.element-entering {
    animation: elementEnter 0.8s ease-out forwards;
}

.element-leaving {
    animation: elementLeave 0.5s ease-in forwards;
}

@keyframes elementEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes elementLeave {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* Modal de Bienvenida */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.welcome-modal.show {
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.welcome-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-content.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

/* Header del Modal */
.modal-header {
    padding: 40px 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: iconBounce 2s ease-in-out infinite;
    display: inline-block;
}

.welcome-title {
    font-size: 2em;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-subtitle {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Body del Modal */
.modal-body {
    padding: 20px 30px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
}

.label-icon {
    font-size: 1.2em;
}

.name-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
}

.name-input:focus {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.name-input.error {
    background: rgba(255, 107, 107, 0.9);
    color: white;
    animation: shake 0.6s ease-in-out;
}

.name-input.error::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.input-underline {
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.name-input:focus+.input-underline {
    width: 100%;
}

/* Mensaje de Error */
.error-message {
    color: #FFD700;
    font-size: 0.9em;
    font-weight: 600;
    padding: 10px;
    background: rgba(255, 107, 107, 0.2);
    border-radius: 8px;
    border-left: 4px solid #FF6B6B;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer del Modal */
.modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-cancel {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-start {
    padding: 12px 30px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

.btn-start:active {
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1.1em;
}

/* Decoraciones del Modal */
.modal-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.decoration-note {
    position: absolute;
    font-size: 1.5em;
    opacity: 0.3;
    animation: floatNotes 4s ease-in-out infinite;
}

.note-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.note-2 {
    top: 20%;
    right: 8%;
    animation-delay: 1s;
}

.note-3 {
    bottom: 25%;
    left: 8%;
    animation-delay: 2s;
}

.note-4 {
    bottom: 15%;
    right: 5%;
    animation-delay: 3s;
}

/* Contenido de Éxito */
.success-content {
    padding: 60px 40px;
    text-align: center;
    color: white;
}

.success-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: successPulse 1s ease-in-out infinite;
}

.success-content h3 {
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: bold;
}

.success-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.success-loader {
    display: flex;
    justify-content: center;
}

.loader-dots {
    display: flex;
    gap: 8px;
}

.loader-dots span {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Bienvenida Personalizada */
.personalized-welcome {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 11000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.personalized-welcome.show {
    opacity: 1;
}

.welcome-animation {
    text-align: center;
    color: white;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.personalized-welcome.show .welcome-animation {
    transform: translateY(0);
}

.welcome-animation h2 {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: welcomeGlow 2s ease-in-out infinite alternate;
}

.welcome-animation p {
    font-size: 1.3em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.musical-animation {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.musical-animation .note {
    font-size: 2.5em;
    animation: notesDance 2s ease-in-out infinite;
}

.musical-animation .note:nth-child(2) {
    animation-delay: 0.3s;
}

.musical-animation .note:nth-child(3) {
    animation-delay: 0.6s;
}

/* Animaciones */
@keyframes iconBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-10px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-10px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(10px);
    }
}

@keyframes floatNotes {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.6;
    }
}

@keyframes successPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes welcomeGlow {
    from {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    to {
        text-shadow:
            2px 2px 4px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(255, 215, 0, 0.5);
    }
}

@keyframes notesDance {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-20px) rotate(-10deg);
    }

    66% {
        transform: translateY(-10px) rotate(10deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        margin: 20px;
    }

    .modal-header {
        padding: 30px 20px 15px;
    }

    .welcome-title {
        font-size: 1.6em;
    }

    .welcome-subtitle {
        font-size: 1em;
    }

    .modal-body {
        padding: 15px 20px;
    }

    .modal-footer {
        padding: 15px 20px 25px;
        flex-direction: column;
    }

    .btn-cancel,
    .btn-start {
        width: 100%;
        justify-content: center;
    }

    .welcome-animation h2 {
        font-size: 2.2em;
    }

    .welcome-animation p {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .welcome-icon {
        font-size: 3em;
    }

    .welcome-title {
        font-size: 1.4em;
    }

    .welcome-subtitle {
        font-size: 0.9em;
    }

    .name-input {
        padding: 12px 15px;
        font-size: 1em;
    }

    .welcome-animation h2 {
        font-size: 1.8em;
    }

    .musical-animation .note {
        font-size: 2em;
    }
}

/* Footer del Bingo */
.footer-content {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 50%, #2C3E50 100%);
    color: white;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 2;
}


/* Línea divisora musical */
.footer-divider {
    margin: 30px 0;
    text-align: center;
}

.musical-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    position: relative;
}

.musical-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #FFD700 20%, 
        #FFA500 50%, 
        #FFD700 80%, 
        transparent 100%);
    z-index: 1;
}

.musical-line .note {
    font-size: 1.5em;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: noteFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.musical-line .note:nth-child(1) { animation-delay: 0s; }
.musical-line .note:nth-child(2) { animation-delay: 0.5s; }
.musical-line .note:nth-child(3) { animation-delay: 1s; }
.musical-line .note:nth-child(4) { animation-delay: 1.5s; }
.musical-line .note:nth-child(5) { animation-delay: 2s; }
.musical-line .note:nth-child(6) { animation-delay: 2.5s; }

/* Copyright */
.copyright {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright-text h4 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-mark {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.copyright-year {
    color: #FFD700;
    font-weight: bold;
}

.copyright-subtitle {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
    font-style: italic;
}

/* Badges del footer */
.footer-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Efectos flotantes */
.footer-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-note {
    position: absolute;
    font-size: 2em;
    opacity: 0.1;
    animation: floatingAnimation 8s ease-in-out infinite;
}

.floating-note.note-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.floating-note.note-2 {
    top: 50%;
    right: 8%;
    animation-delay: 3s;
}

.floating-note.note-3 {
    bottom: 20%;
    left: 10%;
    animation-delay: 6s;
}

/* Animaciones */
@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
}

@keyframes noteFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
    }
}

@keyframes floatingAnimation {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-30px) rotate(90deg);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-60px) rotate(180deg);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-30px) rotate(270deg);
        opacity: 0.2;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-brand {
        order: -1;
    }
}

@media (max-width: 768px) {
    .footer-container {
        padding: 30px 15px 15px;
    }
    
    .footer-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-title {
        font-size: 1.6em;
    }
    
    .footer-subtitle {
        font-size: 1em;
    }
    
    .musical-line {
        gap: 10px;
    }
    
    .musical-line .note {
        font-size: 1.2em;
        padding: 6px 10px;
    }
    
    .copyright-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-badges {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 20px 10px 10px;
    }
    
    .footer-section {
        padding: 15px;
    }
    
    .footer-title {
        font-size: 1.4em;
    }
    
    .section-title {
        font-size: 1.1em;
    }
    
    .footer-links li {
        font-size: 0.9em;
    }
    
    .copyright-text h4 {
        font-size: 1em;
        justify-content: center;
    }
    
    .copyright-subtitle {
        font-size: 0.85em;
        text-align: center;
    }
    
    .badge {
        font-size: 0.8em;
        padding: 5px 10px;
    }
}

/* Efecto de entrada del footer */
.footer-content {
    animation: footerSlideUp 1s ease-out;
}

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

/* Hover effect para toda la sección del footer */
.footer-content:hover .floating-note {
    opacity: 0.3;
    animation-duration: 4s;
}
