/* Fuentes estilo Pixel/Arcade */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Press Start 2P', cursive;
}

.game-container {
    width: 80%;
    max-width: 80vw;
    height: 100vh;
    background: transparent;
    position: relative;
    margin: 0 auto;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.95);
    overflow: hidden;
}

/* Efecto que tiembla cuando hay golpes fuertes */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-active {
    animation: shake 0.5s;
    animation-iteration-count: infinite;
}

/* Menú Secreto Superior Centrado (Recuadro Amarillo de Escenario 2, Torre, GTA) */
.nav-secret {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    z-index: 9999;
    font-family: sans-serif;
    background: rgba(0, 0, 0, 0.75);
    padding: 4px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.nav-secret a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.nav-secret a:hover {
    color: #ffd700;
}

/* HUD Superior (Barras de Vida) */
.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 30px;
    position: relative;
    z-index: 10;
}

.player-hud {
    width: 38%;
    position: relative;
}

.name-tag {
    color: white;
    text-shadow: 2px 2px 0 red, -2px -2px 0 black;
    font-size: 18px;
    margin-bottom: 5px;
}

.p1-hud .name-tag {
    text-align: right;
}

.p2-hud .name-tag {
    text-align: left;
}

.hud-support-tag {
    font-size: 11px;
    font-weight: bold;
    color: #f1c40f;
    text-shadow: 2px 2px 0 black;
    margin-bottom: 5px;
    font-family: Arial, sans-serif;
    letter-spacing: 0.5px;
    user-select: none;
    transition: transform 0.2s, color 0.2s;
}

.hud-support-tag.text-right {
    text-align: right;
}

.interactive-test-mode .hud-support-tag:hover {
    color: #fff;
    cursor: pointer;
    transform: scale(1.03);
}

.health-bar-container {
    background-color: #333;
    border: 4px solid #fff;
    height: 30px;
    width: 100%;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

.health-bar {
    background: linear-gradient(90deg, #d32f2f, #f44336);
    height: 100%;
    width: 100%;
    transition: width 0.3s ease-out;
}

.p1-hud .health-bar-container {
    display: flex;
    justify-content: flex-end;
}

.p2-hud .health-bar-container {
    display: flex;
    justify-content: flex-start;
}

.p2-color {
    background: linear-gradient(90deg, #f44336, #ff9800);
}

.vs-logo {
    width: 10%;
    display: flex;
    justify-content: center;
}

.vs-logo img {
    height: 80px;
    filter: drop-shadow(0 0 5px red);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ========================================================
   PANELES VERTICALES DE REGALOS (COLUMNAS AMPLIAS CON IMÁGENES GRANDES)
   ======================================================== */
.vertical-gift-panel {
    position: absolute;
    top: 102px; /* Subido hasta el borde de la barra de vida (recuadro verde) */
    width: 86px; /* Ampliado para que las imágenes sean grandes y visibles */
    max-height: calc(100vh - 116px);
    background: rgba(12, 14, 24, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 7px 4px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    user-select: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.85);
}

.gift-panel-left {
    left: 8px;
    border: 2px solid #ffcc00;
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.35);
}

.gift-panel-right {
    right: 8px;
    border: 2px solid #00f0ff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.panel-header {
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 4px;
}

.panel-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 3px;
    text-shadow: 1px 1px 0 #000;
    letter-spacing: 0.2px;
}

.p1-header .panel-title {
    color: #ffcc00;
}

.p2-header .panel-title {
    color: #00f0ff;
}

.panel-title span {
    font-size: 8px;
    color: #fff;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 76px;
    margin: 2px auto 0;
}

/* Cola de espera en el panel vertical */
.queue-status-box {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    padding: 2px 3px;
    font-size: 8px;
    color: #ddd;
    text-align: center;
}

.queue-label {
    display: block;
    font-size: 8px;
    font-weight: bold;
    color: #bbb;
    margin-bottom: 1px;
    font-family: Arial, sans-serif;
}

.queue-label strong {
    color: #ffeb3b;
}

.p2-header .queue-label strong {
    color: #00f0ff;
}

.queue-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 16px;
    overflow-x: auto;
}

.queue-mini-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #ffcc00;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(255, 204, 0, 0.6);
    background: #222;
}

