@font-face {
    font-family: 'Rebelton';
    src: url('../assets/fonts/rebelton.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --nd-ink: #05070b;
    --nd-panel-top: rgba(12, 30, 39, 0.92);
    --nd-panel-mid: rgba(9, 18, 28, 0.96);
    --nd-panel-bottom: rgba(4, 8, 14, 0.98);
    --nd-cyan: #8ce9ff;
    --nd-cyan-strong: #d7fbff;
    --nd-teal: #3ab8ca;
    --nd-red: #ff6a7d;
    --nd-red-strong: #ffc0c9;
    --nd-amber: #f5c56c;
    --nd-copy: #d4e0e8;
    --nd-copy-muted: #8da0ab;
}

#screen-transition-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(130, 235, 255, 0.08), rgba(0, 0, 0, 0.94) 58%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 650ms ease;
    z-index: 200000;
}

#screen-transition-overlay.is-visible {
    opacity: 1;
}

.TS_background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1500;
    backdrop-filter: blur(16px) saturate(0.84) brightness(0.66);
    -webkit-backdrop-filter: blur(16px) saturate(0.84) brightness(0.66);
    transition: opacity 700ms ease, filter 700ms ease, visibility 0s linear 700ms;
}

.TS_background img,
#TS_background_overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#TS_background_overlay {
    background:
    radial-gradient(circle at 24% 18%, rgb(var(--nd-root-strong-rgb) / 0.18), transparent 24%),
        radial-gradient(circle at 78% 14%, rgba(245, 197, 108, 0.12), transparent 22%),
        linear-gradient(115deg, rgba(4, 8, 14, 0.52), rgba(4, 8, 14, 0.14), rgba(0, 0, 0, 0.58));
}

.TS_background.is-visible,
.titlescreen.is-visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.TS_background.is-exiting,
.titlescreen.is-exiting {
    opacity: 0;
    visibility: hidden;
}

.titlescreen {
    position: absolute;
    top: 50%;
    left: 50%;
    display: none;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1600;
    flex-direction: row;
    justify-content: center;
    transform: translate(-50%, calc(-50% + 18px));
    filter: blur(10px);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1), filter 700ms ease, visibility 0s linear 700ms;
}

.titlescreen.is-visible {
    pointer-events: auto;
    transform: translate(-50%, -50%);
    filter: blur(0);
}

.titlescreen.is-visible .TS_left_container,
.titlescreen.is-visible .TS_right_container,
.titlescreen.is-visible .TS_titlecont,
.titlescreen.is-visible .TS_buttonscont,
.titlescreen.is-visible .version-display {
    opacity: 1;
    transform: translateY(0);
}

.titlescreen.is-exiting .TS_left_container,
.titlescreen.is-exiting .TS_right_container,
.titlescreen.is-exiting .TS_titlecont,
.titlescreen.is-exiting .TS_buttonscont,
.titlescreen.is-exiting .version-display {
    opacity: 0;
    transform: translateY(-18px);
}

.version-display {
    background: linear-gradient(145deg, rgb(var(--nd-root-rgb) / 0.82), rgba(26, 26, 26, 0.96));
    border: 3px solid rgb(var(--nd-root-strong-rgb) / 0.75);
    border-radius: 10px;
    padding: 15px 37px 15px 30px;
    font-size: 48px;
    font-weight: bold;
    color: rgb(var(--nd-root-soft-rgb) / 1);
    font-family: 'Courier New', monospace;
    position: absolute;
    top: 29%;
    left: 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200002;
    box-shadow: 0 0 18px rgb(var(--nd-root-strong-rgb) / 0.22);
}

#game-version {
    letter-spacing: -10px;
}

.TS_container {
    position: relative;
    flex-grow: 1;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: var(--relative-width);
    min-width: 1350px;
}

.TS_left_container {
    left: -82px;
    top: -20px;
    width: 40%;
    position: relative;
}

.TS_titlecont {
    width: 100%;
    height: 47%;
    color: #444;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 45px;
    position: relative;
    left: -50px;
}

.TS_titlecont img {
    width: 645px;
    object-fit: contain;
    position: relative;
    top: -26px;
    transition: filter 0.25s ease;
}

.TS_titlecont img:not([src]),
.TS_titlecont img[src=""] {
    visibility: hidden;
}

