body{
    font-family: Arial, sans-serif;
    background:#111;
    color:white;
    margin:0;
    text-align:center;
}

/* ================= TOP NAV ================= */

.top-nav{
    width:100%;
    background:#000;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 15px;
    position:sticky;
    top:0;
    z-index:1500;
}

.nav-left, .nav-right{
    display:flex;
    align-items:center;
}

.nav-btn{
    background:none;
    border:none;
    color:white;
    font-size:20px;
    margin:0 6px;
    cursor:pointer;
    padding:6px;
    border-radius:6px;
    transition:0.3s;
}

.nav-btn:hover{
    background:#222;
    color:red;
}

/* ================= SIDEBAR ================= */

.sidebar{
    position:fixed;
    top:0;
    left:-280px;
    width:260px;
    height:100vh;
    background:#0d0d0d;
    transition:0.3s ease;
    z-index:2000;
    box-shadow:3px 0 15px rgba(0,0,0,0.6);
    overflow-y:auto;
}

.sidebar.active{
    left:0;
}

/* Header */
.sidebar-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px;
    border-bottom:1px solid #222;
}

.sidebar-logo{
    display:flex;
    align-items:center;
}

.sidebar-logo img{
    width:55px;
    height:55px;
    margin-right:10px;
}

.logo-text h2{
    margin:0;
    font-size:16px;
}

.logo-text p{
    margin:0;
    font-size:11px;
    color:#bbb;
}

.close-btn{
    background:none;
    border:none;
    color:white;
    font-size:18px;
    cursor:pointer;
}

/* Buttons */
.side-btn{
    display:block;
    width:85%;
    margin:10px auto;
    padding:10px;
    background:#111;
    border:1px solid #222;
    color:white;
    border-radius:8px;
    cursor:pointer;
    text-align:left;
    transition:0.3s;
}

.side-btn:hover{
    background:red;
}

.side-btn.disabled{
    opacity:0.5;
    cursor:not-allowed;
}

.sidebar-footer{
    margin:20px;
    font-size:12px;
    color:#bbb;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar{
    width:6px;
}
.sidebar::-webkit-scrollbar-thumb{
    background:red;
    border-radius:10px;
}

/* ================= MAIN ================= */

.main-title{
    margin-top:20px;
}

#sosBtn{
    background:red;
    color:white;
    padding:16px 35px;
    font-size:20px;
    border:none;
    border-radius:12px;
    cursor:pointer;
}

#status{
    margin-top:10px;
    color:lightgreen;
    font-weight:bold;
}

.banner{
    position:fixed;
    top:55px;
    width:100%;
    background:red;
    color:white;
    padding:10px;
    font-weight:bold;
    z-index:1400;
}

.hidden{
    display:none;
}

#map{
    height:380px;
    width:92%;
    margin:20px auto;
    border-radius:12px;
}

/* Responsive */
@media (max-width:768px){
    #map{
        height:300px;
    }
}
/* ================= ECG HEARTBEAT LOADER ================= */

#loader{
    position:fixed;
    width:100%;
    height:100%;
    background:#000;
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

/* ECG Container */
.ecg-container{
    width:80%;
    max-width:500px;
    height:80px;
    overflow:hidden;
    position:relative;
}

/* ECG Line */
.ecg-line{
    position:absolute;
    width:200%;
    height:100%;
    background:
        linear-gradient(to right,
            transparent 0%,
            transparent 10%,
            #00ff4c 10%,
            #00ff4c 12%,
            transparent 12%,
            transparent 20%,
            #00ff4c 20%,
            #00ff4c 22%,
            transparent 22%,
            transparent 30%,
            #00ff4c 30%,
            #00ff4c 35%,
            transparent 35%,
            transparent 100%
        );
    background-size:200px 100%;
    animation: ecgMove 1.5s linear infinite;
}

/* Moving effect */
@keyframes ecgMove{
    from{
        transform: translateX(0);
    }
    to{
        transform: translateX(-50%);
    }
}

/* Glow Effect */
.ecg-line::after{
    content:"";
    position:absolute;
    width:100%;
    height:100%;
    background:inherit;
    filter:blur(6px);
    opacity:0.6;
}

/* ================= REAL ECG LOADER ================= */

#loader{
    position:fixed;
    width:100%;
    height:100%;
    background:#000;
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
    flex-direction:column;
}

.ecg-wrapper{
    width:80%;
    max-width:600px;
}

.ecg-svg{
    width:100%;
    height:100px;
}

.ecg-path{
    fill:none;
    stroke:#00ff4c;
    stroke-width:3;
    stroke-dasharray:600;
    stroke-dashoffset:600;
    animation: drawECG 2s linear infinite;
}

@keyframes drawECG{
    to{
        stroke-dashoffset:0;
    }
}