html::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

:root {
    --bg: #EFF0F0;
    --text: #154150;
    --secondary: #C8E0D0;

    --accent: #8EC6CA;
}

body {
    overflow-x: hidden;
    font-family: "Inter", sans-serif !important;
    background-color: var(--bg);
    color: var(--text);
    margin: 0 !important;
    padding: 0 !important;
}

h2 {
    color: var(--text);
}

h3 {
    color: var(--text);
}

a {
    text-decoration: none;
}

header {
    margin-bottom: 25px;
    height: auto;
    width: 100%;
    background: #b6cabc;
}

nav {
    align-items: center;
    padding: 10px;
    display: flex;
}

nav img {
    max-height: 50px;
    margin-right: auto;
}

nav a {
    background-color: var(--accent);
    color: var(--text);
    font-weight: bolder;
    font-size: 1em;
    margin: 0 10px;
    padding: 15px 20px;
    border-radius: 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

nav a:hover {
    background-color: #74B3B6;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 20px 36px rgba(0,0,0,0.22);
}

.das {
    max-width: 400px !important;
    min-width: 400px !important;
    min-height: 500px !important;
    max-height: 500px !important;
}

.der {
    max-width: 650px !important;
    min-width: 650px !important;
    min-height: 100%;
}

.der summary {
    max-width: 300px;
    min-width: 300px;
}

.projects-div {
    display: flex;
    justify-content: space-around;
    gap: 14px;
}

.projects {
    display: grid;
    grid-template-columns: auto auto;
    justify-items: center;
    gap: 44px 0;
}

.project {
    margin: 40px 0 0 0;
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    min-height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(122, 184, 255, 0.35),
                0 0 24px rgba(122, 184, 255, 0.35);
}

.project:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 18px #a3ceff,
                0 0 36px #a3ceff;
    cursor: pointer;
}

.project > a {
    display: flex;
    flex-direction: column;
}

.project-img {
    display: block;
    position: relative;
    z-index: 1;
    max-width: 400px;
    max-height: 160px;
    object-fit: cover;
    object-position: 50% 50%;
    border-radius: 12px 12px 0 0;
}

.img {
    display: block;
    position: relative;
    z-index: 1;
    max-width: 650px;
    max-height: 340px;
    min-height: 340px;
    object-fit: cover;
    object-position: 50% 50%;
    border-radius: 12px 12px 0 0;
}

.project h2 {
    padding-left: 15px;
    color: var(--accent);
}

.project h3 {
    padding-left: 15px;
    color: var(--bg);
}

.stasis {
    background-color: #a8a090;
}

.blueprint {
    background-color: #13345e;
}

.flavortown {
    background-color: #875b54;
}

/* --- Info --- */
.info {
    display: grid;
    grid-template-columns: 75% auto;
}

.info h2 {
    color: var(--accent);
}

.info h3 {
    color: var(--bg) !important;
    cursor: default;
}

.time, .cost {
    color: var(--bg);
}

/* --- Journal --- */
.journal {
    padding-left: 15px;
    margin-bottom: 1%;
}

details {
    max-width: 400px;
    display: flexbox;
    
}

summary {
    max-width: 200px;
    min-width: 200px;
    max-height: 30px;
    min-height: 30px;
    display: inline-block;
    padding: 10px 0 0 10px;
    background-color: var(--accent);
    color: var(--text);
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

summary:hover {
    background-color: #74B3B6;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 20px 36px rgba(0,0,0,0.22);
}

.projects-div summary {
    display: revert;
}

.zero-md-scroll {
    max-height: 400px;
    min-height: 120px;
    max-width: 620px;
    min-width: 620px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #ccc;
    margin-top: 10px;
    background: #0D1117;
}

.zero-md-scroll::-webkit-scrollbar {
    width: 8px;
}

.zero-md-scroll::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

.zero-md-scroll::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

zero-md {
    display: block;
    margin-top: 15px;
}

/* --- BOM --- */
.bom {
    padding-left: 15px;
    margin-bottom: 2%;
}

.bom table {
    border-collapse: collapse;
    width: 75%;
    text-align: center;
}

.bom th,
td {
    padding: 0.25rem;
}

.bom tr:first-child th {
    background-color: var(--text) !important;
    color: var(--bg) !important;
    font-weight: 900;
}

.bom tr:nth-child(odd) {
    background-color: var(--bg);
}

.bom tr:nth-child(even) {
    background-color: var(--secondary);
}

.bom tr:nth-last-child(2) {
    background-color: #A0C4A9;
    color: var(--text);
    font-weight: 900;
}

.bom tr:last-child {
    background-color: #86a58e;
    color: var(--text);
    font-weight: 900;
}

/* --- Status --- */
.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(6px);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.75);
    color: #ffffff;
    font-size: 0.875rem;
    z-index: 6;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.06);
    transition: background-color 2090ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.status-indicator.finished {
    background-color: #4caf50;
    box-shadow: 0 0 0 6px rgba(76, 175, 80, 0.12);
    transform: scale(1.05);
    border-color: rgba(76, 175, 80, 0.45);
}

