/* Estilos para MonoLLADOS Multiplayer */

/* Pantalla multiplayer inicial */
.multiplayer-screen {
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.multiplayer-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.option-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.option-card:hover {
    transform: translateY(-5px);
}

.option-card h3 {
    margin-top: 0;
    color: #ffd700;
    font-size: 1.4em;
}

.option-card p {
    margin: 15px 0;
    opacity: 0.9;
}

.option-card input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.multiplayer-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.multiplayer-btn:hover {
    background: linear-gradient(45deg, #ffed4e, #ffd700);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.demo-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #ffd700;
}

.demo-info h3 {
    color: #ffd700;
    margin-top: 0;
}

.demo-info ol {
    text-align: left;
    padding-left: 20px;
}

/* Pantalla de lobby */
.lobby-screen {
    max-width: 1000px;
    margin: 20px auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.lobby-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.room-code-share {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.code-display {
    font-size: 36px;
    font-weight: bold;
    color: #ffd700;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 15px;
    margin: 15px 0;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
    border: 2px solid #ffd700;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.share-instruction {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 10px;
}

.players-waiting {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.player-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.player-item.online {
    background: rgba(40, 167, 69, 0.3);
    border-left: 4px solid #28a745;
}

.player-item.offline {
    background: rgba(220, 53, 69, 0.3);
    border-left: 4px solid #dc3545;
    opacity: 0.7;
}

.waiting-message {
    text-align: center;
    font-style: italic;
    opacity: 0.7;
    margin-top: 15px;
}

.lobby-controls {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.start-button {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.start-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.start-button:not(:disabled):hover {
    background: linear-gradient(45deg, #218838, #1ea080);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.leave-button {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.leave-button:hover {
    background: linear-gradient(45deg, #c82333, #dc3545);
    transform: translateY(-2px);
}

/* Chat de voz en lobby */
.lobby-voice-chat {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lobby-voice-chat h3 {
    color: #ffd700;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.3em;
}

.voice-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    margin-bottom: 15px;
    font-style: italic;
}

.lobby-voice-status {
    text-align: center;
    margin-bottom: 15px;
}

#lobby-voice-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    background: #e74c3c;
    color: white;
    display: inline-block;
}

#lobby-voice-status.connected {
    background: #27ae60;
}

#lobby-voice-status.connecting {
    background: #f39c12;
}

.lobby-voice-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
}

.lobby-voice-controls button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.lobby-voice-controls button:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.lobby-voice-controls button:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

#lobby-join-voice-btn {
    background: #27ae60 !important;
}

#lobby-join-voice-btn:hover {
    background: #229954 !important;
}

#lobby-leave-voice-btn {
    background: #e74c3c !important;
}

#lobby-leave-voice-btn:hover {
    background: #c0392b !important;
}

#lobby-mute-btn.muted {
    background: #f39c12 !important;
}

.lobby-voice-participants {
    text-align: center;
}

.lobby-voice-participant-header {
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.9em;
}

#lobby-participants-list {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lobby-participant-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lobby-participant-name {
    font-weight: bold;
}

.lobby-participant-status {
    font-size: 1.1em;
}

.lobby-participant-status.speaking {
    animation: pulse 1s infinite;
}

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

.no-participants {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    font-size: 0.85em;
    padding: 8px;
}

