body {
    background-color: #0d1117;  /* GitHub dark mode background */
    color: #c9d1d9;             /* GitHub text color */
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 40px auto;
    line-height: 1.6;
    padding-top: 10px;
}
a {
    color: #58a6ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    color: #ffffff;
}

header, footer {
    text-align: center;
}

hr {
    border: 0;
    border-top: 1px solid #30363d;
    margin: 20px 0;
}

pre {
    background-color: #161b22;
    border: 1px solid #30363d;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    color: #c9d1d9;
}

code {
    background-color: #21262d;
    color: #c9d1d9;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
}

ul {
    margin-left: 20px;
}

p {
    text-align: justify;
}


@media (max-width: 768px) {

    body {
        margin: 10px;
        padding: 0 10px;
        font-size: 16px;
    }

    h1 {
        font-size: 1.6em;
    }

    h2 {
        font-size: 1.3em;
    }

    pre {
        font-size: 0.8rem;
        padding: 10px;
    }

    nav a {
        display: inline-block;
        margin: 4px 6px;
    }

    ul {
        padding-left: 20px;
    }

    p {
        text-align: left;  /* easier to read on narrow screens */
    }
}



/* --- Sidebar --- */
.sidebar {
    width: 240px;
    background-color: #203d50;
    color: white;
    display: flex;
    flex-direction: column;
    padding-top: 0rem;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    z-index: 999;

    border-right: 0px solid #006875;
}

.sidebar h2 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.sidebar a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    border-left: 4px solid transparent;
    transition: border 0.2s;
}

.sidebar > a:hover {
    background-color: #0f3044;
    border-left: 4px solid #00bcd4;
}

.sidebar > a.active {
    background-color: #0f3044;
    border-left: 4px solid #00bcd4;
    font-weight: bold;
}

/* --- Toggle button (visible only on mobile) --- */
.toggle-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    font-size: 1.5rem;
    background: #203d50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    display: none;
    z-index: 1000;
}

/* --- Responsive behaviour --- */
@media (max-width: 1300px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .toggle-btn {
        display: block;
    }
    main {
        margin-left: 0;
        padding-top: 3.5rem; /* prevent overlap with toggle button */
    }
}



/* --- Top Center Bar (matches sidebar style) --- */
.rightlinks {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;

    width: 800px;
    background-color: #203d50; /* same as sidebar */
    color: white;
    padding: 5px 24px;

    z-index: 999;
    transition: background-color 0.3s ease;
    border-radius: 0 0 8px 8px; /* slightly rounded bottom corners */

    border-right: 0px solid #006875;
    border-bottom: 0px solid #006875;
    border-left: 0px solid #006875;
}

.rightlinks a {
    color: white;
    text-decoration: none;
    padding: 2px 16px;
    white-space: nowrap;
}

.rightlinks a:hover {
    background-color: #0f3044;      /* same hover bg as sidebar */
    border-top: 3px solid #00bcd4; /* same accent color */
}

/* --- Make it simpler on mobile --- */
@media (max-width: 768px) {
    .rightlinks {
        position: static;
        flex-wrap: wrap;
        gap: 8px;
        background: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 8px;
    }
    .rightlinks a {
        padding: 6px 10px;
    }
}





/* --- Right floating info panel --- */
.rightpanel {
    position: fixed;
    top: 100px;
    right: 180px;
    width: 220px;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    color: #c9d1d9;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
    z-index: 100;
    line-height: 1.0
}

.rightpanel h3 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.6rem;

    padding-bottom: 4px;
}

.rightpanel a {
    color: #58a6ff;
    text-decoration: none;
}

.rightpanel a:hover {
    text-decoration: underline;
}

/* --- Hide or move on small screens --- */
@media (max-width: 1700px) {
    .rightpanel {
        position: static;
        width: auto;
        background: none;
        border: none;
        box-shadow: none;
        text-align: center;
        margin-top: 20px;
        padding: 0;
    }
}


/* Logo section */
.logo {
  text-align: center;
  margin: 0;             /* remove all extra margin */
  padding: 0;            /* remove any padding */
  line-height: 0;        /* remove space from text container (like <h2>) */
}

.logo img {
  width: 70px;           /* slightly smaller for balance */
  height: 70px;
  border: 0px solid #00bcd4;
  display: block;        /* removes inline spacing below image */
  margin: 0 auto;        /* center horizontally */
}
