/* --- GLOBAL BASICS --- */
body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 15px;
    text-align: center;
    box-sizing: border-box;
}

.logo { width: 100%; max-width: 450px; margin-bottom: 20px; }
a { text-decoration: none; }

/* =========================================
   HOME PAGE (DASHBOARD) STYLES
   ========================================= */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px 10px;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #333;
    background: #1a1a1a;
    transition: background 0.2s, transform 0.1s;
    min-height: 80px; 
    color: white;
    cursor: pointer;
    position: relative; /* CRITICAL for the dot */
}

.menu-btn:active {
    background: #252525;
    transform: scale(0.98);
    border-color: #555;
}

/* --- STATUS DOT (UPDATED VISIBILITY) --- */
.status-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;           /* Slightly larger */
    height: 12px;
    border-radius: 50%;
    
    /* The "OFF" State - High Contrast */
    background-color: #000000; 
    border: 2px solid #444;    /* Distinct border */
    
    box-shadow: inset 0 1px 3px rgba(0,0,0,1);
    transition: all 0.3s ease;
    z-index: 10;           /* Force on top */
}

/* The Green ON State */
.status-dot.on {
    background-color: #00e676; /* Bright Neon Green */
    border-color: #00e676;
    box-shadow: 0 0 10px #00e676, inset 0 0 5px white; /* LED Glow effect */
}


.btn-title { color: #e0e0e0; font-size: 1.1rem; font-weight: 700; text-transform: uppercase; margin-bottom: 5px; }
.sub-text { color: #666666; font-size: 0.75rem; font-weight: 400; }

.lang-pill {
    display: inline-flex; align-items: center; justify-content: center;
    margin-top: 25px; padding: 8px 20px;
    background: #111; border: 1px solid #444; border-radius: 50px;
    color: #888; font-size: 0.85rem; font-weight: bold; cursor: pointer;
}
.globe-icon { width: 16px; height: 16px; margin-right: 8px; fill: currentColor; }
.logout, .back-link { display: block; margin-top: 15px; color: #444; font-size: 0.8rem; }

/* =========================================
   DOORS & LIGHTS PAGE STYLES
   ========================================= */
.section-title {
    font-size: 1.5rem; color: #888; margin: 20px 0 10px 0;
    text-transform: uppercase; letter-spacing: 2px;
    border-bottom: 1px solid #333; padding-bottom: 5px;
}

/* 9BLOCK GRID */
.connected-grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr 1fr; 
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 30px auto;
}
.area-c { grid-row: 1; grid-column: 1; }
.area-b { grid-row: 2; grid-column: 1; }
.area-a { grid-row: 3; grid-column: 1; }
.area-d { grid-row: 1; grid-column: 3; }
.area-e { grid-row: 2; grid-column: 3; }
.area-f { grid-row: 3; grid-column: 3; }

.area-bridge { display: grid; grid-template-rows: 1fr 1fr 1fr; gap: 10px; height: 100%; }
.door-trigger { background: #222; border: 1px dashed #555; font-size: 0.8rem; }

/* HOGARTH GRID */
.hogarth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; max-width: 600px; margin: 0 auto; }

/* =========================================
   POPUPS / MODALS
   ========================================= */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 1000; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: #111; border: 1px solid #444; padding: 30px;
    width: 90%; max-width: 400px; border-radius: 15px; text-align: center;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}
.modal-title { font-size: 1.8rem; font-weight: bold; margin-bottom: 5px; }
.modal-subtext { color: #888; margin-bottom: 25px; }

/* SLIDER */
.slider-container {
    width: 100%; height: 60px; background: #222; border-radius: 30px;
    position: relative; overflow: hidden; margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}
.slide-track { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.slide-text { position: absolute; width: 100%; text-align: center; color: #555; font-weight: bold; letter-spacing: 1px; pointer-events: none; z-index: 1; }
.slide-fill { position: absolute; left: 0; top: 0; height: 100%; background: #2e7d32; width: 0; transition: width 0.1s; z-index: 0; }
.slide-handle { width: 60px; height: 60px; background: #fff; border-radius: 50%; position: absolute; left: 0; top: 0; cursor: grab; z-index: 2; display: flex; align-items: center; justify-content: center; box-shadow: 2px 0 5px rgba(0,0,0,0.5); }
.handle-icon { color: #000; font-weight: bold; font-size: 1.5rem; }

/* DOOR CONTROLS */
.door-controls-grid { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.door-btn { padding: 20px; font-size: 1.2rem; font-weight: bold; border: none; border-radius: 8px; cursor: pointer; color: white; }

.btn-open, .btn-close { background: #2e7d32; } 
.btn-stop { background: #d32f2f; } /* Red */

.btn-open:active, .btn-stop:active, .btn-close:active { transform: scale(0.98); opacity: 0.8; }
.close-btn, .btn-exit-modal { background: transparent; border: 1px solid #444; color: #888; padding: 10px 20px; border-radius: 20px; cursor: pointer; margin-top: 10px; }
