/* Base */
* {
    box-sizing: border-box;
}

:root { --nav-h: 36px; }

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #e8e8e8;
    background: #000 url("https://archive.one-direction.org/cyberpunk/images/background.jpg") center var(--nav-h) / cover no-repeat fixed;
}

.sr-only {
    position: absolute;
    left: -9999px;
}

/* Stage */
.stage{
  position: relative;
  width: min(1280px, 96vw);
  margin: var(--nav-h) auto 0;
  aspect-ratio: 1600 / 900;
}

/* Top brown bar */
.nav-bar {
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0;
  height: var(--nav-h);
  background: #372D20;
  border: none;
  z-index: 1000;
}

.nav-inner {
    position: relative;
    height: 100%;
    width: min(950px, 92vw);
    margin: 0 auto;
}

.nav-back { 
    position: absolute; 
    left: 0; 
    top: 55%; 
    transform: translateY(-50%); 
    }

.nav-1dd { 
    position: absolute; 
    right: 0; 
    top: 50%; 
    transform: translateY(-50%);
    }

/* Header area */
.site-header {
    position: relative;
    width: 100%;
    margin-top: var(--nav-h);
    z-index: 5;
    display: flex;
    justify-content: center;
}

/* Inner container */
.header-inner {
    position: relative;
    width: 950px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

/* Left and right images */
.header-left {
    width: auto;
    object-fit: contain;
    display: block;
}

.header-right-link {
    display: inline-block;
    text-decoration: none;
    border: none;
    outline: none;
}

.header-right-link img {
    width: auto;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

.header-right-link:focus,
.header-right-link:hover,
.header-right-link:active {
    text-decoration: none;
    border: none;
    outline: none;
}

/* Character + Messages box */
.char {
    position: absolute;
    left: 175px;
    width: auto;
    z-index: 2;
    pointer-events: none;
}

.messages-box {
    position: absolute;
    left: 22%;
    top: 40%;
    width: 595px;
    height: 350px;

    background: #000;
    border: 6px solid #ff00f0;
    z-index: 3;
    padding: 0;
}

#challengeContent {
    width: 580px;
    height: 335px;
    margin: 3px auto;

    background: #0c0c0c url("https://archive.one-direction.org/cyberpunk/images/left/messages_bg.png") top left no-repeat;
    overflow-y: auto;
    overflow-x: hidden;
}

#challengeContent.message-file-view {
    background: #000;
}

#challengeContent a {
    color: #ff00f0;
    text-decoration: none;
    font-weight: 700;
}

#challengeContent a:hover {
    color: #8cff25;
}

.message-file {
    position: relative;
    width: 100%;
    min-height: 100%;
    background: #000;
    color: #8cff25;

    padding: 24px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.25;
}

.message-file h2 {
    margin: 0 0 14px;
    color: #8cff25;
    font-family: "DM Sans", sans-serif;
    font-size: 28px;
    font-weight: 500;
}

.message-file p {
    margin: 0 0 12px;
}

.message-file a {
    color: #ff00f0;
    text-decoration: none;
    font-weight: 700;
}

.message-file a:hover {
    color: #8cff25;
}

.message-folder-icon {
    position: absolute;
    top: 20px;
    right: 24px;

    width: 43px;
    height: 56px;

    border: 0;
    background: transparent;
    padding: 0;
    cursor: default;
}

.message-folder-icon img {
    width: 43px;
    height: 56px;
    display: block;
}

.message-folder-icon span {
    position: absolute;
    top: 16px;
    left: 8px;

    color: #000;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.message-green {
    width: 410px;
    min-height: 205px;
    margin: 74px auto 0;
    color: #000;
    padding: 16px 18px;

    font-family: monospace;
    font-size: 14px;
    line-height: 1.25;
}

.message-green h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-family: Arial, sans-serif;
    font-weight: 400;
}

.message-back {
    position: absolute;
    right: 24px;
    bottom: 18px;

    display: inline-flex;
    align-items: center;
    gap: 4px;

    font-family: "DM Sans", sans-serif;
    font-size: 11px;
    font-weight: 700;

    color: #ff00f0;
    background: transparent;
    border: 0;
    padding: 0;

    cursor: pointer;
}

.message-back:hover {
    color: #8cff25;
}

.mb-head {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: #31ff4c;
    font-weight: 700;
    margin-bottom: 6px;
}

.mb-head img {
    height: 18px;
    width: auto;
}

.tinkers {
    position: absolute;
    left: 375px;
    width: 503px;
    height: 100px;
}