.gift-panel-right .queue-mini-avatar {
    border-color: #00f0ff;
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.6);
}

/* Lista de opciones de regalo ultra compactas */
.gift-options-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    padding-right: 1px;
}

.gift-options-list::-webkit-scrollbar {
    width: 3px;
}

.gift-options-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Estilo individual de tarjeta de regalo con imágenes y emojis GRANDES */
.gift-option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 4px 5px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-sizing: border-box;
    min-height: 44px;
}

.gift-option-card:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Modo interactivo desde PC (al activar el botón +) */
.interactive-test-mode .gift-option-card {
    cursor: pointer !important;
}

.interactive-test-mode .gift-option-card:hover {
    transform: scale(1.12);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
    border-color: #fff;
}

.card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 38px;
    flex-shrink: 0;
}

/* Imágenes de regalos amplias y nítidas */
.card-gift-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

/* Emojis grandes y llamativos */
.card-gift-emoji {
    font-size: 26px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.card-cost-badge {
    font-size: 8px;
    font-weight: bold;
    color: #ffeb3b;
    background: rgba(0, 0, 0, 0.75);
    padding: 1px 3px;
    border-radius: 3px;
    margin-top: 2px;
    border: 1px solid rgba(255, 235, 59, 0.35);
    white-space: nowrap;
}

.gold-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    border: 1px solid #fff;
    font-weight: 900;
}

.card-action-badge {
    font-size: 20px;
    flex-shrink: 0;
    width: 26px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

/* Tarjeta activa con resplandor al recibir regalo o hacer clic */
.gift-option-card.card-active {
    background: rgba(255, 215, 0, 0.4) !important;
    border-color: #ffd700 !important;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), inset 0 0 10px rgba(255, 215, 0, 0.5);
    z-index: 10;
}

.gift-panel-right .gift-option-card.card-active {
    background: rgba(0, 240, 255, 0.4) !important;
    border-color: #00f0ff !important;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.9), inset 0 0 10px rgba(0, 240, 255, 0.5);
    z-index: 10;
}

.card-fatality {
    border-color: rgba(255, 0, 85, 0.4);
    background: rgba(255, 0, 85, 0.1);
}

/* Etiqueta flotante del usuario donador */
.card-donor-pill {
    position: absolute;
    top: -10px;
    right: 0px;
    background: #ff0055;
    color: #fff;
    font-size: 7.5px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.8);
    animation: donorPillPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 25;
    white-space: nowrap;
    font-family: Arial, sans-serif;
}

.card-donor-pill img {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    object-fit: cover;
}

@keyframes donorPillPop {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ========================================================
   ÁREA DE COMBATE Y PELEADORES
   ======================================================== */
.combat-area {
    position: absolute;
    bottom: 2%;
    width: 100%;
    height: 60vh;
    z-index: 10;
}

.fighter-wrapper {
    position: absolute;
    bottom: 0;
}

#wrapper-p2 {
    left: 14%;
    right: auto;
}

#wrapper-p1 {
    right: 12%;
    left: auto;
}

/* El peleador como contenedor flex para que el globo quede FISICAMENTE ENCIMA de Ryu */
.fighter,
#fighter1,
#fighter2 {
    position: relative !important;
    display: inline-block !important;
    transition: transform 0.1s;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Peleadores con altura proporcional y modo espejo (scaleX -1) para ver hacia el centro */
.fighter-1-img {
    height: 40vh;
    max-height: 310px;
    object-fit: contain;
    display: block;
    transform: scaleX(-1); /* Espejo: ahora en la derecha, mira hacia la izquierda */
}

.fighter-2-img {
    height: 40vh;
    max-height: 310px;
    object-fit: contain;
    display: block;
    transform: scaleX(-1); /* Espejo: ahora en la izquierda, mira hacia la derecha */
}