.status-indicator.in-progress {
    background-color: #ffc107;
    box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.35);
}

.status-label {
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.links {
    display: grid;
    grid-template-columns: auto auto;
    margin-top: auto;
}

/* --- Github --- */
.github {
    text-align: center;
    padding: 12px 18px;
    background-color: var(--accent);
    color: var(--text);
    border-radius: 0 0 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.6), 0 10px 22px rgba(0, 0, 0, 0, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}

.github::after {
    content: '→';
    display: inline-block;
    margin-left: 8px;
    transform: translateX(0);
    transition: transform 0.2s ease;
}

.github:hover {
    background-color: #74B3B6;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 20px 36px rgba(0,0,0,0.22);
}

.github:hover::after {
    transform: translateX(4px);
}

/* --- View on ... --- */
.hackclub {
    text-align: center;
    padding: 12px 18px;
    background-color: var(--accent);
    color: var(--text);
    border-radius: 0 0 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.6), 0 10px 22px rgba(0, 0, 0, 0, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}

.hackclub:hover {
    background-color: #74B3B6;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 20px 36px rgba(0,0,0,0.22);
}

.hc-img {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 50px 0;
}

#filter {
    margin-left: 70px;
    margin-bottom: 20px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background-color: var(--accent);
    color: var(--text);
    font-weight: bold;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#filter:hover {
    background-color: #74B3B6;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 20px 36px rgba(0, 0, 0, 0.22);
}

#filter:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(209, 168, 81, 0.35);
}

#filter option {
    color: var(--accent);
    background: #000000;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.1rem;
}

#filter option:checked {
    background: var(--accent);
    color: var(--text);
}

#filter option:focus,
#filter option:active {
    background: var(--accent);
    color: var(--text);
}

