/* Fonts and animations */
@font-face {
    font-family: "Default-op";
    src: url("../fonts/8bitoperator_jve.woff2") format("woff2"),
        url("../fonts/8bitoperator_jve.woff") format("woff"),
        url("../fonts/8bitoperator_jve.ttf") format("truetype");
}

@-webkit-keyframes animatetop {
    from { top: -300px; opacity: 0; }
    to { top: 0; opacity: 1; }
}

@keyframes animatetop {
    from { top: -300px; opacity: 0; }
    to { top: 0; opacity: 1; }
}

@-webkit-keyframes animatedown {
    from { top: 0; opacity: 1; }
    to { top: -300px; opacity: 0; }
}

@keyframes animatedown {
    from { top: 0; opacity: 1; }
    to { top: -300px; opacity: 0; }
}

/* Global base */
body {
    font-family: "Default-op";
    font-size: 30px;
    background-color: black;
    color: white;
    overflow-x: hidden;
}

html.modal-open,
body.modal-open {
    overflow: hidden;
}

h1,
h2,
h3 {
    font-family: "Default-op";
    color: white;
}

header {
    margin-top: 10px;
}

/* Generic content blocks */
section {
    padding: 0 20px;
    max-width: 900px;
    margin: 0 auto;
}

section h1 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 40px;
}

section ul {
    padding-left: 30px;
    margin: 15px auto;
    max-width: 900px;
}

section ul li {
    margin: 8px 0;
    line-height: 1.4;
    font-size: inherit;
}

.troubleshooting-item,
.about-item {
    margin-bottom: 30px;
    padding: 15px 20px;
    border-left: 3px solid #ffeb3b;
    background-color: rgba(255, 235, 59, 0.05);
}

.troubleshooting-item h2,
.about-item h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 36px;
    color: #ffeb3b;
}

.about-item h2 {
    margin-bottom: 15px;
}

.troubleshooting-item p,
.about-item p {
    margin: 8px 0;
    line-height: 1.5;
}

.troubleshooting-item ul {
    padding-left: 30px;
    margin: 10px 0;
}

.troubleshooting-item ul li {
    margin: 6px 0;
    line-height: 1.4;
}

.contact-email {
    text-align: center;
    margin: 20px 0;
    padding: 15px 20px;
    border: 2px solid #ffeb3b;
    background-color: rgba(255, 235, 59, 0.05);
    display: inline-block;
    width: 100%;
}

.contact-email h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.6;
}

.system-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.req-section {
    flex: 1;
    min-width: 300px;
    padding: 10px 0;
}

.req-section strong {
    font-size: 24px;
}

.req-section ul {
    margin: 10px 0;
    padding-left: 30px;
}

/* Footer */
footer {
    padding: 12px 0;
    text-align: center;
    color: #fff;
    background-color: #000;
    font-size: 18px;
}

footer p {
    border: 0;
    margin: 0;
    font-size: 14px;
    color: #888;
}

/* Navigation */
.top-nav {
    min-height: 60px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 10px;
    gap: 8px;
    font-size: 30px;
}

.top-nav .w3-display-middle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: nowrap;
}

