/* ==================== TELESCOPE MONITOR LAYOUT ==================== */
/* Shared tokens, reset, body background & scrollbars come from base.css */

/* ==================== MAIN CONTAINER ==================== */
.container-main {
    max-width: 1600px;
    margin: 0 auto 40px;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.monitor-title {
    font-size: 1.2em;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--text-primary);
    white-space: nowrap;
}

.monitor-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    margin-right: 9px;
    vertical-align: middle;
}

/* ==================== MONITOR CONTENT ==================== */
.monitor-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.monitor-header {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 14px 24px;
    box-shadow: var(--shadow-primary);
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.monitor-header h1 {
    font-size: 2.2em;
    color: var(--accent-color);
    margin-bottom: 8px;
    font-weight: 400;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.monitor-header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--secondary-purple));
    border-radius: 2px;
}

.monitor-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
    font-style: italic;
    margin-bottom: 20px;
}

.connection-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.control-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.individual-controls {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.connect-all-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border-left: 1px solid var(--border-color);
    padding-left: 15px;
    margin-left: 12px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-connect {
    background: var(--success-color);
    color: white;
}

.btn-connect:hover {
    background: #00a085;
    transform: translateY(-1px);
}

.btn-disconnect {
    background: var(--error-color);
    color: white;
}

.btn-disconnect:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

.btn-connect-small {
    background: var(--success-color);
    color: white;
    padding: 3px 6px;
    font-size: 10px;
    min-width: 55px;
    border-radius: 4px;
}

.btn-connect-small:hover {
    background: #00a085;
    transform: translateY(-1px);
}

.btn-disconnect-small {
    background: var(--error-color);
    color: white;
    padding: 3px 6px;
    font-size: 10px;
    min-width: 55px;
    border-radius: 4px;
}

.btn-disconnect-small:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

.last-update-small {
    color: var(--text-muted);
    font-size: 10px;
    text-align: center;
    min-height: 14px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
}

.last-update {
    color: var(--text-muted);
    font-size: 14px;
}

.last-update-only {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.host-selector-buttons {
    display: flex;
    gap: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border-hairline);
    border-radius: 999px;
    padding: 3px;
}

.host-status {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 5px 14px;
    border-radius: 999px;
    cursor: default;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
}

.host-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #555; /* Unknown/Offline default */
    display: inline-block;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease;
}

.host-status-dot.online {
    background-color: var(--success-color);
    box-shadow: 0 0 6px var(--success-color);
}

.host-status-dot.offline {
    background-color: var(--error-color);
}

.host-status.active {
    background: rgba(139, 123, 240, 0.15);
    border-color: rgba(139, 123, 240, 0.4);
    color: var(--text-primary);
}

.idle-duration {
    color: var(--text-muted);
    font-size: 14px;
}

/* ==================== MAIN GRID ==================== */
/* Dashboard layout: sky views on top, telemetry cards in a row,
   then last image + weather, with the log section full-width below. */
.main-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
        "sky sky allsky allsky"
        "camera camera telescope domeguider"
        "lastimage lastimage weather weather";
    gap: 20px;
    margin-bottom: 30px;
}

.grid-sky { grid-area: sky; }
.grid-allsky { grid-area: allsky; }
.grid-telescope { grid-area: telescope; }
.grid-domeguider { grid-area: domeguider; }
.grid-camera { grid-area: camera; }
.grid-lastimage { grid-area: lastimage; }
.grid-weather { grid-area: weather; }

.aladin-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-primary);
    height: 400px;
    position: relative;
    overflow: hidden;
}

.aladin-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Floating controls for the last-captured-frame overlay drawn on the FOV
   rectangle - sits on top of the Aladin view, off by default. */
.fov-overlay-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--border-hairline);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.fov-overlay-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.fov-overlay-toggle input[type="checkbox"] {
    cursor: pointer;
}

.fov-overlay-opacity {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.fov-overlay-opacity input[type="range"] {
    width: 80px;
    cursor: pointer;
}

#aladin-lite-div {
    width: 100%;
    height: 92%;
    border-radius: 10px;
    overflow: hidden;
}

.telescope-card,
.dome-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    box-shadow: var(--shadow-primary);
}

.dome-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dome-card .coord-group {
    height: auto;
}

.guider-section {
    padding-top: 16px;
    border-top: 1px solid var(--border-hairline);
}

.coord-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    justify-content: flex-start;
}

.coord-group-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: 8px;
    border: 1px solid var(--border-hairline);
    min-height: 45px;
}

.coord-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    flex: 1;
    max-width: calc(50% - 4px);
}

.coord-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
    text-align: center;
}

.coord-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* RA/DEC show degrees stacked above the sexagesimal (HH:MM:SS / DD:MM:SS)
   form, kept tight and small so both fit in the same coord-item. */