.stats {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.stat {
    flex: 1;
    background: var(--secondary);
    color: var(--text);
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat h3 {
    margin: 0;
    font-size: 22px;
}

.stat p {
    margin: 5px 0 0;
    font-size: 12px;
    opacity: 0.7;
}

/****** EDITOR ******/
.layout {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    height: 50vh;
    gap: 12px;
    padding: 12px;
}

.panel {
    align-self: center;
    background: #9bada1;
    border-radius: 12px;
    padding: 12px;
    overflow: auto;
    max-width: 624px;
    max-height: 874px;
    min-height: 874px;
    overflow-x: hidden;
}

.panel button {
  background-color: var(--secondary);
  border: 2px solid var(--text);
  border-radius: 30px;
  box-shadow: var(--text) 4px 4px 0 0;
  color: var(--text);
  cursor: pointer;
  display: inline-block;
  font-weight: bold;
  font-size: 18px;
  margin-top: 30px;
  padding: 0 18px;
  line-height: 50px;
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.panel button:hover {
  background-color: var(--bg);
}

.panel button:active {
  box-shadow: var(--accent) 2px 2px 0 0;
  transform: translate(2px, 2px);
}

@media (min-width: 768px) {
  .panel button{
    min-width: 120px;
    padding: 0 25px;
  }
}

.panel h3 {
    margin-top: 0;
    opacity: 0.8;
}

#programList div,
#projectList div {
    padding: 8px;
    margin: 6px 0;
    border-radius: 6px;
    cursor: pointer;
    background: var(--accent);
}

#programList div:hover,
#projectList div:hover {
    background: var(--secondary);
}

.panel::-webkit-scrollbar {
    width: 8px;
}

.panel::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

.panel::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

.editor {
    min-width: 614px;
    max-width: 614px;
}

.editor input,
.editor textarea {
    background: transparent;
    border: none;
    outline: none;
    width: 90%;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    font-family: inherit;
}

.editor textarea {
    min-height: 60px;
    max-height: 100px;
    resize: none;
}

.editor textarea::-webkit-scrollbar {
    width: 8px;
}

.editor textarea::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

.editor textarea::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

.editor input {
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.info input {
    background-color: #15415059;
}

.time input,
.cost input {
    text-align: center;
}

.save {
    margin-top: auto;
    padding: 12px;
    background: var(--accent);
    border: none;
    border-radius: 0 0 12px 12px;
    cursor: pointer;
    font-size: inherit;
    font-weight: bold;
    color: inherit;
    font-family: inherit;
}

.save:hover {
    background: #74b3b6;
}

/****** CHECKLIST ******/
.check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px;
}

.check-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.check-delete {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    opacity: 0.6;
}

.check-delete:hover {
    opacity: 1;
}

.checklist-filter {
    margin-bottom: 20px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background-color: var(--accent);
    color: var(--text);
    font-weight: bold;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.checklist-filter:hover {
    background-color: #74B3B6;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 20px 36px rgba(0, 0, 0, 0.22);
}

.checklist-filter:focus {
    outline: none;
}

.checklist-filter option {
    color: var(--accent);
    background: #000000;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.1rem;
}

.checklist-filter option:checked {
    background: var(--accent);
    color: var(--text);
}

.checklist-filter option:focus,
.checklist-filter option:active {
    background: var(--accent);
    color: var(--text);
}

.checklist2 input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    outline: none;
    width: 50%;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    font-family: inherit;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

    /* Header */
    nav {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    nav img {
        margin: 0 auto;
        width: 120px;
    }

    nav a {
        padding: 10px 14px;
        font-size: 0.9rem;
        margin: 2px;
    }

    /* Dashboard Stats */
    .stats {
        flex-wrap: wrap;
    }

    .stat {
        min-width: 40%;
    }

    /* Project columns */
    .projects-div {
        flex-direction: column;
        align-items: center;
    }

    .projects {
        grid-template-columns: 1fr;
        width: 100%;
    }

    /* Project cards */
    .project,
    .das,
    .der {
        width: 95%;
        min-width: unset !important;
        max-width: 95% !important;
    }

    /* Images */
    .project-img,
    .img {
        width: 100%;
        max-width: 100%;
        min-height: unset;
        height: auto;
    }

    /* Info section */
    .info {
        grid-template-columns: 1fr;
    }

    .info h2,
    .info h3 {
        margin-right: 10px;
    }

    /* Journal/BOM */
    .zero-md-scroll {
        min-width: unset;
        max-width: 100%;
        width: 100%;
    }

    details,
    summary {
        min-width: unset;
        max-width: 100%;
        width: calc(100% - 10px);
    }

    /* Tables */
    .bom table {
        width: 100%;
        font-size: 0.85rem;
    }

    /* Links */
    .links {
        grid-template-columns: 1fr;
    }

    .hackclub,
    .github {
        border-radius: 0;
    }

    .hackclub {
        border-radius: 0 0 0 0;
    }

    .github {
        border-radius: 0 0 12px 12px;
    }

    /* Filter */
    #filter {
        margin-left: 10px;
        width: calc(100% - 20px);
    }

    /* Editor */
    .layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .panel {
        max-width: 100%;
        min-height: unset;
    }

    .editor {
        min-width: unset;
        max-width: 100%;
        width: 100%;
    }

    .editor input,
    .editor textarea {
        width: 100%;
    }

    /* Checklist */
    .check-row {
        gap: 6px;
    }

    .check-row span {
        word-break: break-word;
    }

    #newTask {
        width: calc(100% - 100px);
    }

    /* Status badge */
    .status {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}