/* Reset & Base */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #101010;
    color: #f1f1f1;
}

/* --- AUTH PAGES (Login / Register) --- */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #101010;
    color: #f1f1f1;
    font-family: Arial, sans-serif;
}

.auth-container {
    background: #181818;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    width: 350px;
    text-align: center;
}

.auth-container h1 {
    margin-bottom: 20px;
}

.auth-container form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-container input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #222;
    color: #fff;
}

.auth-container button {
    padding: 10px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.auth-container button:hover {
    background: #444;
}

.auth-container a {
    color: #88c0ff;
    text-decoration: none;
}

.auth-container a:hover {
    text-decoration: underline;
}

.flash-messages {
    list-style: none;
    padding: 0;
    margin-bottom: 10px;
}

.flash-messages li {
    background: #a33;
    padding: 5px;
    border-radius: 5px;
}

/* ----------------- TOPBAR ----------------- */
.topbar {
    display: flex;
    flex-wrap: wrap; /* allow items to wrap to next line */
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #181818;
    border-bottom: 2px solid #333;
    color: #f1f1f1;
    font-weight: bold;
    font-size: 16px;
}


.topbar .resources {
    display: flex;
    gap: 20px;
    overflow-x: auto;
}

.topbar .resources span {
    font-size: 14px;
    gap: 6px;
}


/* Optional: separate items with | automatically */
.topbar strong {
    margin-right: 20px;
}

/* ----------------- MAIN CONTAINER ----------------- */
.main-container {
    display: flex;
    margin-top: 50px; /* leave space for fixed topbar */
}

/* ----------------- SIDEBAR ----------------- */
.sidebar {
    width: 220px;
    background: #151515;
    padding: 20px;
    border-right: 2px solid #333;
    min-height: calc(100vh - 50px); /* full height minus topbar */
    position: sticky;
    top: 50px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin: 15px 0;
}

.sidebar a {
    color: #ccc;
    text-decoration: none;
    font-size: 16px;
    display: block;
}

.sidebar a:hover {
    color: #fff;
}

/* ----------------- CONTENT ----------------- */
.content {
    flex: 1;
    padding: 20px;
}

/* ----------------- BUTTONS ----------------- */
button {
    background-color: #2d2d2d;
    color: #f1f1f1;
    border: 1px solid #444;
    padding: 8px 12px;
    margin: 5px 0;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background-color: #3d3d3d;
}

/* ----------------- HEADINGS ----------------- */
h1, h2 {
    margin-top: 0;
}

/* ----------------- LISTS ----------------- */
.resources-summary ul, .resources-summary li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resources-summary li {
    margin-bottom: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

th, td {
  border: 1px solid #444;
  padding: 8px;
  text-align: left;
}

h2 {
  margin-top: 20px;
}

.build-form button {
  margin-right: 8px;
  padding: 5px 10px;
  cursor: pointer;
}

.badge {
  background-color: #ff4444;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.8em;
  margin-left: 4px;
}

/* ----------------- SIDEBAR CLOCK ----------------- */
.sidebar-clock {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #2a2a2a;
}

.sidebar-clock .clock-label {
    font-size: 10px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.sidebar-clock .clock-time {
    font-size: 20px;
    font-weight: bold;
    color: #999;
    letter-spacing: 2px;
    font-family: monospace;
}

/* ----------------- MOBILE ----------------- */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        margin-top: 0;
    }

    .sidebar {
        width: 100%;
        min-height: unset;
        position: static;
        border-right: none;
        border-bottom: 2px solid #333;
        padding: 8px 12px;
        box-sizing: border-box;
        overflow-x: auto;
    }

    .sidebar ul {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 4px;
        white-space: nowrap;
    }

    .sidebar li {
        margin: 0;
    }

    .sidebar a {
        font-size: 13px;
        padding: 5px 9px;
        background: #222;
        border-radius: 4px;
        display: inline-block;
    }

    .sidebar-clock {
        display: none;
    }

    .content {
        padding: 12px;
    }

    .topbar {
        padding: 8px 12px;
        gap: 6px;
    }

    .topbar .resources {
        flex-wrap: wrap;
        gap: 5px 12px;
        overflow-x: unset;
    }

    .auth-container {
        width: 90%;
        max-width: 380px;
        padding: 20px;
        box-sizing: border-box;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 5px 6px;
    }
}