.tk-inner {
    background: #000;
    color: #31ff4c;
    border: 4px solid #000;
    padding: 8px;
    display: flex;
    gap: 10px;
    height: 100%;
}

.tk-text {
    flex: 1 1 auto;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #31ff4c;
    padding-right: 4px;
}

.tk-text h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
}

.tinkers img {
    width: 111px;
    height: 78px;
}

/* Twitter + Code breaker (right column middle) */
.twitter {
    position: absolute;
    left: 70.5%;

    width: 361px;
    height: 455px;

    background: url('https://archive.one-direction.org/cyberpunk/images/right/twitter_background.png') no-repeat center;
    background-size: contain;

    border: none;
    padding: 0;
}

.tw-content {
    position: absolute;

    top: 90px;
    left: 45px;

    width: 300px;
    height: 345px;

    overflow-y: auto;
	overflow-x: hidden;

    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    line-height: 1.4;

    color: #000;
	padding-right: 6px; 
}

.tw-content::-webkit-scrollbar {
    width: 6px;
}
.tw-content::-webkit-scrollbar-thumb {
    background: #888;
}
.tw-content::-webkit-scrollbar-track {
    background: transparent;
}

.tw-content p {
    margin: 0;
}

.codebreaker {
    position: absolute;
    left: 72%;
    top: 88%;

    width: 291px;
    height: 126px;
}

.cb-bg {
    position: relative;
    width: 100%;
    height: 100%;

    background: url('https://archive.one-direction.org/cyberpunk/images/right/codebreaker.png') no-repeat center;
    background-size: contain;

    border: none;
    padding: 0;
}

#code {
    position: absolute;

    top: 58px;
    left: 28px;

    width: 170px;
    height: 22px;

    background: #7CFF00;   /* neon green */
    border: none;

    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    padding: 2px 6px;

    outline: none;
}

.code-label {
    position: absolute;
    top: 36px;
    left: 28px;

    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;

    color: #fff;
}

#goBtn {
    position: absolute;

    top: 58px;
    left: 205px;

    width: 40px;
    height: 22px;

    background: #00CFEF;   /* cyan */
    border: none;

    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.files {
    position: absolute;
    left: 22%;
    top: 91%;
    width: 610px;
    height: 92px;

    background: #000;
    z-index: 4;

    display: flex;
    align-items: center;
    padding: 12px 18px;
    gap: 12px;
}

.files-logo {
    width: 115px;
    display: flex;
    align-items: center;
    gap: 8px;

    color: #fff;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    white-space: nowrap;
}

.files-logo img {
    width: 36px;
    height: auto;
}

.files-window {
    width: 405px;
    overflow: hidden;
}

.files-track {
    display: flex;
    gap: 13px;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: transform .3s ease;
}

.paper-race {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.pr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pr-item img {
    height: 90px;
    width: auto;
    display: block;
}

.pr-item a {
    margin-top: 6px;
    font-size: 12px;
    color: #ff00f0;
    text-decoration: none;
    font-family: "DM Sans", sans-serif;
}

.pr-item a:hover {
    color: #8cff25;
}

.file-folder {
    position: relative;
    flex: 0 0 43px;
    height: 56px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.file-folder img {
    width: 43px;
    height: 56px;
    display: block;
}

.file-folder span {
    position: absolute;
    top: 16px;
    left: 8px;

    color: #000;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
}

.file-folder:hover span {
    color: #8cff25;
}

.file-folder.is-active span {
    color: #000;
}

.file-scroll {
    width: 35px;
    height: 42px;
    border: 0;
    padding: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
}

.file-prev {
    background-image: url("https://archive.one-direction.org/cyberpunk/images/1dcp_scrollleft.png");
}

.file-next {
    background-image: url("https://archive.one-direction.org/cyberpunk/images/1dcp_scrollright.png");
}

/* MODALS */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.is-open {
    display: flex;
}

.modal-box {
    position: relative;
    width: min(520px, 92vw);
    max-height: 82vh;
    overflow-y: auto;

    background: #000;
    color: #8cff25;
    border: 5px solid #ff00f0;
    padding: 24px;

    font-family: "DM Sans", sans-serif;
    box-shadow: 0 0 0 4px #000, 0 0 25px rgba(255,0,240,.55);
}

.modal-box h2 {
    margin: 0 0 12px;
    color: #8cff25;
    font-size: 24px;
}

.modal-box p {
    font-size: 14px;
    line-height: 1.5;
}

.modal-box a {
    color: #ff00f0;
    font-weight: 700;
    text-decoration: none;
}

.modal-box a:hover {
    color: #8cff25;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;

    background: transparent;
    border: 0;
    color: #ff00f0;
    font-size: 28px;
    cursor: pointer;
}

.modal-close:hover {
    color: #8cff25;
}

.modal-video-box {
    width: min(760px, 94vw);
}

#videoPlayer {
    width: 100%;
    max-height: 430px;
    display: block;

    background: #111;
    border: 3px solid #8cff25;
}

#videoPlayer::-webkit-media-controls-panel {
    background-color: #111;
}

