﻿/* ==========================================================
   GLOBAL BASE
   ========================================================== */

body {
    margin: 0;
    font-family: Arial, Verdana, sans-serif;
    font-size: 13px;
    color: #fff;
}

/* High visibility links */
a {
    color: #a7d8ff;
    font-weight: bold;
    text-decoration: underline;
    text-shadow: 0 0 6px rgba(0,150,255,0.9);
}

a:hover {
    color: #ffdd66;
    text-shadow: 0 0 8px rgba(255,220,120,1);
}

/* Main container */
#main {
    width: 100%;
    height: 100%;
    margin-top: 100px;
    position: relative;
    z-index: 1;
}

/* Background */
#background1 {
    position: absolute;
    margin: 0;
    height: 100%;
    width: 100%;
    z-index: 0;
}

/* ==========================================================
   RIGHT COLUMN (user panel, menu, donate)
   ========================================================== */

#rightColumn {
    position: absolute;
    top: 15px;
    right: 10px;
    width: 258px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3;
}

.collapsible {
    width: 100%;
}

.collapse-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(0, 40, 120, 0.55);
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 0 6px rgba(0,150,255,0.8);
    cursor: pointer;
}

.collapse-toggle::after {
    content: 'v';
    font-weight: bold;
    font-size: 14px;
}

.collapsible.collapsed .collapse-toggle::after {
    content: '>';
}

.collapse-body {
    margin-top: 6px;
}

.collapsible.collapsed .collapse-body {
    display: none;
}

#stats1,
#account,
#donate {
    width: 100%;
    position: relative;
}

/* Keep Grid Stats and the bottom-left blocks in one vertical flow. */
#leftSidebar {
    position: absolute;
    top: 15px;
    left: 10px;
    width: 258px;
    min-height: calc(100vh - 20px);
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#leftColumn {
    margin-top: auto;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#motd,
#links,
#versionBox {
    position: static;
    width: 100%;
}

#motd { font-size: 16px; }
#links { font-size: 16px; }
#versionBox { font-size: 15px; }

.versionBoxContent {
    text-align: center;
}

.version-title {
    font-weight: bold;
    font-size: 16px;
}

.version-date {
    font-size: 14px;
    color: #dce8ff;
}

/* ==========================================================
   PANELS / FIELDSETS
   ========================================================== */

fieldset {
    padding: 10px;
    border-radius: 12px;
}

fieldset.stats,
fieldset.rss,
fieldset.donate,
fieldset.account,
fieldset.white2,
fieldset.grey {
    border: 3px solid rgba(255,255,255,0.4);
    background: linear-gradient(to bottom,
        rgba(60, 120, 255, 0.45),
        rgba(0, 40, 120, 0.45)
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ==========================================================
   GRID CLOCK / STATUS
   ========================================================== */

#clockFieldset {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    padding: 12px;
    border-radius: 12px;
    border: 3px solid rgba(255,255,255,0.4);
    background: linear-gradient(to bottom,
        rgba(60,120,255,0.45),
        rgba(0,40,120,0.45)
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    z-index: 5;
}

#gridClockContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#gridStatusBlock {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#gridStatusLabel {
    font-family: "Courier New", monospace;
    font-size: 16px;
    color: #00ff55;
    text-shadow: 0 0 6px #00ff55;
    margin-bottom: 6px;
}

#gridStatusDots {
    display: flex;
    gap: 6px;
}

.statusDot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(80,80,80,0.4);
    box-shadow: 0 0 6px rgba(0,0,0,0.6);
}

.latencySpacer { width: 12px; }

.latencyIcon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(120,120,120,0.4);
}

.status-text-ok {
    color: #00ff55;
}

.status-text-warn {
    color: #ffdd66;
}

.status-text-err {
    color: #ff5555;
}

.status-text-unknown {
    color: #cccccc;
}

#gridStatusValue {
    margin-top: 6px;
    font-family: "Courier New", monospace;
    font-size: 14px;
    text-shadow: 0 0 6px rgba(0,0,0,0.6);
}

/* Clock text */
#gridClockText {
    font-family: "Courier New", monospace;
    font-size: 18px;
    color: #00ffcc;
    text-shadow: 0 0 6px #00ffcc;
}