/* ========================================================
   GLOBO SINCRONIZADO DIRECTAMENTE EN LA CABEZA DEL PELEADOR
   ======================================================== */
.fighter-head-balloon {
    position: absolute !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    pointer-events: none;
    z-index: 150 !important;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.85));
}

/* Ryu 2 (Peleador Izquierdo - Retador): Globo centrado sobre su cabeza */
.p2-balloon {
    top: -68px !important;
    left: 28% !important;
    transform: translateX(-50%) !important;
}

/* Ryu 1 (Peleador Derecho - Campeón): Globo centrado sobre su cabeza */
.p1-balloon {
    top: -68px !important;
    left: 82% !important;
    transform: translateX(-50%) !important;
}

.head-balloon-tag {
    font-size: 7.5px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    text-align: center;
    white-space: nowrap;
    text-shadow: 1px 1px 0 #000;
    letter-spacing: 0.5px;
}

.p1-balloon .head-balloon-tag {
    background: #ffcc00;
    color: #111;
    border: 1px solid #fff;
}

.p2-balloon .head-balloon-tag {
    background: #00f0ff;
    color: #111;
    border: 1px solid #fff;
}

.head-balloon-avatar-wrapper {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    animation: balloon-float 3s ease-in-out infinite;
}

@keyframes balloon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.head-balloon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background: #1a1a24;
}

.p1-balloon .head-balloon-img {
    border: 3px solid #ffcc00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.9), inset 0 0 10px rgba(255, 204, 0, 0.5);
}

.p2-balloon .head-balloon-img {
    border: 3px solid #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.9), inset 0 0 10px rgba(0, 240, 255, 0.5);
}

.head-balloon-pointer {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}

.p1-balloon .head-balloon-pointer {
    border-top: 6px solid #ffcc00;
}

.p2-balloon .head-balloon-pointer {
    border-top: 6px solid #00f0ff;
}

.head-balloon-name {
    font-size: 8px;
    color: #fff;
    background: rgba(0, 0, 0, 0.88);
    border-radius: 4px;
    padding: 2px 6px;
    margin-top: 3px;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    text-shadow: 1px 1px 0 #000;
}

.p1-balloon .head-balloon-name {
    border: 1px solid #ffcc00;
}

.p2-balloon .head-balloon-name {
    border: 1px solid #00f0ff;
}

/* Efecto cuando el ganador queda fijo celebrando */
.winner-frozen {
    animation: none !important;
    filter: drop-shadow(0 0 30px #ffd700) brightness(1.15) !important;
}

.winner-frozen .head-balloon-tag {
    background: #ffd700 !important;
    color: #000 !important;
    animation: pulse 1s infinite;
}

/* Espectadores en los lados */
.spectator-left {
    position: absolute;
    bottom: 25%;
    left: 100px;
    height: 25vh;
    max-height: 220px;
    z-index: 5;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.7));
}

.spectator-right {
    position: absolute;
    bottom: 25%;
    right: 100px;
    height: 25vh;
    max-height: 220px;
    z-index: 5;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.7));
}

/* Animaciones de Acción */
/* Ryu 1 (Campeón / Creador en la derecha) ataca y se desplaza hacia la izquierda */
.attack-p1 {
    transform: translateX(-100px);
}

/* Ryu 2 (Retador / El Chat en la izquierda) ataca y se desplaza hacia la derecha */
.attack-p2 {
    transform: translateX(100px);
}

.hit-red {
    filter: drop-shadow(0 0 40px red) sepia(1) hue-rotate(-50deg) saturate(5);
    transform: translateY(-20px);
}

/* ========================================================
   EFECTOS VISUALES, POPUPS Y ANUNCIADOR
   ======================================================== */
#effects-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.gift-popup {
    position: absolute;
    color: #ff0;
    font-size: 22px;
    text-shadow: 2px 2px 0 #000;
    animation: floatUpGift 4s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.gift-popup img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
}

