body {
    background-color: #0C1016 !important; /* Dark gray or any preferred color */
    color: white; /* Ensures text is readable */
    margin: 0;
    padding: 0;
}

.status-box.active {
    width: 20px;
    height: 20px;
    background-color: green;
    border-radius: 50%;
}

.status-box{
    width: 20px;
    height: 20px;
    background-color: rgb(102, 102, 102);
    border-radius: 50%;
}


/* Ensure proper positioning for mobile */
@media (max-width: 991px) { /* Bootstrap lg breakpoint */
    .d-flex.align-items-center {
        order: 1; /* Moves the light + menu together to the right */
    }
}

input[type="text"] {
    width: 100%;
}

button {
    padding: 5px;
    font-size: 14px;
}
.status-box {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    margin-left: 10px;
}
.fan-container {
    background: rgba(0, 0, 0, 0); /* Transparent black (30% opacity) */
    border: 1px solid white; /* White border */
    padding: 15px;
    border-radius: 10px;
    width: 300px;
    height: 360px;
    text-align: flex-start;
    flex: 1; /* Allows flexible sizing */
    min-width: 300px; /* Prevents shrinking too much */
    max-width: 300px; /* Optional: Limits the maximum width */
    
}

.fan-label {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.fan-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.container {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping if the screen is too small */
    gap: 20px; /* Adds spacing between items */
    justify-content: flex-start; /* Centers the items if there's extra space */
    margin: 10px !important; /* Reduce margin */
    color: white;
    
}
.navbar{
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: #0C1016; /* Ensures it doesn't turn transparent */
}

.nav-buttons {
    margin: 0px;
    width: 120px;  /* Set a fixed width */
    height: 40px;  /* Set a fixed height */
    background: linear-gradient(135deg, #35333d, #141415);
    color: white;
    text-align: center; /* Center text horizontally */
    font-size: 16px; /* Adjust font size */
    border-radius: 0px; /* Make them completely square */
    display: inline-block; /* Ensures buttons stay in a row */
    white-space: nowrap; /* Prevents text wrapping */
    flex-shrink: 0;
    border: none; /* Removes any unwanted border */
    outline: none; /* Removes focus outline */
    box-shadow: none !important; /* Removes any shadow */
}
.nav-buttons:hover{
    background: #2775be ;
}



.nav-container {
    position: sticky;
    display: flex;
    border: 1px solid white; /* White border */
    overflow-x: auto;  /* Enables horizontal scrolling */
    scrollbar-color: #555 #333; /* Thumb & Track color for Firefox */
    white-space: nowrap;  /* Prevents wrapping to a new line */
    gap: 5px;  /* Adds spacing between buttons */
    padding: 5px;
    scrollbar-width: thin; /* Firefox scrollbar */
    margin: 5px 0px 0px ;
}
/* Custom Scrollbar */
::-webkit-scrollbar {
    height: 8px; /* Adjust the scrollbar height */
    background: #222; /* Dark background */
}

/* Scrollbar Track */
::-webkit-scrollbar-track {
    background: #333; /* Slightly lighter than the background */
    border-radius: 5px;
}

/* Scrollbar Thumb */
::-webkit-scrollbar-thumb {
    background: #555; /* Medium gray for contrast */
    border-radius: 5px;
}

/* Scrollbar Thumb on Hover */
::-webkit-scrollbar-thumb:hover {
    background: #777; /* Lighter gray on hover */
}
.btn-danger {
    background: linear-gradient(135deg, #35333d, #141415);
    /*color: white; /* Ensure text visibility */
    border: none; /* Remove default border */
    padding: 10px 20px; /* Adjust padding */
    font-size: 16px; /* Adjust text size */
    display: flex;
    align-items: center; /* Aligns the icon and text */
    justify-content: center;
    gap: 10px; /* Space between icon and text */
    border-radius: 5px; /* Slightly rounded corners */
    transition: background 0.3s ease; /* Smooth hover transition */
}
.fan-container button {
    margin-left: 30px; /* Offset to align with HAND */
    width: calc(100% - 30px); /* Adjust width */
    height: 40px;
}

.hand-indicator-container {
    display: flex;
    align-items: center;
    width: 100%;
    margin-left: 0; /* Ensure HAND stays aligned properly */
}

.hand-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #333; /* Default OFF state */
    border: 2px solid #666;
    transition: background-color 0.3s ease;
    flex-shrink: 0; /* Prevent resizing */
    margin-right: 10px;
}

/* Ensure the HAND button stays aligned correctly */
.hand-indicator-container button {
    margin-left: 0; /* No extra spacing for HAND */
    flex-grow: 1; /* Take up remaining space */
}
    
.hand-indicator.active {
    background-color: #00ff00; /* Bright green when active */
    border-color: 3px white;
}
.fan-container .active {
    color: #00ff00; /* Bright green when active */
    border-color: #00cc00;
}
        /* Hover Effect */
.btn-danger:hover {
    background: #2775be
}
.btn-danger:active {
    background: #becc00
}

.btn-check:checked+.btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check)+.btn:active{
    /*background: #00ff00; */
    background: linear-gradient(135deg,#141415,25%,#2a3845);
    box-shadow: inset 0px 0px 15px 0px rgb(0,0,0,0.8);
}

#switchIndex{
    margin: 5px;
}

.btn-warning {
    background:  linear-gradient(135deg, rgb(217, 81, 31) 0%, rgb(10, 13, 18) 100%);
    color : white;
    border: none;
   /* --bs-btn-bg :  linear-gradient(135deg, rgb(217, 81, 31) 0%, rgb(10, 13, 18) 100%); */
}
.btn-primary {
    background:  linear-gradient(135deg, rgb(0, 23, 100) 0%, rgb(10, 13, 18) 100%);
    color : white;
    border: none;
}
.btn-success {
    background: linear-gradient(135deg, rgb(56, 138, 52) 0%, rgb(10, 13, 18) 100%);
    color : white;
    border: none;
}
.blink-bg {
    animation: fadeBackground 0.75s infinite;
}
.sw-off-mode {
    animation: fadeBackgroundOFF 2.5s infinite;
}
@media (min-width: 768px) {
    .container, .container-md, .container-sm {
        max-width: none;
    }
    
}
@media (max-width: 900px) {
    .fan-container {
        max-width:  170px !important;  /* Shrinks the container */
        min-width: 170px !important;  /* Shrinks the container */
        font-size: 1em !important; /* Slightly smaller text */
        height : auto ;
    }
    .fan-container button {
        padding-left: 1px;
        padding-right: 1px;
    }
}
@keyframes blinkBackgroundOrange {
    0%, 100% {
        background-image: linear-gradient(135deg, rgb(217, 81, 31) 0%, rgb(10, 13, 18) 100%);
    }

    50% {
        background-image: var(--tchmi-background);
    }
}
@keyframes fadeBackground {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}
@keyframes fadeBackgroundOFF {
    100% {
        opacity: 0.35;
    }

    0% {
        opacity: 1;
    }
}