/* Starter styles - replace these with your own design! */

body {
    font-family: system-ui, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    line-height: 1.5;
}

nav {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ccc;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

img {
    max-width: 100%;
}

[role="alert"] {
    color: #b00020;
}

button {
    width: fit-content;
    cursor: pointer;
}

#guestbook-list {
    list-style: none;
    padding: 0;
}

#guestbook-list li {
    border-bottom: 1px solid #eee;
    padding: 0.75rem 0;
}

#guestbook-list textarea {
    display: block;
    width: 100%;
    max-width: 400px;
    margin-bottom: 0.5rem;
}

small {
    color: #666;
}


/* =========================================
   BLUE WEBSITE THEME
   ========================================= */

:root {
    --blue-darkest: #06152e;
    --blue-dark: #0a2a5e;
    --blue: #1261c9;
    --blue-light: #1683ff;
    --blue-bright: #35a7ff;

    --blue-bg: #eef6ff;
    --blue-bg-2: #f7fbff;

    --white: #ffffff;
    --text: #14213d;
    --text-light: #64748b;

    --border: #d8e7f7;

    --success: #16a34a;
    --danger: #dc2626;

    --radius: 16px;

    --shadow:
        0 10px 35px rgba(8, 65, 140, 0.12);

    --shadow-hover:
        0 15px 40px rgba(8, 65, 140, 0.20);
}


/* =========================================
   RESET
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(circle at 10% 0%,
            rgba(22, 131, 255, 0.18),
            transparent 30%),
        radial-gradient(circle at 90% 10%,
            rgba(53, 167, 255, 0.12),
            transparent 25%),
        linear-gradient(135deg,
            var(--blue-bg),
            var(--blue-bg-2));

    line-height: 1.6;
}


/* =========================================
   NAVIGATION
   ========================================= */

nav {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 14px 20px;

    background:
        linear-gradient(135deg,
            var(--blue-darkest),
            var(--blue-dark));

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 5px 25px rgba(3, 20, 50, 0.25);
}

nav::before {
    content: "BLUE APP";

    color: white;

    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;

    margin-right: 25px;
}

nav a {
    position: relative;

    padding: 9px 15px;

    color: #cfe3ff;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    border-radius: 9px;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

nav a:hover {
    color: white;

    background: rgba(255, 255, 255, 0.12);

    transform: translateY(-1px);
}

nav a:active {
    transform: translateY(0);
}


/* =========================================
   PAGE HEADINGS
   ========================================= */

body>h1 {
    width: min(1000px, calc(100% - 40px));

    margin: 55px auto 12px;

    color: var(--blue-darkest);

    font-size: clamp(2rem, 5vw, 3.2rem);

    line-height: 1.15;

    letter-spacing: -1.5px;

    font-weight: 800;
}

body>h1::after {
    content: "";

    display: block;

    width: 55px;
    height: 5px;

    margin-top: 14px;

    border-radius: 99px;

    background:
        linear-gradient(90deg,
            var(--blue),
            var(--blue-bright));
}


/* =========================================
   GENERAL PARAGRAPHS
   ========================================= */

body>p {
    width: min(1000px, calc(100% - 40px));

    margin: 10px auto 25px;

    color: var(--text-light);

    font-size: 16px;
}


/* =========================================
   CARDS / CONTAINERS
   ========================================= */

.card {
    width: min(1000px, calc(100% - 40px));

    margin: 25px auto;

    padding: 25px;

    background: rgba(255, 255, 255, 0.9);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow);

    backdrop-filter: blur(10px);
}


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

body>h1+p {
    width: min(1000px, calc(100% - 40px));

    margin-top: 0;

    padding: 28px;

    background:
        linear-gradient(135deg,
            #ffffff,
            #f2f8ff);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow);

    color: var(--text);

    font-size: 18px;
}


/* Dashboard welcome card */

.dashboard-card {
    width: min(1000px, calc(100% - 40px));

    margin: 25px auto;

    padding: 30px;

    background: white;

    border-radius: var(--radius);

    border: 1px solid var(--border);

    box-shadow: var(--shadow);
}

.dashboard-card h2 {
    margin-top: 0;

    color: var(--blue-dark);
}


/* =========================================
   GUESTBOOK
   ========================================= */

#guestbook-list {
    width: min(1000px, calc(100% - 40px));

    margin: 30px auto 20px;

    padding: 0;

    list-style: none;
}

#guestbook-list li {
    position: relative;

    padding: 20px 22px;

    margin-bottom: 14px;

    background: white;

    border: 1px solid var(--border);

    border-left: 5px solid var(--blue);

    border-radius: 13px;

    box-shadow: 0 5px 20px rgba(8, 65, 140, 0.08);

    color: var(--text);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#guestbook-list li:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow-hover);
}


/* Empty guestbook */

#guestbook-list:empty::after {
    content: "No messages yet. Be the first to leave a message!";

    display: block;

    padding: 35px 20px;

    text-align: center;

    color: var(--text-light);

    background: white;

    border: 2px dashed #c5daf0;

    border-radius: var(--radius);
}


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