@keyframes floatUpGift {
    0% { transform: translateY(100vh) scale(1); opacity: 0; }
    20% { transform: translateY(60vh) scale(1.4); opacity: 1; }
    80% { transform: translateY(10vh) scale(1.4); opacity: 1; }
    100% { transform: translateY(-50px) scale(1.4); opacity: 0; }
}

#battle-announcer {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: red;
    text-shadow: 4px 4px 0 #000, 0 0 20px yellow;
    z-index: 150;
    text-align: center;
    white-space: nowrap;
}

/* Globos de Likes (Límites definidos por los recuadros azules para que se reúnan ordenadamente) */
.balloon-container {
    position: absolute;
    top: 65px;
    height: 46vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 15;
}

/* Recuadro Azul Izquierdo (Globos de apoyo a Retador / El Chat) */
.p2-hud .balloon-container {
    left: 85px;
    width: calc(100% - 90px);
}

/* Recuadro Azul Derecho (Globos de apoyo a Creador / Campeón) */
.p1-hud .balloon-container {
    right: 85px;
    width: calc(100% - 90px);
}

.like-bubble {
    position: absolute;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: floatUpLike 1.8s ease-out forwards;
    z-index: 1000;
}

.like-bubble span {
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 5px;
    border-radius: 4px;
    margin-top: 4px;
    font-size: 9px;
    white-space: nowrap;
    text-shadow: 1px 1px 0 #000;
}

.like-bubble img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes floatUpLike {
    0% { transform: translateY(60px) scale(0.6); opacity: 0; }
    30% { transform: translateY(20px) scale(1.1); opacity: 1; }
    70% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ========================================================
   ANIMACIONES FATALITY Y REINICIO
   ======================================================== */
/* Animaciones Fatality: El perdedor cae de espaldas */
.fall-over {
    transition: transform 1s, filter 1s;
    transform: rotate(90deg) translateY(30px) scale(0.8) !important;
    filter: grayscale(1);
}

.fall-over-p2 {
    transition: transform 1s, filter 1s;
    transform: rotate(-90deg) translateY(30px) scale(0.8) !important;
    filter: grayscale(1);
}

.drop-hole {
    transition: transform 1.5s ease-in;
    transform: translateY(300px) scale(0.1) !important;
    opacity: 0;
}

.camilla-container {
    position: absolute;
    font-size: 100px;
    z-index: 40;
    bottom: 0px;
    opacity: 0;
    pointer-events: none;
}

.camilla-slide {
    animation: slideCamilla 4s forwards;
}

@keyframes slideCamilla {
    0% { transform: translateX(-400px); opacity: 0; }
    20% { transform: translateX(0); opacity: 1; }
    60% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(800px); opacity: 0; }
}

.tombstone {
    position: absolute;
    font-size: 150px;
    bottom: -200px;
    transition: bottom 1s;
    z-index: 50;
    opacity: 0;
}

.show-tombstone {
    bottom: 50px;
    opacity: 1;
}

/* ========================================================
   CONFIGURADOR DE USUARIO (CALAVERA Y BOTÓN +)
   ======================================================== */
.config-corner {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 500;
}

#config-btn {
    cursor: pointer;
    transition: transform 0.2s;
}

#config-btn:hover {
    transform: scale(1.15);
}

.skull-glow {
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
    animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
    0% { filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 20px rgba(0, 255, 255, 1)); transform: scale(1.1); }
    100% { filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5)); transform: scale(1); }
}

.plus-test-btn {
    background: #27ae60;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(39, 174, 96, 0.9);
    transition: transform 0.2s, background 0.2s;
    outline: none;
    line-height: 1;
}

.plus-test-btn:hover {
    transform: scale(1.15);
    background: #2ecc71;
}

.plus-test-btn.active {
    background: #e67e22;
    border-color: #f1c40f;
    box-shadow: 0 0 20px #f1c40f;
    animation: pulse 1.5s infinite;
}

.user-input-line {
    background: rgba(0, 0, 0, 0.85);
    border: none;
    border-bottom: 2px solid white;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 8px;
    outline: none;
    width: 170px;
    text-shadow: 1px 1px 0 #000;
}