.demoTag {
    display: inline-block;
    font-family: 'Arial Narrow Bold', sans-serif;
    margin: -24px 0 24px 6px;
    padding: 6px 12px;
    border: 2px solid rgb(var(--nd-root-strong-rgb) / 0.75);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    color: rgb(var(--nd-root-soft-rgb) / 1);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.TS_titleEdition {
    position: absolute;
    right: 327px;
    bottom: 10px;
    font-family: Arial, sans-serif;
    font-size: 26px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 12px rgb(var(--nd-root-strong-rgb) / 0.55);
    display: none;
    text-align: right;
    font-weight: bold;
    color: rgb(var(--nd-root-soft-rgb) / 1);
}

html[data-edition="gold"] .TS_titleEdition {
    right: 290px;
    bottom: 53px;
    font-family: Arial, sans-serif;
}

html[data-edition="diamond"] .TS_titleEdition {
    right: 263px;
    bottom: 54px;
    font-family: Arial, sans-serif;
}

.TS_buttonscont {
    height: 100%;
    display: block;
    flex-direction: column;
    align-items: center;
    margin-left: 80px;
    justify-content: flex-start;
    flex-shrink: 1;
}

.TS_buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

.TS_menu_button {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 78px;
    margin-bottom: 14px;
    padding-left: 62px;
    border: 0;
    background: transparent;
    color: var(--nd-red);
    cursor: pointer;
    font-size: 59px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.28s ease, transform 0.28s ease;
    font-weight: 900;
}

.TS_menu_button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgb(var(--nd-root-rgb) / 0.48);
    background: linear-gradient(145deg, rgb(var(--nd-root-rgb) / 0.98), rgba(20, 2, 4, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 20px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translate(-18px, -50%) scale(0.84);
    transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.TS_menu_button::after {
    content: '';
    position: absolute;
    left: 17px;
    top: 50%;
    width: 12px;
    height: 16px;
    background: var(--nd-red-strong);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    opacity: 0;
    transform: translate(-18px, -50%) scale(0.84);
    transition: opacity 0.28s ease, transform 0.28s ease, background 0.28s ease;
}

.TS_menu_button:hover {
    color: rgb(255, 255, 255);
    transform: translateX(8px);
}

.TS_menu_button:hover::before,
.TS_menu_button:hover::after {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
}

.TS_menu_button:hover::before {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 18px rgb(var(--nd-root-strong-rgb) / 0.42), 0 10px 20px rgba(0, 0, 0, 0.22);
}

.TS_menu_button:hover::after {
    background: var(--nd-root-soft);
}

.TS_right_container {
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 45%;
    position: relative;
    left: 96px;
}


.nd-intel-panel {
    width: min(100%, 630px);
    padding: 34px;
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(12, 30, 39, 0.94), rgba(4, 8, 14, 0.96)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent);
    border: 1px solid rgba(140, 233, 255, 0.18);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(58, 184, 202, 0.12);
    backdrop-filter: blur(10px);
}

.nd-panel-kicker {
    font-family: Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--nd-amber);
    margin-bottom: 14px;
}

.nd-panel-title {
    font-family: Georgia, serif;
    font-size: 56px;
    line-height: 1;
    color: #f9fcff;
    margin-bottom: 18px;
}

.nd-panel-copy {
    font-family: Georgia, serif;
    font-size: 20px;
    line-height: 1.55;
    color: var(--nd-copy);
    margin-bottom: 28px;
}

.nd-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.nd-status-card {
    padding: 18px 18px 16px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(14, 33, 45, 0.88), rgba(7, 12, 20, 0.92));
    border: 1px solid rgba(140, 233, 255, 0.12);
}

.nd-status-label {
    font-family: Consolas, monospace;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--nd-copy-muted);
    margin-bottom: 8px;
}

.nd-status-value {
    font-family: Georgia, serif;
    font-size: 27px;
    color: var(--nd-cyan-strong);
}

.nd-protocol-list {
    display: grid;
    gap: 12px;
}