.coord-value:has(.coord-deg) {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1.2;
}

.coord-deg {
    font-size: 13px;
    font-weight: 600;
}

.coord-hms {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
}

/* ==================== WEATHER INFO ==================== */
.weather-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: 8px;
    border: 1px solid var(--border-hairline);
}

.weather-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    flex: 1;
}

.weather-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
    text-align: center;
}

.weather-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* Weather Container Layout */
.weather-container {
    display: flex;
    gap: 15px;
    height: 100%;
}

.weather-data {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weather-radar {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.radar-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border-radius: 8px;
    border: 1px solid var(--border-hairline);
    overflow: hidden;
    position: relative;
    min-height: 150px;
    max-height: 350px;
}

.radar-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    max-height: 100%;
    max-width: 100%;
}

.radar-image .image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 20px;
}

.allsky-container, .camera-info, .second-cam, .last-image {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-primary);
}

.allsky-container {
    height: auto;
}

.guider-state-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    background: var(--surface-2);
    color: var(--text-muted);
    vertical-align: middle;
}

.guider-state-badge.guiding {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success-color);
}

.guider-state-badge.not-guiding {
    background: rgba(239, 90, 90, 0.15);
    color: var(--error-color);
}

.coord-group label,
.allsky-container label,
.aladin-container label,
.weather-info label,
.camera-info label,
.second-cam label,
.last-image label,
.rain-alert-section label {
    display: block;
    margin-bottom: 12px;
    color: var(--secondary-purple);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.allsky-image {
    width: 100%;
    background: var(--surface-2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    overflow: hidden;
    position: relative;
    min-height: 52px;
    max-height: 420px;
    transition: height 0.25s ease;
}

.allsky-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.cam-image {
    width: 100%;
    height: 140px;
    background: var(--surface-2);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.weather-item span:last-child {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 500;
}

.camera-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: 8px;
    border: 1px solid var(--border-hairline);
}

.detail-item span:first-child {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.detail-item span:last-child {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 500;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.3px;
    position: absolute;
    top: 0;
    left: 0;
}

.alert-status {
    padding: 12px;
    background: rgba(0, 185, 148, 0.1);
    border: 1px solid var(--success-color);
    border-radius: 8px;
    color: var(--success-color);
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.second-cam {
    height: 200px;
}

.second-cam .cam-image {
    height: 140px;
}

/* ==================== LOG SECTION ==================== */
.log-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-primary);
}

.log-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-hairline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-2);
}

.log-header h3 {
    font-size: 1.3em;
    color: var(--secondary-purple);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.log-controls {
    display: flex;
    gap: 10px;
}

.log-btn {
    padding: 8px 16px;
    border: 1px solid var(--secondary-purple);
    border-radius: 8px;
    font-size: 12px;
    background: rgba(162, 155, 254, 0.1);
    color: var(--secondary-purple);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.log-btn:hover {
    background: rgba(162, 155, 254, 0.2);
    transform: translateY(-1px);
}

.log-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.log-entry {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-hairline);
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: var(--text-muted);
    min-width: 140px;
    font-weight: 400;
}

.log-level {
    min-width: 50px;
    font-weight: 500;
    text-transform: uppercase;
}

.log-level.info {
    color: var(--info-color);
}

.log-level.warning {
    color: var(--warning-color);
}

.log-level.error {
    color: var(--error-color);
}

.log-level.success {
    color: var(--success-color);
}

.log-message {
    flex: 1;
    color: var(--text-secondary);
    word-wrap: break-word;
}

/* ==================== CAMERA INFO ==================== */
.camera-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.camera-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: 8px;
    border: 1px solid var(--border-hairline);
}

.camera-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    flex: 1;
}

.camera-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
    text-align: center;
}

.camera-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.progress-container {
    width: 100%;
    margin-top: 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--secondary-purple));
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 10px;
}

/* ==================== LAST IMAGE & ALL SKY CONTAINERS ==================== */
.last-image .image-container {
    position: relative;
    width: 100%;
    min-height: 52px;
    max-height: 420px;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.25s ease;
}

.last-image .image-container img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.allsky-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.image-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: 8px;
    border: 1px solid var(--border-hairline);
    text-align: center;
}

.image-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

/* Weather Info Section */
.weather-info-section {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: 8px;
    border: 1px solid var(--border-hairline);
    text-align: center;
}

.weather-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.weather-info {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-primary);
    width: 100%;
    display: flex;
    flex-direction: column; /* Ensure vertical layout */
}