/* LEADERBOARD (Top Donadores) */
.leaderboard-panel {
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid #f1c40f;
    border-radius: 10px;
    padding: 10px 20px;
    z-index: 1000;
    min-width: 250px;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.5);
    font-family: Arial, sans-serif;
}

.leader-item {
    display: flex;
    align-items: center;
    margin-top: 8px;
    font-size: 14px;
    color: white;
    text-shadow: 1px 1px 0 #000;
}

.leader-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid gold;
}

.leader-item span {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.leader-item strong {
    color: #f1c40f;
}

@keyframes screen-shake-anim {
    0% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-5px, -5px) rotate(-1deg); }
    20% { transform: translate(5px, -10px) rotate(1deg); }
    30% { transform: translate(-10px, 5px) rotate(0deg); }
    40% { transform: translate(10px, 10px) rotate(1deg); }
    50% { transform: translate(-5px, 10px) rotate(-1deg); }
    60% { transform: translate(5px, -5px) rotate(0deg); }
    70% { transform: translate(-10px, -10px) rotate(-1deg); }
    80% { transform: translate(10px, -5px) rotate(1deg); }
    90% { transform: translate(-5px, 5px) rotate(0deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.screen-shake {
    animation: screen-shake-anim 0.4s ease-in-out;
}

.hidden {
    display: none !important;
}

/* ========================================================
   ADAPTACIÓN TOTAL PARA DISPOSITIVOS MÓVILES (SMARTPHONES)
   ======================================================== */
@media (max-width: 768px) {
    /* Menú secreto superior centrado en móvil */
    .nav-secret {
        top: 3px;
        font-size: 8px;
        padding: 2px 8px;
        gap: 6px;
    }

    /* HUD compacto y optimizado para pantallas táctiles */
    .hud {
        padding: 5px 8px;
        top: 0;
    }

    .player-hud {
        width: 43%;
    }

    .name-tag {
        font-size: 10px;
        margin-bottom: 2px;
        text-shadow: 1px 1px 0 red, -1px -1px 0 black;
    }

    .hud-support-tag {
        font-size: 7.5px;
        margin-bottom: 2px;
        letter-spacing: 0px;
    }

    .health-bar-container {
        height: 16px;
        border: 2px solid #fff;
    }

    .vs-logo {
        width: 14%;
    }

    .vs-logo h1 {
        font-size: 16px !important;
        margin: 0;
    }

    /* Columnas de Regalos en Móvil: compactas en altura (max 40vh) para dejar el 50% inferior 100% libre para el combate */
    .vertical-gift-panel {
        top: 50px; /* Justo debajo del HUD */
        width: 68px;
        max-height: 40vh; /* Ocupa solo la mitad superior */
        padding: 3px 2px;
        border-radius: 8px;
        z-index: 120;
        overflow-y: auto;
    }

    .gift-panel-left {
        left: 3px;
    }

    .gift-panel-right {
        right: 3px;
    }

    .panel-title {
        font-size: 5.5px;
        margin-bottom: 2px;
    }

    .panel-title span {
        font-size: 7px;
        max-width: 65px;
    }

    .queue-status-box {
        padding: 1px 2px;
        font-size: 6.5px;
    }

    .queue-mini-avatar {
        width: 12px;
        height: 12px;
    }

    .gift-options-list {
        gap: 3px;
    }

    .gift-option-card {
        min-height: 35px;
        padding: 2px 3px;
        gap: 3px;
    }

    .card-left {
        width: 28px;
    }

    .card-gift-icon {
        width: 24px;
        height: 24px;
    }

    .card-gift-emoji {
        font-size: 20px;
    }

    .card-action-badge {
        font-size: 16px;
        width: 18px;
    }

    .card-cost-badge {
        font-size: 6.5px;
        padding: 1px 2px;
    }

    /* Ocultamos espectadores en móvil para dejar el 100% del centro a los peleadores */
    .spectator-left,
    .spectator-right {
        display: none !important;
    }

    /* Área de Combate y Peleadores en Pantalla Móvil: 100% PROPORCIONAL Y VISIBLE COMO EN PC */
    .combat-area {
        height: 54vh;
        bottom: 10px;
        z-index: 20;
        overflow: visible;
        pointer-events: none;
    }

    #wrapper-p2 {
        left: 2%;
        right: auto;
        bottom: 8px;
        pointer-events: auto;
    }

    #wrapper-p1 {
        right: 2%;
        left: auto;
        bottom: 8px;
        pointer-events: auto;
    }

    /* Peleadores con tamaño proporcional, grande y nítido como en PC */
    .fighter-1-img,
    .fighter-2-img {
        height: 26vh;
        max-height: 220px;
        min-height: 165px;
        width: auto;
        object-fit: contain;
        display: block;
    }

    /* Escala adecuada para el globo sobre la cabeza en móviles */
    .fighter-head-balloon {
        transform: translateX(-50%) scale(0.72) !important;
        top: -52px !important;
    }

    .p2-balloon {
        left: 28% !important;
    }

    .p1-balloon {
        left: 82% !important;
    }

    /* Límites móviles para globos de likes */
    .balloon-container {
        top: 48px;
        height: 38vh;
    }

    .p2-hud .balloon-container {
        left: 65px;
        width: calc(100% - 68px);
    }

    .p1-hud .balloon-container {
        right: 65px;
        width: calc(100% - 68px);
    }

    .head-balloon-avatar-wrapper {
        width: 44px;
        height: 44px;
    }

    .head-balloon-name {
        max-width: 80px;
        font-size: 7px;
    }

    .camilla-container {
        font-size: 55px;
    }

    .tombstone {
        font-size: 75px;
    }

    /* Notificaciones y Anunciador */
    #battle-announcer {
        font-size: 20px;
        width: 88%;
        white-space: normal;
    }

    .gift-popup {
        font-size: 14px;
    }

    .gift-popup img {
        width: 32px;
        height: 32px;
    }

    .leaderboard-panel {
        top: 55px;
        min-width: 170px;
        max-width: 75vw;
        padding: 5px 10px;
        font-size: 10px;
    }

    .leader-item {
        font-size: 10px;
    }

    .leader-item img {
        width: 20px;
        height: 20px;
    }

    /* Rincón de configuración móvil */
    .config-corner {
        bottom: 6px;
        right: 6px;
        gap: 4px;
    }

    #config-btn {
        width: 30px !important;
    }

    .plus-test-btn {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .user-input-line {
        width: 110px;
        font-size: 8px;
        padding: 4px;
    }
}