.nd-protocol-item {
    display: grid;
    grid-template-columns: minmax(120px, 168px) 1fr;
    gap: 16px;
    align-items: start;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nd-protocol-item span {
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: 24px;
    letter-spacing: 0.05em;
    color: var(--nd-red-strong);
    text-transform: uppercase;
}

.nd-protocol-item strong {
    font-family: Georgia, serif;
    font-size: 17px;
    line-height: 1.5;
    color: var(--nd-copy);
    font-weight: normal;
}

@media (max-width: 1480px) {
    .TS_container {
        grid-template-columns: minmax(460px, 1fr) minmax(420px, 560px);
        gap: 30px;
    }

    .TS_titlecont img {
        width: 520px;
    }

    .TS_menu_button {
        font-size: 50px;
    }

    .nd-panel-title {
        font-size: 46px;
    }
}

/* ── Social media icon row ── */
.TS_overlayMedias {
    position: absolute;
    display: flex;
    max-width: 105%;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: flex-end;
    align-items: center;
    padding-right: 15px;
    width: var(--relative-width);
    top: 0;
    right: 0;
    z-index: 1700;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 520ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

body.menu-active .TS_overlayMedias {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.TS_media {
    border-radius: 50%;
    overflow: hidden;
    height: 100px;
    width: 100px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    margin-right: 15px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.TS_media:focus,
.TS_media:focus-visible {
    outline: none;
}

.TS_media img {
    height: 100%;
}

.TS_media:hover {
    transform: scale(1.15);
}

/* ── Patreon / version cards panel ── */
.patreon-panel {
    width: 100%;
    max-width: 615px;
    display: flex;
    flex-direction: column;
    margin-top: 105px;
    height: 790px;
    --pc-expanded-top-size: 52%;
    align-content: center;
    align-items: center;
}

.pc-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    align-items: center;
    height: 100%;
    min-height: 0;
    position: relative;
    --pc-expanded-border-color: rgba(140, 233, 255, 0.6);
    width: 444px;
}

.pc-card {
    position: relative;
    border-radius: 6px;
    padding: 0;
    height: 250px;
    overflow: hidden;
    border: none;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
    cursor: pointer;
}

.pc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 36px rgba(0, 0, 0, 0.45);
}

.pc-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
    border: 0;
    background: transparent;
}

.pc-hover {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.72));
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    justify-content: center;
}

.pc-card:hover .pc-hover {
    opacity: 1;
    pointer-events: auto;
}

.pc-hover-title {
    font-family: Georgia, serif;
    font-size: 36px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: 0 0 12px rgba(54, 178, 194, 0.5);
}

.pc-base {
    background: linear-gradient(145deg, rgba(10, 24, 34, 0.95), rgba(4, 9, 16, 0.95));
    --MMS-patreon-card-color: rgba(54, 178, 194, 0.8);
}

.pc-gold {
    background: linear-gradient(145deg, rgba(34, 24, 8, 0.95), rgba(16, 10, 4, 0.95));
    --MMS-patreon-card-color: rgba(245, 197, 108, 0.8);
}

.pc-diamond {
    background: linear-gradient(145deg, rgba(8, 24, 34, 0.95), rgba(4, 10, 18, 0.95));
    --MMS-patreon-card-color: rgba(156, 247, 255, 0.8);
}

.pc-expanded-view {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 6px;
    border: 2px solid var(--pc-expanded-border-color);
    background: linear-gradient(135deg, rgba(8, 17, 26, 0.92), rgba(3, 7, 14, 0.95));
    box-shadow: 0 24px 42px rgba(0, 0, 0, 0.5);
    padding: 12px;
    box-sizing: border-box;
    gap: 12px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.42s ease, transform 0.42s ease, visibility 0s linear 0.42s;
}

.pc-grid.pc-grid-expanded .pc-card {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
    pointer-events: none;
}

.pc-grid.pc-grid-expanded .pc-expanded-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.42s ease, transform 0.42s ease;
}

.pc-expanded-text {
    min-height: 0;
    padding: 10px;
    color: #f0f7ff;
    font-size: 16px;
    display: flex;
    align-items: center;
    text-align: left;
    max-width: 480px;
    gap: 8px;
    left: 10px;
    margin-left: 17px;
}

.pc-expanded-text::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(240, 247, 255, 0.9);
    flex: 0 0 6px;
}

.pc-expanded-top {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    min-height: 0;
    align-content: stretch;
    align-items: flex-start;
}

.pc-expanded-tier-box {
    align-self: center;
    height: 55px;
    padding: 10px;
    border: 2px solid var(--pc-expanded-border-color);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: Georgia, serif;
    font-size: 27px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 480px;
}

.pc-expanded-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
}

.pc-video-box {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pc-video-box:hover {
    transform: scale(1.03);
    box-shadow: 0 0 18px rgba(140, 233, 255, 0.18);
}

.pc-video-box video,
.pc-video-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pc-grid[data-expanded-tier="base"] {
    --pc-expanded-border-color: rgba(255, 154, 154, 0.6);
}

.pc-grid[data-expanded-tier="gold"] {
    --pc-expanded-border-color: rgba(245, 197, 108, 0.6);
}

.pc-grid[data-expanded-tier="diamond"] {
    --pc-expanded-border-color: rgba(140, 233, 255, 0.6);
}

@media (max-width: 1550px) {
    .patreon-panel {
        height: auto;
    }

    .pc-grid {
        height: auto;
        grid-template-columns: repeat(1, 1fr);
    }

    .pc-expanded-view {
        height: auto;
        min-height: 560px;
    }

    .pc-expanded-media {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }
}