.rain-alert-section {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

/* ==================== STATUS INDICATORS ==================== */
.status-container {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.status-item {
    width: auto;
    flex: 1 1 auto;
    min-width: 90px;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.status-item:hover::before {
    left: 100%;
}

.status-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Status color variants */
.status-slewing {
    background: linear-gradient(135deg, #ffb366, #ff9933);
    box-shadow: 0 2px 8px rgba(255, 153, 51, 0.3);
}

.status-slewing:hover {
    box-shadow: 0 4px 12px rgba(255, 153, 51, 0.5);
}

.status-home {
    background: linear-gradient(135deg, #66d9a6, #4dd18a);
    box-shadow: 0 2px 8px rgba(77, 209, 138, 0.3);
}

.status-home:hover {
    box-shadow: 0 4px 12px rgba(77, 209, 138, 0.5);
}

.status-parked {
    background: linear-gradient(135deg, #ff8a8a, #ff6b6b);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.status-parked:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
}

.status-tracking {
    background: linear-gradient(135deg, #a478ff, #8b5cf6);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.status-tracking:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
}

/* ==================== RAIN WARNING STYLES ==================== */
#rain-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#rain-warning .warning-icon {
    font-size: 14px;
}

#rain-warning .warning-text {
    font-size: 12px;
    font-weight: 600;
}

.status-item.high {
    background: linear-gradient(135deg, #ff8a8a, #ff6b6b);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}
.status-item.normal {
    background: linear-gradient(135deg, #ffb366, #ff9933);
    box-shadow: 0 2px 8px rgba(255, 153, 51, 0.3);
}
.status-item.clear {
    background: linear-gradient(135deg, #66d9a6, #4dd18a);
    box-shadow: 0 2px 8px rgba(77, 209, 138, 0.3);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "sky sky"
            "allsky allsky"
            "camera camera"
            "telescope domeguider"
            "lastimage lastimage"
            "weather weather";
    }
}

@media (max-width: 768px) {
    .container-main {
        max-width: 98%;
        margin: 0 auto 20px;
        padding: 10px;
    }
    
    .monitor-header h1 {
        font-size: 1.8em;
    }
    
    .connection-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .control-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .individual-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .connect-all-group {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 12px;
        margin-left: 0;
    }

    .control-group {
        align-items: stretch;
    }

    .btn-connect-small,
    .btn-disconnect-small {
        min-width: 90px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .main-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "sky"
            "allsky"
            "camera"
            "telescope"
            "domeguider"
            "lastimage"
            "weather";
    }

    .aladin-container {
        height: 300px;
    }

    .allsky-container {
        height: 300px;
    }

    .second-cam {
        height: 150px;
    }

    .allsky-image {
        height: 240px;
    }

    .cam-image {
        height: 90px;
    }
}

@media (max-width: 480px) {
    .monitor-header {
        padding: 20px;
    }

    .aladin-container, .telescope-card, .dome-card, .last-image, .camera-info,
    .allsky-container, .second-cam, .weather-info {
        padding: 15px;
    }
    
    .coord-group label, 
    .last-image label, 
    .camera-info label,
    .allsky-container label, 
    .weather-info label, 
    .second-cam label,
    .rain-alert-section label {
        font-size: 12px;
    }
}


/* ==================== RADAR NAVIGATION STYLES ==================== */
.radar-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.radar-image:hover .radar-nav-overlay {
    opacity: 1;
}

.radar-nav-btn {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}

.radar-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.radar-nav-btn:active {
    transform: scale(0.95);
}

.radar-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 0;
}

.radar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.radar-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.radar-dot.active {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(108, 92, 231, 0.5);
}

.radar-dot.active:hover {
    background: var(--secondary-purple);
    border-color: var(--secondary-purple);
}

.radar-pagination .radar-dot {
    position: relative;
}

.radar-pagination .radar-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.radar-pagination .radar-dot.active::after {
    border-color: rgba(108, 92, 231, 0.3);
}

/* ==================== METEOGRAM STYLES ==================== */
.meteogram-image {
    width: 100%;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border-radius: 8px;
    border: 1px solid var(--border-hairline);
    overflow: hidden;
    position: relative;
    min-height: 130px;
    max-height: 170px;
}

.meteogram-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    max-height: 100%;
    max-width: 100%;
}

.meteogram-image .image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 20px;
}

/* Device Control Buttons */
.device-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.control-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.control-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.disconnect-btn {
    background: var(--error-color);
    color: white;
}

.disconnect-btn:hover:not(:disabled) {
    background: #cc0000;
    transform: translateY(-1px);
}

.connect-btn {
    background: var(--success-color);
    color: white;
}

.connect-btn:hover:not(:disabled) {
    background: #00a085;
    transform: translateY(-1px);
}

/* Status Indicator Header */
.system-status-indicator {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
}

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

.status-unit .status-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1.1em;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #555; /* Offline/Unknown */
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.status-dot.active {
    background-color: #00b894; /* Online green */
    box-shadow: 0 0 10px #00b894;
}

.status-dot.offline {
    background-color: #e17055; /* Red */
}
