* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif;
    overflow: hidden; /* Prevent scrolling */
}

body {
    -webkit-touch-callout: none; /* Disable callouts like long-press */
    -webkit-user-select: none; /* Disable text selection */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling */
    touch-action: none; /* Disable touch actions like pinch-to-zoom */
}

.main-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background-color: #f7f9fc;
    overflow: hidden; /* Prevent content from overflowing the container */
}

.status-indicator {
    font-size: 0.9rem;
    display: flex;
    gap: 15px;
}

.status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.online span {
    background-color: #28a745; /* Green */
}

.offline span {
    background-color: #dc3545; /* Red */
}

.connected span {
    background-color: #28a745; /* Green */
}

.disconnected span {
    background-color: #dc3545; /* Red */
}

.signal-strength span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #00509e;
    color: #fff;
    padding: 1rem 2rem; /* Use relative units for padding */
    font-size: 1.5vw; /* Use relative units for font size */
    font-weight: bold;
    margin: 10px 10px 0 10px; /* Tiny space above, left, and right */
    border-radius: 10px;
    box-sizing: border-box; /* Ensure padding and borders are included in width calculations */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .header-container {
        padding: 0.8rem 1.5rem;
        font-size: 2vw;
        margin: 2px; /* Maintain tiny space for smaller screens */
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.5rem 1rem;
        font-size: 2.5vw;
        margin: 2px; /* Maintain tiny space for very small screens */
    }
}

.tab-container {
    display: inline-flex; /* Use inline-flex to make container fit content */
    flex-wrap: nowrap;
    background-color: #cce4ff;
    padding: 1rem 2rem;
    margin: 5px 10px 0 10px;
    border-radius: 10px;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.tab-button {
    text-align: center;
    padding: 0.5rem 1rem;
    border: 1px solid #00509e;
    background-color: #e8f4ff;
    color: #00509e;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    margin: 0 2px;
    white-space: nowrap;
    box-sizing: border-box;
}

.tab-button.active {
    background-color: #00509e;
    color: #fff;
}

/* Media Queries for responsive adjustments */
@media (max-width: 768px) {
    .tab-button {
        padding: 0.4rem 0.8rem; /* Reduce padding for smaller screens */
        font-size: 0.9rem; /* Slightly smaller font size for smaller screens */
    }
}

@media (max-width: 480px) {
    .tab-button {
        padding: 0.3rem 0.6rem; /* Further reduce padding for very small screens */
        font-size: 0.8rem; /* Smaller font size for very small screens */
    }
}

.iframe-container {
    flex: 1;
    margin: 20px;
    padding: 20px;
    border-radius: 10px;
    height: calc(90% - 120px);
    background-color: #fff;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}


.loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.loading img {
    width: 50px;
    height: 50px;
}

.loading p {
    font-size: 1rem;
    margin-top: 10px;
}