/* ==== GLOBAL ==== */

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

body{font-family:Arial,Helvetica,sans-serif;background:#111;color:#ddd;}

a{color:#8cf;text-decoration:none;}

a:hover{color:#fff;}

button{cursor:pointer;padding:4px 8px;background:#333;color:#fff;border:1px solid #555;}

button:hover{background:#555;}



/* ==== TOPBAR ==== */

.topbar{background:#1a1a1a;padding:8px 15px;display:flex;justify-content:space-between;align-items:center;}

.logo img{height:40px;}

.userinfo{font-size:0.9rem;}



/* ==== STATUS BAR ==== */

.statusbar{
    background:linear-gradient(to bottom,#3a2d23 0%,#1d1510 100%);
    color:#f2d79b;
    font-family:"Times New Roman",serif;
    font-size:15px;
    letter-spacing:0.5px;
    padding:8px 15px;
    display:flex;
    justify-content:space-around;
    align-items:center;
    border-top:1px solid #6b5234;
    border-bottom:1px solid #6b5234;
    text-shadow:1px 1px 2px #000;
    box-shadow:inset 0 0 5px rgba(0,0,0,0.6),0 2px 5px rgba(0,0,0,0.5);
}

.statusbar span{
    flex:1;
    text-align:center;
    position:relative;
}

.statusbar strong{
    color:#ffda73;
    text-shadow:0 0 3px #000;
}

/* Health bar container */
.healthbar{
    position:relative;
    width:100px;
    height:14px;
    margin:0 auto;
    border:1px solid #2e2e2e;
    border-radius:4px;
    background:#1b1b1b;
    overflow:hidden;
    box-shadow:inset 0 0 5px rgba(0,0,0,0.7);
    display:inline-block;
    vertical-align:middle;
}

/* Health fill bar (animated color + width) */
.health-fill{
    height:100%;
    background:linear-gradient(to right,#006400,#00cc00);
    box-shadow:inset 0 0 5px rgba(0,0,0,0.4),0 0 5px rgba(0,255,0,0.4);
    transition:width 0.8s ease-in-out,background 0.8s ease-in-out;
}

/* Health text inside bar */
.health-text{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    line-height:14px;
    text-align:center;
    font-size:12px;
    color:#fff;
    text-shadow:1px 1px 1px #000;
}

/* Dynamic colors for health bar (red/yellow/green) */
.healthbar[data-color="green"] .health-fill{
    background:linear-gradient(to right,#008000,#00e000);
}

.healthbar[data-color="yellow"] .health-fill{
    background:linear-gradient(to right,#e0b000,#ffd700);
}

.healthbar[data-color="red"] .health-fill{
    background:linear-gradient(to right,#b30000,#ff0000);
}

/* Responsive tweaks */
@media (max-width:768px){
    .statusbar{
        flex-wrap:wrap;
        font-size:13px;
        padding:10px;
    }
    .statusbar span{
        flex:50%;
        margin:3px 0;
    }
}



/* ==== WRAPPER ==== */

.wrapper{display:flex;min-height:calc(100vh - 56px);}

.menu{width:220px;background:#222;padding:15px;}

.menu ul{list-style:none;}

.menu li{margin:8px 0;}

.menu a{display:block;padding:6px 10px;background:#333;border-left:4px solid transparent;}

.menu a:hover,.menu a.active{border-left-color:#8cf;background:#444;}

.menu .admin a{color:#ff8;}



/* ==== CONTENT ==== */

.content{flex:1;padding:20px;background:#181818;}



/* ==== TABLES ==== */

table{width:100%;border-collapse:collapse;margin-top:15px;}

th,td{padding:8px;border:1px solid #444;background:#222;}

th{background:#333;}



/* ==== FORMS ==== */

form label{display:block;margin-bottom:4px;}

form input[type=text],
form input[type=email],
form input[type=password],
form input[type=number]{width:100%;max-width:300px;padding:6px;background:#333;color:#fff;border:1px solid #555;}

form button{margin-top:10px;}



/* ==== MESSAGES ==== */

.error{color:#f88;}

.msg{color:#8f8;}



/* ==== SPOT ==== */

.spot{background:#222;padding:15px;border:1px solid #444;margin-top:15px;}
.rankbar {
    position: relative;
    display: inline-block;
    width: 140px;
    height: 12px;
    background: #222;
    border-radius: 4px;
    overflow: hidden;
    margin-left: 6px;
    vertical-align: middle;
}
.rank-fill {
    height: 100%;
    background: linear-gradient(to right, #ffd700, #ff8c00);
}
.rank-text {
    position: absolute;
    inset: 0;
    text-align: center;
    font-size: 10px;
    line-height: 12px;
    color: #000;
    font-weight: bold;
}