form {
    width: min(1000px, calc(100% - 40px));

    margin: 25px auto;

    padding: 20px;

    display: flex;

    gap: 12px;

    background: white;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

input[type="text"],
input[type="password"] {
    width: 100%;

    padding: 13px 15px;

    background: #f8fbff;

    border: 1px solid #c8dbef;

    border-radius: 10px;

    outline: none;

    color: var(--text);

    font-size: 15px;

    transition:
        border 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    background: white;

    border-color: var(--blue-light);

    box-shadow:
        0 0 0 4px rgba(22, 131, 255, 0.12);
}

input::placeholder {
    color: #94a3b8;
}


/* =========================================
   BUTTONS
   ========================================= */

button {
    padding: 12px 22px;

    border: none;

    border-radius: 10px;

    color: white;

    background:
        linear-gradient(135deg,
            var(--blue),
            var(--blue-light));

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    white-space: nowrap;

    box-shadow:
        0 7px 18px rgba(18, 97, 201, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

button:hover {
    transform: translateY(-2px);

    filter: brightness(1.08);

    box-shadow:
        0 10px 25px rgba(18, 97, 201, 0.35);
}

button:active {
    transform: translateY(0);
}


/* =========================================
   LOGIN PAGE
   ========================================= */

#login-section {
    width: min(480px, calc(100% - 40px));

    margin: 35px auto;

    padding: 32px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 20px;

    box-shadow: var(--shadow);
}

#login-section h2 {
    margin: 0 0 25px;

    color: var(--blue-dark);

    font-size: 24px;
}

#login-form {
    width: 100%;

    margin: 0;

    padding: 0;

    display: flex;
    flex-direction: column;

    align-items: stretch;

    gap: 10px;

    background: transparent;

    border: none;

    box-shadow: none;
}

#login-form label {
    color: var(--text);

    font-size: 14px;

    font-weight: 600;
}

#login-form input[type="checkbox"] {
    accent-color: var(--blue);
}

#login-form button {
    width: 100%;

    margin-top: 10px;
}

#login-message {
    min-height: 24px;

    color: var(--blue);

    font-weight: 600;
}


/* =========================================
   HOME / AUTH STATUS
   ========================================= */

#status {
    width: min(1000px, calc(100% - 40px));

    margin: 35px auto;

    text-align: center;
}

#status h1 {
    margin-bottom: 12px;

    color: var(--blue-darkest);

    font-size: 32px;
}

#status a {
    display: inline-block;

    padding: 11px 20px;

    color: white;

    background: var(--blue);

    border-radius: 10px;

    text-decoration: none;

    font-weight: 700;

    box-shadow:
        0 6px 18px rgba(18, 97, 201, 0.25);

    transition: transform 0.2s ease;
}

#status a:hover {
    transform: translateY(-2px);
}


/* =========================================
   LOGOUT BUTTON
   ========================================= */

#logout-button {
    display: block;

    margin: 25px auto;

    background:
        linear-gradient(135deg,
            #2563eb,
            #1d4ed8);
}


/* =========================================
   SYSTEM MONITOR
   ========================================= */

body>div:has(#platform) {
    width: min(1000px, calc(100% - 40px));

    margin: 30px auto;

    overflow: hidden;

    background: white;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

body>div:has(#platform) p {
    margin: 0;

    padding: 20px 24px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    border-bottom: 1px solid var(--border);

    color: var(--text-light);
}

body>div:has(#platform) p:last-child {
    border-bottom: none;
}

body>div:has(#platform) strong {
    color: var(--blue-dark);

    font-size: 15px;
}

body>div:has(#platform) span {
    min-width: 120px;

    padding: 5px 12px;

    text-align: center;

    color: var(--blue);

    background: var(--blue-bg);

    border-radius: 8px;

    font-weight: 700;
}


/* Refresh button */

#refresh-btn {
    display: block;

    margin: 28px auto;
}


/* Return home */

body>p a {
    color: var(--blue);

    font-weight: 700;

    text-decoration: none;
}

body>p a:hover {
    text-decoration: underline;
}


/* =========================================
   LOADING EFFECT
   ========================================= */

#platform,
#cpus,
#memory,
#totalmemory,
#uptime {
    transition: opacity 0.2s ease;
}


/* =========================================
   SCROLLBAR
   ========================================= */

::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: #eaf3fc;
}

::-webkit-scrollbar-thumb {
    background: #7db8ed;

    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue);
}


/* =========================================
   TEXT SELECTION
   ========================================= */

::selection {
    color: white;

    background: var(--blue);
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 700px) {

    nav {
        padding: 10px;

        flex-wrap: wrap;
    }

    nav::before {
        width: 100%;

        margin: 0 0 5px;

        text-align: center;
    }

    nav a {
        padding: 8px 10px;

        font-size: 13px;
    }

    body>h1 {
        margin-top: 35px;

        font-size: 2.2rem;
    }

    form {
        flex-direction: column;
    }

    form button {
        width: 100%;
    }

    body>div:has(#platform) p {
        flex-direction: column;

        align-items: flex-start;

        gap: 8px;
    }

    body>div:has(#platform) span {
        width: 100%;
    }

    #login-section {
        padding: 25px 20px;
    }
}


/* =========================================
   VERY SMALL SCREENS
   ========================================= */

@media (max-width: 420px) {

    body>h1 {
        width: calc(100% - 30px);

        font-size: 1.9rem;
    }

    body>p,
    #guestbook-list,
    form {
        width: calc(100% - 30px);
    }

    nav a {
        font-size: 12px;

        padding: 7px 8px;
    }
}