* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #002eff 0%, #000000 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-wrapper {
    background: #000000;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 420px;
    width: 100%;
}

.video-container {
    position: relative;
    margin-top: 7%;
}

video {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.language-selector {
    position: relative;
    width: 100%;
}

.selector-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    position: relative;
    overflow: hidden;
}

.selector-button:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.selector-button.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}
 
.selector-button.attention-wow {
    animation: subtleAttention 3s ease-in-out 1;
    z-index: 10;
}

@keyframes subtleAttention {
    0% {
        transform: scale(1);
        background: #f8f9fa;
        border-color: #e9ecef;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    15% {
        transform: scale(1.02);
        background: #e3f2fd;
        border-color: #2196f3;
        box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    30% {
        transform: scale(1.04);
        background: #e8f5e8;
        border-color: #4caf50;
        box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2), 0 6px 16px rgba(0, 0, 0, 0.1);
    }
    45% {
        transform: scale(1.03);
        background: #fff3e0;
        border-color: #ff9800;
        box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    60% {
        transform: scale(1.02);
        background: #f3e5f5;
        border-color: #9c27b0;
        box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    75% {
        transform: scale(1.01);
        background: #e3f2fd;
        border-color: #2196f3;
        box-shadow: 0 0 0 1px rgba(33, 150, 243, 0.2), 0 3px 10px rgba(0, 0, 0, 0.1);
    }
    90% {
        transform: scale(1);
        background: #f0f8ff;
        border-color: #64b5f6;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    100% {
        transform: scale(1);
        background: #f8f9fa;
        border-color: #e9ecef;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* Efecto sutil de brillo */
.selector-button.attention-wow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(33, 150, 243, 0.1) 0%, 
        rgba(76, 175, 80, 0.1) 25%, 
        rgba(255, 152, 0, 0.1) 50%, 
        rgba(156, 39, 176, 0.1) 75%, 
        rgba(33, 150, 243, 0.1) 100%);
    border-radius: 14px;
    animation: subtleGlow 3s ease-in-out 1;
    pointer-events: none;
    z-index: -1;
}

@keyframes subtleGlow {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0.98); 
    }
    50% { 
        opacity: 0.3; 
        transform: scale(1.02); 
    }
}
 
.selector-button.attention-wow #selected-language {
    animation: subtleTextPulse 1.5s ease-in-out 2;
    transition: all 0.3s ease;
}

@keyframes subtleTextPulse {
    0%, 100% { 
        transform: scale(1); 
        font-weight: 500; 
    }
    50% { 
        transform: scale(1.05); 
        font-weight: 600; 
        text-shadow: 0 0 8px rgba(33, 150, 243, 0.3);
    }
}
 
.selector-button.attention-wow .subtitle-icon {
    animation: subtleIconSpin 2s ease-in-out 1;
    transition: all 0.3s ease;
}

@keyframes subtleIconSpin {
    0% { 
        transform: rotate(0deg) scale(1); 
        filter: none;
    }
    25% { 
        transform: rotate(90deg) scale(1.1); 
        filter: drop-shadow(0 0 4px rgba(33, 150, 243, 0.4));
    }
    50% { 
        transform: rotate(180deg) scale(1.15); 
        filter: drop-shadow(0 0 6px rgba(76, 175, 80, 0.4));
    }
    75% { 
        transform: rotate(270deg) scale(1.1); 
        filter: drop-shadow(0 0 4px rgba(255, 152, 0, 0.4));
    }
    100% { 
        transform: rotate(360deg) scale(1); 
        filter: none;
    }
}

.subtitle-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white; 
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.dropdown-menu.open {
    max-height: 400px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 15px;
    font-weight: 500;
}

.language-option:hover {
    background: #f8f9fa;
}

.language-option.selected {
    background: #e3f2fd;
    color: #1976d2;
}

.flag {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chevron {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.selector-button.active .chevron {
    transform: rotate(180deg);
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .video-wrapper {
        padding: 20px;
        border-radius: 15px;
    }

    video {
        border-radius: 12px;
    }

    .selector-button {
        padding: 10px 14px;
        font-size: 15px;
    }

    .language-option {
        padding: 10px 14px;
        font-size: 14px;
    }
}