/* Pantallas móviles muy estrechas (menos de 400px de ancho) */
@media (max-width: 400px) {
    .vertical-gift-panel {
        width: 68px;
        top: 62px;
        max-height: 42vh;
    }

    .card-left {
        width: 24px;
    }

    .card-gift-icon {
        width: 22px;
        height: 22px;
    }

    .card-gift-emoji {
        font-size: 18px;
    }

    .card-action-badge {
        font-size: 14px;
        width: 16px;
    }

    #wrapper-p2 {
        left: 2px;
        right: auto;
    }

    #wrapper-p1 {
        right: 2px;
        left: auto;
    }

    .fighter-1-img,
    .fighter-2-img {
        height: 25vh;
        max-height: 205px;
        min-height: 155px;
        width: auto;
    }
}

/* Orientación horizontal en móviles (Landscape) */
@media (max-height: 500px) and (orientation: landscape) {
    .hud {
        padding: 4px 15px;
    }

    .health-bar-container {
        height: 14px;
    }

    .name-tag {
        font-size: 9px;
    }

    .vertical-gift-panel {
        top: 50px;
        max-height: calc(100vh - 60px);
        width: 72px;
    }

    .combat-area {
        height: 60vh;
        bottom: 2px;
    }

    .fighter-1-img,
    .fighter-2-img {
        height: 48vh;
        max-height: 150px;
    }

    .fighter-head-balloon {
        transform: translateX(-50%) scale(0.68) !important;
        top: -42px !important;
    }
}