.nav-link {
    display: inline-flex;
    padding: 8px 16px 6px;
    color: #ffffff;
    background-color: transparent;
    text-decoration: none;
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: inherit;
    font-weight: 100;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.nav-link:hover {
    color: #ffeb3b;
}

.nav-link.active-page {
    color: #ffeb3b;
    border-bottom-color: #ffeb3b;
}

.lang-toggle {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.lang-toggle .separator {
    color: #ffffff;
    opacity: 1;
}

/* Misc */
.link-highlight {
    color: white;
    background-color: transparent;
    cursor: pointer;
    text-decoration: none;
}

.link-highlight:hover {
    color: #ffeb3b;
}

.pixel-image {
    image-rendering: pixelated;
    user-select: none;
    -webkit-user-drag: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* Hamburger */
.hamburger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    gap: 6px;
    margin-right: 12px;
}

.hamburger-menu span {
    width: 24px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(0, 12px);
}

.hamburger-menu[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(0, -12px);
}

/* Mobile menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: #3d1f66;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    max-height: 300px;
}

.mobile-menu-link {
    color: #ffffff;
    text-decoration: none;
    padding: 14px 16px;
    border: none;
    background: none;
    text-align: center;
    font-weight: 100;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    white-space: nowrap;
}

.mobile-menu-link:hover {
    background: rgba(255, 235, 59, 0.1);
    padding-top: 12px;
    padding-bottom: 16px;
}

.mobile-menu-link.active-page {
    color: #ffeb3b;
    background: rgba(255, 235, 59, 0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 30;
    padding-top: 200px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    position: relative;
    background-color: #303030;
    margin: auto;
    border: 1px solid #888;
    width: 80%;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetop;
    animation-duration: 0.4s;
}

.modal-header,
.modal-footer {
    padding: 2px 16px;
    background-color: #6235b5;
    color: white;
}

.modal-header h2 {
    margin: 10px 0;
    font-size: 30px;
    line-height: 1.3;
}

.modal-footer h2 {
    margin: 10px 0;
    font-size: 26px;
    line-height: 1.3;
}

.modal-body {
    padding: 2px 16px;
    max-height: 40vh;
    overflow-y: auto;
}

.modal-body section {
    padding: 16px 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
    max-width: none;
}

.modal-body section span {
    padding-right: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

.modal-body section .w3-right {
    float: none;
    margin-left: auto;
}

.modal-body-separator {
    border-bottom: 2px solid #888;
}

.modal-body h2 {
    margin-top: 16px;
    margin-bottom: 12px;
    font-size: 28px;
    color: #ffeb3b;
}

.modal-body h2:first-child {
    margin-top: 0;
}

.modal-body h3 {
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 20px;
    color: #fff;
}

.modal-body ul {
    margin: 8px 0;
    padding-left: 30px;
}

.modal-body ul li {
    margin: 6px 0;
    line-height: 1.4;
}

.modal-body p {
    margin: 8px 0;
    line-height: 1.5;
}

.changelog-item {
    margin-bottom: 30px;
    padding: 15px 20px;
    border-left: 3px solid #5b8ff0;
    background-color: rgba(91, 143, 240, 0.05);
}

.changelog-item h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 36px;
    color: #5b8ff0;
}

.changelog-item h3 {
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 24px;
    color: #fff;
}

.changelog-item ul {
    margin: 10px 0;
    padding-left: 30px;
}

.changelog-item ul li {
    margin: 6px 0;
    line-height: 1.4;
}

.close {
    color: white;
    float: right;
    font-size: 40px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #ffeb3b;
    text-decoration: none;
    cursor: pointer;
}

/* Tablet width nav tweak */
@media (min-width: 769px) and (max-width: 1000px) {
    .top-nav {
        font-size: 24px;
    }

    .nav-link {
        padding: 10px 12px;
    }
}

/* Extra Small Devices (< 360px) */
@media (max-width: 359px) {
    header {
        margin-top: 20px;
    }

    header img {
        max-width: 100%;
        height: auto;
    }

    body {
        font-size: 14px;
    }

    p,
    ul li,
    ol li {
        font-size: 18px;
    }

    p {
        margin: 8px 0;
        padding: 0 8px;
    }

    h1 {
        font-size: 28px;
        margin: 10px 0;
    }

    h2 {
        font-size: 22px;
        margin: 8px 0;
    }

    h3 {
        font-size: 18px;
        margin: 6px 0;
    }

    .top-nav {
        min-height: 45px;
        padding: 0 5px;
        gap: 4px;
        font-size: 16px;
    }

    .top-nav .w3-display-middle,
    .top-nav .nav-link {
        display: none;
    }

    .hamburger-menu {
        display: flex;
        padding: 6px 8px;
        gap: 4px;
    }

    .hamburger-menu span {
        width: 20px;
        height: 2px;
    }

    .lang-toggle,
    .lang-toggle .nav-link,
    .mobile-menu {
        display: flex;
    }

    .mobile-menu {
        width: 100%;
        max-height: 0;
        transition: max-height 0.3s ease;
    }

    .mobile-menu.active {
        max-height: 350px;
    }

    .modal {
        padding-top: 100px;
    }

    .modal-content {
        width: 95%;
        max-height: 80vh;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-footer h2 {
        font-size: 18px;
    }

    .close {
        font-size: 28px;
    }
}

/* Small Devices (360px - 480px) */
@media (min-width: 360px) and (max-width: 480px) {
    header {
        padding: 10px;
        margin-top: 40px;
    }

    header img {
        max-width: 100%;
        height: auto;
    }

    main {
        padding: 0 10px;
    }

    body {
        font-size: 16px;
    }

    p,
    ul li,
    ol li {
        font-size: 20px;
    }

    p {
        margin: 8px 0;
        padding: 0 10px;
    }

    h1 {
        font-size: 30px;
        margin: 12px 0;
    }

    h2 {
        font-size: 24px;
        margin: 10px 0;
    }

    h3 {
        font-size: 20px;
        margin: 8px 0;
    }

    .top-nav {
        min-height: 48px;
        padding: 0 8px;
        gap: 6px;
        font-size: 18px;
    }

    .top-nav .w3-display-middle,
    .top-nav .nav-link {
        display: none;
    }

    .hamburger-menu {
        display: flex;
        padding: 8px 10px;
        gap: 5px;
    }

    .hamburger-menu span {
        width: 22px;
        height: 2.5px;
    }

    .lang-toggle,
    .lang-toggle .nav-link,
    .mobile-menu {
        display: flex;
    }

    .mobile-menu {
        width: 100%;
        max-height: 0;
        transition: max-height 0.3s ease;
    }

    .mobile-menu.active {
        max-height: 400px;
    }

    .mobile-menu-link {
        padding: 12px 14px;
        font-size: 0.9em;
    }

    .mobile-menu-link:hover {
        padding-top: 10px;
        padding-bottom: 14px;
    }

    .modal {
        padding-top: 120px;
    }

    .modal-content {
        width: 90%;
    }

    .modal-header {
        padding: 10px 12px;
    }

    .modal-header h2 {
        font-size: 22px;
    }

    .modal-body {
        padding: 10px 12px;
    }

    .modal-body section {
        padding: 12px 6px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .modal-body section span {
        flex-shrink: 0;
    }

    .modal-body section > div {
        width: 100%;
    }

    .modal-footer {
        padding: 10px 12px;
    }

    .modal-footer h2 {
        font-size: 20px;
    }

    .close {
        font-size: 32px;
    }
}

/* Medium Devices (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    header {
        padding: 15px;
        margin-top: 30px;
    }

    header img {
        max-width: 100%;
        height: auto;
    }

    main {
        padding: 0 15px;
    }

    body {
        font-size: 20px;
    }

    p,
    ul li,
    ol li {
        font-size: 24px;
    }

    p {
        margin: 10px 0;
        padding: 0 15px;
    }

    h1 {
        font-size: 38px;
        margin: 14px 0;
    }

    h2 {
        font-size: 30px;
        margin: 12px 0;
    }

    h3 {
        font-size: 24px;
        margin: 10px 0;
    }

    .top-nav {
        min-height: 52px;
        padding: 0 12px;
        gap: 8px;
        font-size: 22px;
    }

    .top-nav .w3-display-middle,
    .top-nav .nav-link {
        display: none;
    }

    .hamburger-menu {
        display: flex;
        padding: 8px 12px;
        gap: 6px;
    }

    .hamburger-menu span {
        width: 24px;
        height: 3px;
    }

    .lang-toggle,
    .lang-toggle .nav-link,
    .mobile-menu {
        display: flex;
    }

    .mobile-menu {
        width: 100%;
        max-height: 0;
        transition: max-height 0.3s ease;
    }

    .mobile-menu.active {
        max-height: 450px;
    }

    .mobile-menu-link {
        padding: 14px 16px;
        font-size: 0.95em;
    }

    .modal {
        padding-top: 140px;
    }

    .modal-content {
        width: 85%;
    }

    .modal-header h2 {
        font-size: 26px;
    }

    .modal-footer h2 {
        font-size: 22px;
    }
}

/* Large Devices (769px and up) */
@media (min-width: 769px) {
    body {
        font-size: 24px;
    }

    p,
    ul li,
    ol li {
        font-size: 28px;
    }

    h1 {
        font-size: 48px;
        margin: 16px 0;
    }

    h2 {
        font-size: 38px;
        margin: 14px 0;
    }

    h3 {
        font-size: 30px;
        margin: 12px 0;
    }

    .hamburger-menu {
        display: none;
    }

    .top-nav .w3-display-middle {
        display: flex;
    }

    .top-nav .nav-link {
        display: inline-block;
    }

    .mobile-menu {
        display: none !important;
    }

    .modal {
        padding-top: 200px;
    }

    .modal-content {
        width: 70%;
    }
}