.download-btn {
    display: inline-block;
    margin-top: 14px;

    background: #ff00f0;
    color: #000 !important;
    padding: 9px 14px;

    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
}

.download-btn:hover {
    background: #8cff25;
    color: #000 !important;
}

.cp-link {
    color: #ff00f0;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    font-family: "DM Sans", sans-serif;
}

.cp-link:hover {
    color: #8cff25;
}

.modal-game-box {
    width: min(760px, 94vw);
}

.game-player {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    border: 3px solid #8cff25;
    overflow: hidden;
}

.game-player ruffle-player,
.game-player object,
.game-player embed {
    width: 100%;
    height: 100%;
    display: block;
}

/* Videos */
.video-links {
    margin-top: 14px;

    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    gap: 10px 40px;

    text-align: center;
}

.video-link {
    color: #ff00f0;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    cursor: pointer;
}

.video-link:hover {
    color: #8cff25;
}

/* =========================
   MOBILE / TABLET FIXES
========================= */

@media (max-width: 1150px) {

    body {
        background-attachment: scroll;
        background-size: auto 100%;
        overflow-x: hidden;
    }

    .stage {
        max-width: 100%;
        min-height: auto;
        aspect-ratio: auto;
        margin-top: var(--nav-h);
        padding: 16px 10px 40px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .nav-inner {
        width: 94vw;
    }

    .nav-back img,
    .nav-1dd {
        max-height: 22px;
        width: auto;
    }

    .site-header {
        margin-top: 0;
    }

    .header-inner {
        width: 100%;
        height: auto;
        gap: 12px;
        padding: 10px 0;
    }

    .header-left {
        max-width: 70%;
        height: auto;
    }

    .header-right-link img {
        max-width: 80px;
        height: auto;
    }

    .char {
        position: relative;
        left: auto;
        width: 140px;
        margin: 0 auto -20px;
        display: block;
    }

    .tinkers,
    .messages-box,
    .twitter,
    .codebreaker,
    .files {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 610px;
        margin: 0 auto;
    }

    .tinkers {
        height: auto;
    }

    .tk-inner {
        min-height: 100px;
    }

    .tk-text {
        font-size: 12px;
    }

    .tinkers img {
        width: 95px;
        height: auto;
    }

    .messages-box {
        height: 350px;
    }

    #challengeContent {
        width: calc(100% - 10px);
        height: calc(100% - 10px);
        margin: 5px auto;
        background-size: cover;
    }

    .message-green {
        width: min(410px, 86%);
        margin-top: 70px;
        font-size: 12px;
    }

    .message-file {
        padding: 18px;
        font-size: 12px;
    }

    .message-file h2 {
        font-size: 22px;
        padding-right: 60px;
    }

    .twitter {
        width: 361px;
        max-width: 100%;
        height: 455px;
    }

    .tw-content {
        top: 90px;
        left: 12%;
        width: 76%;
        height: 330px;
        font-size: 12px;
    }

    .codebreaker {
        width: 291px;
        height: 126px;
    }

    .files {
        height: auto;
        min-height: 92px;
        padding: 12px;
        gap: 8px;
    }

    .files-logo {
        width: 92px;
        font-size: 13px;
    }

    .files-logo img {
        width: 30px;
    }

    .files-window {
        width: 100%;
        flex: 1;
    }

    .paper-race {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pr-item img {
        height: 75px;
    }

    .video-links {
        grid-template-columns: repeat(2, auto);
        gap: 8px 28px;
    }
}

@media (max-width: 520px) {

    :root {
        --nav-h: 34px;
    }

    .nav-back img {
        max-width: 170px;
    }

    .nav-1dd {
        max-width: 120px;
    }

    .header-inner {
        flex-direction: column;
        gap: 4px;
    }

    .header-left {
        max-width: 92%;
    }

    .header-right-link img {
        max-width: 75px;
    }

    .messages-box {
        height: 320px;
        border-width: 4px;
    }

    .message-green {
        width: 88%;
        margin-top: 58px;
        padding: 12px;
        font-size: 11px;
    }

    .message-green h2 {
        font-size: 20px;
    }

    .message-folder-icon {
        top: 14px;
        right: 14px;
    }

    .message-back {
        right: 14px;
        bottom: 12px;
    }

    .twitter {
        width: 320px;
        height: 404px;
    }

    .tw-content {
        top: 80px;
        left: 40px;
        width: 250px;
        height: 295px;
        font-size: 12px;
    }

    .files {
        max-width: 100%;
        overflow: hidden;
    }

    .files-logo {
        width: 74px;
        font-size: 12px;
    }

    .file-scroll {
        width: 28px;
    }

    .video-links {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .modal-box {
        width: 92vw;
        padding: 20px;
    }
}

.gamer-patch {
    position: absolute;
    left: 12px;
    top: 15px;
    width: 235px;
    height: auto;
    z-index: 8;
}

@media (max-width: 1150px) {
    .gamer-patch {
        position: relative;
        left: auto;
        top: auto;
        width: min(240px, 80vw);
        margin: 0 auto -10px;
        display: block;
    }
}

.codes-box {
    position: absolute;
    left: 22%;
    top: 104%;
    width: 610px;

    background: #000;
    border: 4px solid #ff00f0;
	margin: 5px 5px;
    padding: 14px 18px;
    z-index: 4;

    font-family: "DM Sans", sans-serif;
}

.codes-title {
    color: #8cff25;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
}

.codes-list {
    display: grid;
    gap: 8px;
}

.code-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #111;
    border: 1px solid #333;
    padding: 8px 10px;
}

.code-name {
    color: #ff00f0;
    font-family: monospace;
    font-size: 14px;
    font-weight: 700;
}

.code-pill {
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.code-pill.active {
    background: #8cff25;
    color: #000;
}

.code-pill.inactive {
    background: #333;
    color: #aaa;
}

@media (max-width: 1150px) {
    .codes-box {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 610px;
        margin: 0 auto;
    }
}

/* Code Acceptance */
.cb-notice {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translate(-50%, 160%);
    width: min(360px, 90vw);

    background: #000;
    border: 3px solid #ff00f0;
    box-shadow: 0 0 12px #ff00f0, 0 0 24px rgba(255,0,240,.4);

    padding: 14px 18px;
    z-index: 10000;
    text-align: center;
    transition: transform .35s ease;
}

.cb-notice.show {
    transform: translate(-50%, 0);
}

.cb-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.cb-title.success {
    color: #8cff25;
}

.cb-title.error {
    color: #ff3b3b;
}

.cb-message {
    font-size: 13px;
    color: #fff;
}

/* Rewards */
.rewards-box {
    position: absolute;
    left: 22%;
    top: 40%;
    width: 595px;
    height: 350px;
    background: #000;
    border: 6px solid #ff00f0;
    z-index: 3;
    padding: 0;
}

.rewards-inner {
    width: 580px;
    height: 335px;
    margin: 3px auto;
    background: #000;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px;
    color: #8cff25;
    font-family: "DM Sans", sans-serif;
}

.rewards-inner h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    color: #8cff25;
}

.rewards-intro {
    margin: 0 0 16px;
    font-size: 13px;
    color: #fff;
}

.reward-group {
    margin-bottom: 22px;
    border-top: 1px solid #222;
    padding-top: 14px;
}

.reward-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.reward-code {
    color: #ff00f0;
    font-family: monospace;
    font-size: 18px;
    font-weight: 800;
}

.reward-pill {
    background: #8cff25;
    color: #000;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.reward-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* background rewards usually look better larger */
.reward-grid-bg {
    grid-template-columns: repeat(2, 1fr);
}

.reward-grid a {
    display: block;
    background: #111;
    border: 2px solid #ff00f0;
    padding: 5px;
    transition: transform .2s ease, border-color .2s ease;
}

.reward-grid a:hover {
    transform: translateY(-2px);
    border-color: #8cff25;
}

.reward-grid img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.reward-grid-bg img {
    height: 145px;
}

@media (max-width: 1150px) {
    .rewards-box {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 610px;
        height: auto;
        margin: 0 auto;
    }

    .rewards-inner {
        width: calc(100% - 10px);
        height: auto;
        max-height: 520px;
    }
}

@media (max-width: 520px) {
    .reward-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .reward-grid,
    .reward-grid-bg {
        grid-template-columns: repeat(2, 1fr);
    }

    .reward-grid img,
    .reward-grid-bg img {
        height: 105px;
    }
}