* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    background: #444;
    color: gainsboro;
}

.header {
    position: relative;
    padding: 54px 60px 26px;
    background: rgb(40, 40, 40);
    text-align: center;
}

.header h1 {
    max-width: 1000px;
    margin: 0 auto;
    font-size: clamp(38px, 6vw, 60px);
    font-weight: 600;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.menu-btn {
    position: fixed;
    z-index: 3;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border: 1px solid #555;
    border-radius: 5px;
    background: rgb(40, 40, 40);
    color: gainsboro;
    font-size: 25px;
    cursor: pointer;
}

.menu-btn:focus-visible,
.sidebar a:focus-visible,
a:focus-visible,
.language-switcher button:focus-visible {
    outline: 2px solid gainsboro;
    outline-offset: 3px;
}

.language-switcher {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 14px;
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid #555;
    border-radius: 6px;
    background: #222;
}

.language-switcher button {
    min-width: 34px;
    padding: 5px 7px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #bbb;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.language-switcher button:hover,
.language-switcher button[aria-pressed="true"] {
    background: #444;
    color: gainsboro;
}

.sidebar {
    position: fixed;
    z-index: 2;
    top: 0;
    left: 0;
    width: 220px;
    height: 100%;
    padding-top: 60px;
    background: #222;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar a {
    display: block;
    padding: 12px 14px;
    color: gainsboro;
    text-decoration: none;
}

.sidebar a:hover {
    background: #444;
}

.project-content {
    width: min(100% - 40px, 900px);
    margin: 0 auto;
    flex: 1;
}

.subheader,
.features,
.platforms,
.screenshots,
.downloads,
.repo {
    padding: 30px 0;
    border-bottom: 1px solid #5a5a5a;
}

.subhdesc,
.featurestitle,
.platformstitle,
.scrtitle,
.downloadstitle,
.repotitle {
    margin: 0 0 16px;
    color: gainsboro;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
}

.descrow {
    display: flex;
    align-items: center;
    gap: 26px;
}

.wEditorLogo {
    width: 110px;
    height: auto;
    flex: 0 0 auto;
    border-radius: 8px;
}

.desc,
.repodesc,
.downloadslist {
    max-width: 760px;
    margin: 0;
    color: #d0d0d0;
    font-size: 16px;
    line-height: 1.75;
}

.desc a,
.repodesc a {
    color: #fff;
    text-underline-offset: 3px;
}

.featureslist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 34px;
    margin: 0;
    padding: 0;
    color: #d0d0d0;
    list-style: none;
}

.featureslist li {
    position: relative;
    padding-left: 18px;
    line-height: 1.6;
}

.featureslist li::before {
    position: absolute;
    top: 0.65em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #aaa;
    content: "";
}

.platformstable {
    width: 100%;
    border: 1px solid #555;
    border-spacing: 0;
    border-radius: 7px;
    background: rgb(40, 40, 40);
    text-align: left;
    overflow: hidden;
}

.platformstable th,
.platformstable td {
    padding: 12px 15px;
    border-bottom: 1px solid #4a4a4a;
    line-height: 1.5;
}

.platformstable th {
    background: #333;
    font-weight: 600;
}

.platformstable tr:last-child td {
    border-bottom: 0;
}

.screenshots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
}

.scrtitle {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.screenshot {
    display: block;
    width: 100%;
    height: auto;
    max-height: 60vh;
    border: 1px solid #555;
    border-radius: 7px;
    object-fit: contain;
    background: rgb(40, 40, 40);
}

.downloadbtn {
    display: inline-block;
    margin-top: 16px;
    padding: 11px 22px;
    border: 1px solid #8cc890;
    border-radius: 6px;
    color: #a8d6aa;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.downloadbtn:hover {
    background: #8cc890;
    color: #222;
}

footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: auto;
    padding: 12px 16px;
    background: rgb(40, 40, 40);
    color: gainsboro;
    font-size: 14px;
    text-align: center;
}

footer p {
    margin: 0;
}

footer a {
    color: gainsboro;
}

@media (max-width: 650px) {
    .header {
        padding: 58px 20px 24px;
    }

    .project-content {
        width: min(100% - 32px, 900px);
    }

    .subheader,
    .features,
    .platforms,
    .screenshots,
    .downloads,
    .repo {
        padding: 24px 0;
    }

    .descrow {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .wEditorLogo {
        width: 82px;
    }

    .featureslist,
    .screenshots {
        grid-template-columns: 1fr;
    }

    .scrtitle {
        grid-column: auto;
    }

    .platformstable th,
    .platformstable td {
        padding: 10px;
        font-size: 14px;
    }

    footer {
        flex-direction: column;
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
