.direction-btn {
    width: 60px;
    height: 60px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    margin: 5px;
}

.direction-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.direction-btn i {
    font-size: 1.5rem;
}

#stopBtn {
    background-color: var(--bs-danger);
    color: white;
}

#stopBtn:hover {
    background-color: var(--bs-danger-dark);
}

#powerBtn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#powerBtn i {
    font-size: 2rem;
}

#powerBtn.active {
    background-color: var(--bs-danger);
    color: white;
}

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

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Add touch-action manipulation for better mobile experience */
button {
    touch-action: manipulation;
}

/* Disable text selection on buttons */
button {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Loading state styles */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: "";
    width: 1rem;
    height: 1rem;
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.container {
    min-height: 100%;
}

.container>* {
    min-height: 100%;
}

.card {
    min-height: 100%;
}

.card-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.btn-group {
    gap: 20px;
}

.joystick-container {
    background-color: #000080;
    flex-grow: 1
}