.friends-modal-content {
    max-width: 600px !important;
    width: 95% !important;
    height: 90vh !important;
    max-height: 80vh !important;
    padding: 20px !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(0, 30, 60, 0.95)) !important;
    border: 3px solid #00ff39 !important;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.friends-header,
.friends-tabs {
    flex-shrink: 0;
}

.tab-content {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 12px;
}

.friends-list,
.pending-requests-list,
.transactions-list,
.top10-list-scroll {
    max-height: none;
    overflow-y: visible;
    padding-bottom: 0;
    margin-bottom: 0;
}

.my-id {
    background: rgba(0, 255, 57, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 57, 0.3);
    align-items: center;
    gap: 10px;
    margin: 5px;
}

.my-id span {
    color: #00ff39;
    font-size: 1.2em;
    font-family: monospace;
}

.copy-id-btn {
    background: rgba(0, 255, 57, 0.2);
    color: #00ff39;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-id-btn:hover {
    background: rgba(0, 255, 57, 0.3);
}

.add-friend-section {
    margin: 10px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.add-friend-input {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.add-friend-btn {
    background: linear-gradient(45deg, #00ff39, #00cc44);
    color: black;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    width: 100%;
}

.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.friend-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.friend-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
}

.friend-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.friend-avatar {
    width: 30px;
    height: 30px;
    background: rgba(0, 255, 57, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.remove-friend-btn {
    background: rgba(255, 0, 0, 0.3);
    color: white;
    padding: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.friend-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.friend-name {
    font-size: 1em;
    font-weight: bold;
}

.friend-id {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    font-family: monospace;
}

.friend-stats {
    display: flex;
    gap: 10px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.9);
}

.friend-level {
    color: #00ff39;
}

.friend-rating {
    color: #FFD700;
}

.friend-actions {
    display: flex;
    gap: 10px;
    margin-left: 10px;
    flex-direction: column;
}

.friend-status {
    font-size: 0.8em;
    margin-top: 4px;
    padding: 2px 6px;
}

.friend-status.online {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.friend-status.offline {
    color: #8d8d8d;
    background: rgb(127 127 127 / 10%);
}

.play-friend-btn, .send-coins-btn {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: black;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    white-space: nowrap;
}

.play-friend-btn {
    background: linear-gradient(45deg, #00ff39, #00cc44);
}

.send-coins-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.friend-request-modal {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 20px;
    border-radius: 15px;
    border: 4px solid #00bfff;
    width: 90%;
    max-width: 90%;
    z-index: 999;
}

.friend-request-modal h3 {
    color: #00ff39;
    text-align: center;
    margin-bottom: 15px;
}

.friend-request-modal p {
    text-align: center;
    margin-bottom: 20px;
}

.friend-request-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.accept-btn {
    background: linear-gradient(45deg, #00ff39, #00cc44);
    color: black;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
}

.reject-btn {
    background: rgba(255, 0, 0, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
}

.friends-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 10px;
    border-radius: 8px;
    flex: 1;
    text-align: center;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(0, 255, 57, 0.2);
    color: #00ff39;
}

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.request-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.request-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.request-avatar {
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 57, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.request-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.request-name {
    font-weight: bold;
}

.request-id {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    font-family: monospace;
}

.request-date {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.5);
}

.request-actions {
    display: flex;
    gap: 8px;
}

.accept-request-btn {
    background: linear-gradient(45deg, #00ff39, #00cc44);
    color: black;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
}

.delete-request-btn {
    background: linear-gradient(45deg, #bf0024, #ff0030);
    color: #ffffff;
    padding: 8px 5px;
    border-radius: 8px;
    font-weight: bold;
}

.reject-request-btn, .cancel-request-btn {
    background: rgba(255, 0, 0, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
}

.no-requests-message {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Estilos para el indicador de carga */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.loading-indicator.hiding {
    opacity: 0;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-message {
    font-size: 14px;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Asegurar que el indicador siempre esté por encima de todo */
#friends-modal {
    z-index: 1000;
}

.loading-indicator {
    z-index: 1100;
}

/* Ajustar el estilo para que coincida con el tema del juego */
.loading-indicator {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(0, 30, 60, 0.95));
    border: 2px solid #00ff39;
}

/* Animaciones y transiciones */
.friend-item, .request-item {
    animation: fadeIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.friend-item.removing {
    animation: fadeOut 0.3s ease-out;
}

/* Mejoras en las pestañas */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    display: block;
    padding: 0px 15px 0px 0px;
    opacity: 1;
}

/* Mejoras en las listas */
.friends-list, .pending-requests-list, .sent-requests-list {
    transition: all 0.3s ease;
}

/* Mejoras en los contadores */
.tab-btn {
    transition: all 0.3s ease;
}

.tab-btn span {
    display: inline-block;
    transition: all 0.3s ease;
}

.remove-friend-confirmation-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 20px;
    border-radius: 15px;
    border: 3px solid #ff3333;
    width: 90%;
    max-width: 300px;
    z-index: 1100;
    text-align: center;
    animation: fadeInCenter 0.3s ease-out;
    opacity: 0;
}

@keyframes fadeInCenter {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.remove-friend-confirmation-modal.active {
    opacity: 1;
}

.remove-friend-confirmation-modal h3 {
    color: #ff3333;
    margin-bottom: 15px;
}

.remove-friend-confirmation-modal p {
    color: white;
    margin-bottom: 20px;
}

.remove-friend-confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.confirm-remove-btn {
    background: #ff3333;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cancel-remove-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.confirm-remove-btn:hover, .cancel-remove-btn:hover {
    transform: translateY(-2px);
}

#coins-notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coins-notification {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: black;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.coins-notification.hiding {
    opacity: 0;
}

.coins-notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.close-notification-btn {
    background: rgba(0, 0, 0, 0.2);
    color: black;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: background-color 0.3s ease;
}

.close-notification-btn:hover {
    background: rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Estilos para el modal de envío de monedas */
.send-coins-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(0, 30, 60, 0.95));
    padding: 20px;
    border-radius: 15px;
    border: 3px solid #ffd700;
    width: 90%;
    max-width: 300px;
    z-index: 1100;
    text-align: center;
}

.send-coins-modal h3 {
    color: #ffd700;
    margin-bottom: 20px;
}

.coins-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1.2em;
    margin: 15px 0;
    text-align: center;
}

.coins-input::-webkit-inner-spin-button,
.coins-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.transfer-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.confirm-transfer-btn {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: black;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.confirm-transfer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.cancel-transfer-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

/* Contenedor de notificaciones de monedas */
.coins-notification-container {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 400px;
    pointer-events: none;
}

/* Notificación específica de envío de monedas */
.coins-notification {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000000;
    padding: 12px;
    border-radius: 15px;
    text-align: center;
    animation: fadeInCoins 0.3s ease-out;
    border: 3px solid #FFD700;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 1.1em;
    pointer-events: auto;
    transition: all 0.3s ease;
}

/* Notificación de recibir monedas (mantener detrás del modal) */
.coins-notification.receive-notification {
    z-index: 999;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

/* Asegurar que el botón de cerrar también esté por encima */
.coins-notification.send-notification .close-notification-btn {
    z-index: 1501;
    position: relative;
}

@keyframes fadeInCoins {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para las transacciones */
.transactions-list {
    margin-top: 10px;
    max-height: 90%;
    overflow-y: auto;
}

.transactions-list h4 {
    color: #00ff39;
    margin: 15px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 255, 57, 0.2);
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.transaction-item.received {
    border-left: 3px solid #00ff39;
}

.transaction-item.sent {
    border-left: 3px solid #ff3333;
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.transaction-avatar {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.transaction-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.transaction-name {
    font-weight: bold;
    color: #ffffff;
}

.transaction-amount {
    font-size: 1.1em;
    font-weight: bold;
}

.transaction-item.received .transaction-amount {
    color: #00ff39;
}

.transaction-item.sent .transaction-amount {
    color: #ff3333;
}

.transaction-date {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
}

.no-transactions-message {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 20px;
}

/* Animación para nuevas transacciones */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.transaction-item {
    animation: slideInRight 0.3s ease-out;
}

/* Estilos para el TOP 10 */
.top10-header {
    text-align: center;
    margin-bottom: 20px;
}

.top10-header h4 {
    font-size: 1em;
    margin: 0;
    color: #00ff39;
}

.last-update {
    font-size: 0.8em;
    color: #666;
    margin: 5px 0 0;
}

.top10-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px;
}

.top10-player {
    display: flex;
    align-items: center;
    background: #3d3d3d;
    color: #ffffff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.2s;
}

.top10-player.first {
    background: linear-gradient(45deg, #007900, #32CD32);
    color: #fff;
}

.top10-player.second {
    background: linear-gradient(45deg, #313131, #C0C0C0);
    color: #fff;
}

.top10-player.third {
    background: linear-gradient(45deg, #8B4513, #CD7F32);
    color: #fff;
}

.top10-rank {
    font-size: 1.2em;
    font-weight: bold;
    width: 30px;
    text-align: center;
}

.top10-player-info {
    flex: 1;
    margin-left: 10px;
}

.top10-player-name {
    font-weight: bold;
    font-size: 1em;
}

.top10-player-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    margin-top: 5px;
}

.top10-medal {
    font-size: 1.5em;
    margin-left: 10px;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #666;
}

.no-data-message, .error-message {
    text-align: center;
    padding: 20px;
    color: #ffffff;
}

/* Ajustes para el modal de amigos */
.friends-modal-content {
    max-width: 600px;
    width: 95%;
}

.friends-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 100px;
    padding: 8px;
    text-align: center;
    background: #ff0074;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: #007bff;
    color: white;
}

.top10-list-scroll {
    max-height: none;
    overflow-y: visible;
    padding-bottom: 0;
    margin-bottom: 0;
}

.top10-badge {
    display: inline-block;
    background: #00ff39;
    color: #222;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 8px;
    padding: 2px 8px;
    margin-left: 8px;
    margin-right: 2px;
    vertical-align: middle;
}

.top10-badge.amigo {
    background: #007bff;
    color: #fff;
}

.top10-badge.tu {
    background: #FFD700;
    color: #222;
}

.top10-player-id {
    font-size: 0.85em;
    color: #bbb;
    font-family: monospace;
    margin-bottom: 2px;
    margin-top: 2px;
    letter-spacing: 1px;
} 
p.top10-info {
    font-size: 10px;
    margin: 10px;
}