/* Estado de conexión multiplayer */
.multiplayer-status {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 1000;
    display: flex;
    gap: 15px;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.connection-status {
    text-align: center;
    margin: 20px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-weight: bold;
    border-left: 4px solid #ffd700;
}

/* Layout del juego multiplayer */
.game-layout {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    height: calc(100vh - 150px);
    max-height: 800px;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.center-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Jugadores online */
.online-player {
    background: rgba(40, 167, 69, 0.2);
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 15px;
    font-size: 14px;
    border-left: 3px solid #28a745;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mazos de cartas en multiplayer */
.card-decks {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.card-deck {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.card-deck:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.deck-title {
    font-size: 12px;
    font-weight: bold;
    color: white;
    margin-bottom: 8px;
}

.deck-icon {
    font-size: 24px;
}

/* Popup de carta mejorado */
.card-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.card-popup {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    text-align: center;
    color: white;
    border: 3px solid #ffd700;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

/* Indicadores de turno */
#turn-indicator {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive design */
@media (max-width: 1200px) {
    .game-layout {
        grid-template-columns: 200px 1fr 200px;
    }
}

@media (max-width: 768px) {
    .multiplayer-options,
    .lobby-info {
        grid-template-columns: 1fr;
    }
    
    .code-display {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .game-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        height: auto;
    }
    
    .left-column, .right-column {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .multiplayer-status {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px;
        justify-content: center;
    }
}

/* Animaciones */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.player-item.online {
    animation: pulse 2s infinite;
}

/* Mejoras visuales */
.control-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.roll-button, .next-button, .action-button {
    transition: all 0.3s ease;
}

.roll-button:disabled, .next-button:disabled, .action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Efectos hover mejorados */
.multiplayer-btn:active, .start-button:active, .copy-btn:active {
    transform: translateY(0);
}

/* Estados de conexión */
.connection-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.connected {
    background: #28a745;
    box-shadow: 0 0 10px #28a745;
}

.disconnected {
    background: #dc3545;
    box-shadow: 0 0 10px #dc3545;
}

/* ESTILOS MEJORADOS PARA EL HEADER DEL MULTIPLAYER */
.game-header {
    text-align: center !important;
    padding: 30px 20px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 20px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    position: relative;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.game-header h1 {
    font-size: 3.2em;
    font-weight: bold;
    color: #ffd700;
    margin: 0 0 15px 0;
    text-shadow: 
        2px 2px 4px rgba(0,0,0,0.5),
        0 0 10px rgba(255,215,0,0.3);
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.game-header p {
    font-size: 1.4em;
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    font-style: italic;
}

/* Efectos hover para el header */
.game-header:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.game-header:hover h1 {
    text-shadow: 
        2px 2px 4px rgba(0,0,0,0.5),
        0 0 20px rgba(255,215,0,0.5);
    transition: all 0.3s ease;
}

/* Responsive para el header */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2.2em;
        letter-spacing: 1px;
    }
    
    .game-header p {
        font-size: 1.1em;
        letter-spacing: 0.5px;
    }
    
    .game-header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    
    .game-header p {
        font-size: 1em;
    }
}

/* Sistema de Webcams - Optimizado para 4 jugadores */
#webcam-container {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    pointer-events: none; /* Permite clicks en el fondo */
    z-index: 5;
}

.webcam-slot {
    position: relative;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
    pointer-events: auto; /* Solo las webcams reciben clicks */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    will-change: transform;
}

.webcam-slot.active {
    border-color: #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.5);
}

.webcam-slot.inactive {
    border-color: #6c757d;
    opacity: 0.7;
}

.webcam-slot.error {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.2);
}

.webcam-slot video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.webcam-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        transparent 30%,
        transparent 70%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.webcam-slot:hover .webcam-overlay {
    opacity: 1;
}

.webcam-player-name {
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.webcam-controls {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.webcam-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

.webcam-toggle:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.webcam-toggle.active {
    background: rgba(40, 167, 69, 0.8);
}

.webcam-status {
    color: white;
    font-size: 0.8em;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.webcam-status.active {
    color: #28a745;
}

.webcam-status.error {
    color: #dc3545;
}

#webcam-general-controls {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    pointer-events: auto;
}

#toggle-all-webcams {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#toggle-all-webcams:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

#toggle-all-webcams.hidden {
    background: rgba(220, 53, 69, 0.7);
}

#webcam-container.hidden {
    display: none;
}

/* Responsive para webcams */
@media (max-width: 768px) {
    #webcam-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 6px;
        top: 12%;
        left: 10%;
        width: 80%;
        height: 75%;
    }
    
    .webcam-player-name {
        font-size: 0.7em;
    }
    
    .webcam-toggle {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .webcam-status {
        font-size: 0.65em;
    }
}

@media (max-width: 480px) {
    #webcam-container {
        top: 14%;
        left: 10%;
        width: 80%;
        height: 72%;
        gap: 4px;
    }
    
    .webcam-player-name {
        font-size: 0.62em;
    }
    
    .webcam-toggle {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
    
    #toggle-all-webcams {
        padding: 4px 7px;
        font-size: 0.7em;
    }
}

/* ESTACIONES DIGITALES - MULTIPLAYER */
.cell.digital-station {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border: 2px solid #5a67d8 !important;
    position: relative;
    overflow: hidden;
}

.cell.digital-station::before {
    content: '📱';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.8em;
    opacity: 0.7;
}

.cell.digital-station:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cell.digital-station.property-owned {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
    border-color: #38a169 !important;
}

.cell.digital-station.property-owned::before {
    content: '✅';
}

/* Colores específicos para estaciones digitales en multiplayer */
.cell.digital-station.property-owned.tiktok {
    background: linear-gradient(135deg, #ff0050 0%, #ff4081 100%) !important;
}

.cell.digital-station.property-owned.wifi {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%) !important;
}

.cell.digital-station.property-owned.youtube {
    background: linear-gradient(135deg, #ff5722 0%, #d84315 100%) !important;
}

.cell.digital-station.property-owned.instagram {
    background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%) !important;
}

/* Indicador de monopolio digital en multiplayer */
.digital-monopoly-indicator {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 3px solid #ffd700;
    border-radius: 8px;
    animation: digital-glow-mp 2s infinite alternate;
    pointer-events: none;
}

@keyframes digital-glow-mp {
    0% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

/* Estilos para popup de estaciones en multiplayer */
.popup-estacion-digital .opciones-titulo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.popup-estacion-digital .opciones-precio {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
}

/* Responsive para estaciones digitales en multiplayer */
@media (max-width: 900px) {
    .cell.digital-station::before {
        font-size: 0.6em;
        top: 1px;
        right: 1px;
    }
    
    .digital-monopoly-indicator {
        border-width: 2px;
    }
}

/* ===== SISTEMAS LLADOS AVANZADOS ===== */

/* Popup de seguidores */
#popup-seguidores {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.seguidores-visual {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
    color: white;
    font-family: 'Arial Black', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.seguidores-header {
    margin-bottom: 20px;
    position: relative;
}

.seguidores-titulo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.seguidores-balance {
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.seguidores-opciones {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.seguidor-opcion {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.seguidor-opcion:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.seguidor-opcion.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.seguidor-opcion-nombre {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.seguidor-opcion-precio {
    font-size: 16px;
    color: #f1c40f;
    margin-bottom: 5px;
}

.seguidor-opcion-descripcion {
    font-size: 14px;
    opacity: 0.9;
}

/* Popup de logros */
#popup-logros {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.logros-visual {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
    color: white;
    font-family: 'Arial Black', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.logros-header {
    margin-bottom: 20px;
    position: relative;
}

.logros-titulo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.logros-lista {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.logro-item {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    transition: all 0.3s ease;
}

.logro-item.completado {
    background-color: rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
}

.logro-item.completado .logro-icon {
    animation: bounce 2s infinite;
}

.logro-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logro-icon {
    font-size: 32px;
}

.logro-info {
    flex: 1;
}

.logro-nombre {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.logro-descripcion {
    font-size: 14px;
    opacity: 0.9;
}

.logro-progreso {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.8;
}

.logro-recompensa {
    margin-top: 10px;
    font-size: 14px;
    color: #f1c40f;
    font-weight: bold;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Estilos para el rango en el display del jugador */
.player-rank-info {
    font-size: 14px;
    margin: 5px 0;
    padding: 5px 10px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
}

.rank-novato { color: #95a5a6; }
.rank-alpha { color: #3498db; }
.rank-influencer { color: #9b59b6; }
.rank-mentor { color: #e67e22; }
.rank-supremo { color: #f1c40f; }

/* Responsive para sistemas LLADOS */
@media (max-width: 900px) {
    .seguidores-visual, .logros-visual {
        padding: 20px;
        max-width: 95vw;
    }
    
    .seguidor-opcion, .logro-item {
        padding: 15px;
    }
    
    .seguidores-titulo, .logros-titulo {
        font-size: 20px;
    }
}

/* =========================================================
   PANEL MULTIPLAYER INTEGRADO EN COLUMNA DERECHA (NO TAPA TABLERO)
   ========================================================= */
#multiplayer-sidebar-panel {
    width: 100%;
    flex-shrink: 0;
}

.multiplayer-integrated-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: #f8fafc;
    border: 2px solid #22c55e;
    border-radius: 8px;
    padding: 6px 8px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 4px;
    font-size: 11px;
}

.mp-room-badge strong {
    color: #4ade80;
    letter-spacing: 0.5px;
}

.mp-players-count {
    background: rgba(255,255,255,0.12);
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.mp-players-chips {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 76px;
    overflow-y: auto;
}

.mp-player-chip {
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-player-chip.mp-chip-self {
    background: rgba(34, 197, 94, 0.25);
    border-left: 2px solid #4ade80;
    font-weight: bold;
}

.mp-media-controls {
    display: flex;
    gap: 4px;
    justify-content: space-between;
    padding-top: 2px;
}

.mp-btn {
    flex: 1;
    border: none;
    color: white;
    padding: 4px 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10.5px;
    font-weight: bold;
    transition: opacity 0.2s, transform 0.1s;
    text-align: center;
    white-space: nowrap;
}

.mp-btn:hover {
    opacity: 0.92;
}

.mp-btn-success { background: #16a34a; }
.mp-btn-danger  { background: #dc2626; }
.mp-btn-warn    { background: #ea580c; }
.mp-btn-muted   { background: #475569; }
.mp-btn-info    { background: #2563eb; }

@media (max-width: 900px) and (orientation: portrait) {
    .mp-players-chips {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }
}

@media (max-width: 960px) and (orientation: landscape), (max-height: 550px) and (orientation: landscape) {
    .multiplayer-integrated-card {
        padding: 4px 5px;
        font-size: 10px;
        gap: 3px;
    }
    .mp-card-header {
        font-size: 9.5px;
        padding-bottom: 2px;
    }
    .mp-player-chip {
        font-size: 9.5px;
        padding: 1px 4px;
    }
    .mp-btn {
        font-size: 9.5px;
        padding: 3px 2px;
    }
}