/* Status colors */
.status-on {
    background: #00ff00 !important;
    box-shadow: 0 0 12px #00ff00;
}

.status-yellow {
    background: #ffff33 !important;
    box-shadow: 0 0 12px #ffff33;
}

.status-red {
    background: #ff3333 !important;
    box-shadow: 0 0 12px #ff3333;
}

.status-grey {
    background: #888 !important;
}

/* ==========================================================
   USER MENU
   ========================================================== */

#usermenu fieldset {
    padding: 10px;
    border: 3px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    background: linear-gradient(
        to bottom,
        rgba(60,120,255,0.45),
        rgba(0,40,120,0.45)
    );
    backdrop-filter: blur(4px);
}

#usermenu ul {
    margin: 0;
    padding-left: 18px;
    list-style-type: square;
}

#usermenu li {
    margin-bottom: 6px;
    font-size: 14px;
}

#usermenu a {
    color: #fff;
    text-decoration: none;
}

#usermenu a:hover {
    color: #ffdd66;
}

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

#contentPanel fieldset {
    padding: 10px;
    border-radius: 12px;
    border: 3px solid rgba(255,255,255,0.4);
    background: linear-gradient(
        to bottom,
        rgba(60,120,255,0.45),
        rgba(0,40,120,0.45)
    );
    backdrop-filter: blur(4px);
    margin-top: 10px;
    max-height: 500px;
    overflow-y: auto;
}

/* ==========================================================
   FLOATING CONTROL PANEL (Admin WebUI panel)
   ========================================================== */

#controlPanel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 500px;
    min-height: 300px;
    border-radius: 14px;
    border: 3px solid rgba(255,255,255,0.4);
    background: linear-gradient(
        to bottom,
        rgba(60,120,255,0.45),
        rgba(0,40,120,0.45)
    );
    backdrop-filter: blur(6px);
    display: none;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    z-index: 99999;
}

#controlHeader {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: move;
    background: rgba(0,20,80,0.55);
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

#controlClose {
    font-size: 20px;
    cursor: pointer;
    color: #ffcccc;
}

/* ==========================================================
   ADMIN DASHBOARD
   ========================================================== */

#adminLayout {
    display: flex;
    height: 100%;
    gap: 12px;
}

#adminMenu {
    width: 220px;
}

#adminMenu a {
    display: block;
    padding: 8px 10px;
    background: rgba(40,80,200,0.45);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 10px;
    color: #a7d8ff;
    font-weight: bold;
    text-decoration: none;
}

#adminContent {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.scrollArea {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 8px;
}

/* ==========================================================
   USER PANEL NOTIFICATIONS
   ========================================================== */

.notifColumn {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
    align-items: flex-end;
}

.notifRow {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notifCount {
    background: #ff3333;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 5px rgba(255,0,0,0.7);
}

.notifCountOff {
    background: rgba(120,120,120,0.35);
    color: #eee;
    box-shadow: none;
}

.notifIcon {
    font-size: 22px;
    opacity: 0.35;
    cursor: pointer;
    filter: grayscale(100%) brightness(75%);
    transition: 0.15s ease-in-out;
}

.notifIcon.notifActive {
    opacity: 1;
    filter: none;
}

.notifIcon:hover {
    opacity: 1;
    transform: scale(1.10);
    filter: none;
}

/* ==========================================================
   LOGIN LINKS (centered two-row layout)
   ========================================================== */

/* Container for both rows */
.loginLinksWrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;   /* true centering */
    justify-content: center;
    margin-top: 8px;
    font-size: 15px;
}

/* Top: Log in | Register */
.loginTopRow {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Bottom: Forgot Password */
.loginBottomRow {
    margin-top: 4px;
}

/* Link-styled buttons */
.linkBtn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
    color: #a7d8ff;
    font-weight: bold;
    text-decoration: underline;
    text-shadow: 0 0 6px rgba(0,150,255,0.8);
}

/* Normal links */
.loginLinksWrapper a {
    color: #a7d8ff;
    font-weight: bold;
    text-decoration: underline;
    text-shadow: 0 0 6px rgba(0,150,255,0.8);
}

/* Hover effect for both buttons + links */
.loginLinksWrapper a:hover,
.linkBtn:hover {
    color: #ffdd66;
    text-shadow: 0 0 8px rgba(255,220,120,1);
}
