* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: #08090d;
    color: white;
    overflow-x: hidden;
}


/* NAVBAR */

.navbar {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 80px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 8%;

    background: rgba(8, 9, 13, 0.75);
    backdrop-filter: blur(15px);

    border-bottom: 1px solid rgba(255,255,255,0.05);

    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    color: white;
    text-decoration: none;
}

.logo span {
    color: #6c63ff;
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;

    transition: 0.3s;
}

.nav-links a:hover {
    color: white;
}


/* HERO */

.hero {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 70px;

    padding: 120px 10% 80px;

    position: relative;
}

.hero-content {
    max-width: 850px;
    z-index: 2;
}

.hero-games {
    width: min(100%, 385px);
    flex: 0 0 385px;

    position: relative;
    z-index: 2;

    padding: 34px;

    background: rgba(15, 16, 22, 0.82);
    border: 1px solid #252630;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

.games-label {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 14px;
}

.hero .hero-games h2 {
    color: white;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 12px;
}

.games-description {
    color: #8d8f99;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 27px;
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.games-list button {
    width: 100%;

    display: grid;
    grid-template-columns: 25px 1fr auto;
    align-items: center;
    gap: 8px;

    padding: 14px 12px;

    background: #15161e;
    border: 1px solid #272934;
    border-radius: 8px;
    color: #dadbe0;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-align: left;

    transition: transform 0.25s, border-color 0.25s, background 0.25s, color 0.25s;
}

.games-list button:hover {
    background: #1a1b27;
    border-color: #6c63ff;
    color: white;
    transform: translateX(5px);
}

.games-list button span {
    color: #777985;
    font-size: 10px;
}

.games-list button b {
    color: #8c85ff;
    font-size: 15px;
    font-weight: 500;
}

.games-status {
    min-height: 15px;

    color: #6c63ff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 20px;
}

.intro,
.section-small-title,
.section-title p {
    color: #6c63ff;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 4px;

    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(65px, 10vw, 130px);

    line-height: 0.9;

    font-weight: 800;

    letter-spacing: -6px;

    margin-bottom: 25px;
}

.hero h2 {
    font-size: clamp(30px, 5vw, 60px);

    color: #777;

    margin-bottom: 30px;
}

.hero h2 span {
    color: white;
}

.hero-description {
    max-width: 650px;

    color: #999;

    line-height: 1.8;

    font-size: 17px;

    margin-bottom: 40px;
}

.main-button {
    display: inline-block;

    padding: 16px 25px;

    background: white;
    color: black;

    border-radius: 8px;

    text-decoration: none;

    font-weight: 600;

    transition: 0.3s;
}

.main-button:hover {
    transform: translateY(-4px);

    box-shadow: 0 10px 30px rgba(255,255,255,0.15);
}


/* GLOW */

.glow {
    position: absolute;

    width: 600px;
    height: 600px;

    right: -200px;
    top: 150px;

    background: #6c63ff;

    filter: blur(180px);

    opacity: 0.15;

    border-radius: 50%;
}


/* SKILLS */

.skills-section {
    padding: 120px 10%;
}

.section-title {
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: clamp(40px, 6vw, 70px);

    letter-spacing: -3px;
}

.skills-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));

    gap: 20px;
}


/* CARDS */

.skill-card {
    min-height: 300px;

    padding: 35px;

    background: #0f1016;

    border: 1px solid #1d1e26;

    border-radius: 15px;

    cursor: pointer;

    transition:
        transform 0.3s,
        border-color 0.3s,
        background 0.3s;
}

.skill-card:hover {
    transform: translateY(-8px);

    border-color: #6c63ff;

    background: #13141c;
}

.icon {
    font-size: 35px;

    margin-bottom: 35px;
}

.skill-card h3 {
    font-size: 23px;

    margin-bottom: 15px;
}

.skill-card p {
    color: #888;

    line-height: 1.7;

    margin-bottom: 30px;
}

.skill-card span {
    color: #6c63ff;

    font-size: 14px;

    font-weight: 600;
}


/* =========================
   ABOUT — CHI SONO
========================= */

.about-section {
    padding: 120px 10%;
}

.about-box {
    max-width: 1100px;
    margin: 0 auto;

    padding: 80px;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(108, 99, 255, 0.08),
            transparent 35%
        ),
        #101117;

    border: 1px solid #252630;

    border-radius: 18px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.35);
}


/* SINGOLA SEZIONE */

.about-section-block {
    max-width: 800px;

    padding-bottom: 100px;
    margin-bottom: 100px;

    border-bottom: 1px solid #252630;
}


/* NUMERO / ETICHETTA */

.about-label {
    color: #6c63ff !important;

    font-size: 11px !important;

    font-weight: 700;

    letter-spacing: 3px;

    margin-bottom: 25px !important;
}


/* TITOLI */

.about-section-block h2 {
    font-size: clamp(50px, 7vw, 90px);

    line-height: 0.95;

    letter-spacing: -5px;

    margin-bottom: 45px;

    color: white;
}


/* TESTO */

.about-section-block > p:not(.about-label):not(.thanks) {
    color: #92939b;

    font-size: 16px;

    line-height: 1.9;

    margin-bottom: 25px;
}


.about-section-block strong {
    color: white;
}


/* =========================
   MOMENTO IMPORTANTE
========================= */

.highlight-block {
    position: relative;

    padding: 65px;

    background: #14151d;

    border: 1px solid #292b38;

    border-radius: 14px;

    overflow: hidden;
}


/* Luce viola */

.highlight-block::before {
    content: "";

    position: absolute;

    width: 350px;
    height: 350px;

    right: -150px;
    top: -150px;

    background: #6c63ff;

    opacity: 0.10;

    filter: blur(100px);

    border-radius: 50%;

    pointer-events: none;
}


.highlight-block > * {
    position: relative;
    z-index: 1;
}


/* =========================
   FRASE IMPORTANTE
========================= */

.big-statement {
    color: white !important;

    font-size: 28px !important;

    font-weight: 700;

    margin-top: 40px !important;
}


/* =========================
   FINALE
========================= */

.about-final {
    border-bottom: none;

    margin-bottom: 0;

    padding-bottom: 0;
}

.about-final h2 {
    margin-bottom: 35px;
}

.thanks {
    color: white !important;

    font-size: 16px !important;

    font-weight: 600;

    margin-top: 45px !important;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .about-section {
        padding: 80px 6%;
    }

    .about-box {
        padding: 40px 25px;

        border-radius: 14px;
    }

    .about-section-block {
        padding-bottom: 70px;
        margin-bottom: 70px;
    }

    .about-section-block h2 {
        font-size: 50px;

        letter-spacing: -3px;
    }

    .highlight-block {
        padding: 30px 25px;
    }

}

/* CONTATTO E FOOTER */

.contact-cta {
    padding: 140px 10%;
    border-top: 1px solid #191a20;
}


@media (max-width: 1050px) {

    .hero {
        gap: 35px;
    }

    .hero-games {
        flex-basis: 330px;
        padding: 27px;
    }

}


@media (max-width: 900px) {

    .maze-game-shell {
        grid-template-columns: 1fr;
    }

    .maze-board-wrap {
        min-height: auto;
    }

}

.contact-cta p {
    color: #6c63ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.contact-cta a {
    display: inline-block;

    color: white;
    font-size: clamp(52px, 10vw, 145px);
    font-weight: 800;
    line-height: 0.88;
    letter-spacing: -7px;
    text-decoration: none;

    transition: color 0.3s, transform 0.3s;
}

.contact-cta a:hover {
    color: #8c85ff;
    transform: translateX(10px);
}

.contact-cta span {
    font-size: 0.55em;
    vertical-align: top;
}

footer {
    padding: 80px 10% 35px;

    color: #92939b;
    font-size: 14px;

    border-top: 1px solid #191a20;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(460px, 1.45fr);
    gap: 80px;

    padding-bottom: 80px;
}

.footer-name,
.footer-links h3 {
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}

.footer-name {
    margin-bottom: 20px;
}

.footer-tagline {
    color: white;
    font-size: 19px;
    line-height: 1.5;
    margin-bottom: 28px;
}

.footer-statement {
    line-height: 1.8;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.footer-links h3 {
    color: #6c63ff;
    font-size: 11px;
    margin-bottom: 22px;
}

.footer-links div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.footer-links a,
.footer-links span {
    color: #92939b;
    line-height: 1.4;
    text-decoration: none;

    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-location {
    padding: 25px 0;

    color: #c1c2c8;

    border-top: 1px solid #252630;
    border-bottom: 1px solid #252630;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    padding-top: 30px;

    color: #5e606a;
    font-size: 12px;
}


/* PAGINE DELLE COMPETENZE */

.detail-page {
    min-height: 100vh;

    display: flex;
    align-items: center;

    padding: 160px 10% 100px;

    position: relative;
    overflow: hidden;
}

.detail-page::before {
    content: "";

    position: absolute;
    width: 620px;
    height: 620px;

    right: -240px;
    top: 70px;

    background: #6c63ff;
    filter: blur(190px);
    opacity: 0.14;
    border-radius: 50%;

    pointer-events: none;
}

.detail-content {
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 50px;

    color: #aaa;
    text-decoration: none;
    font-size: 14px;

    transition: color 0.3s, transform 0.3s;
}

.back-link:hover {
    color: white;
    transform: translateX(-4px);
}

.detail-icon {
    font-size: 52px;
    margin-bottom: 28px;
}

.detail-page h1 {
    max-width: 900px;

    font-size: clamp(54px, 9vw, 120px);
    line-height: 0.92;
    letter-spacing: -6px;
}


/* THE MAZE: ESCAPE PROTOCOL */

.maze-page {
    min-height: 100vh;

    padding: 140px 10% 90px;

    position: relative;
    overflow: hidden;
}

.maze-page::before {
    content: "";

    position: absolute;
    width: 760px;
    height: 760px;

    left: -360px;
    bottom: -330px;

    background: #6c63ff;
    border-radius: 50%;
    filter: blur(200px);
    opacity: 0.14;

    pointer-events: none;
}

.maze-header {
    max-width: 1200px;
    margin: 0 auto 45px;

    position: relative;
    z-index: 1;
}

.maze-header .back-link {
    margin-bottom: 35px;
}

.maze-kicker {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.maze-header h1 {
    color: white;
    font-size: clamp(44px, 6vw, 78px);
    line-height: 0.9;
    letter-spacing: -5px;
}

.maze-header h1 span {
    color: #777985;
}

.maze-header > p:last-child {
    max-width: 560px;

    color: #9799a4;
    line-height: 1.7;
    margin-top: 22px;
}

.maze-game-shell {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 25px;

    position: relative;
    z-index: 1;
}

.maze-board-wrap,
.maze-panel {
    background: rgba(15, 16, 22, 0.86);
    border: 1px solid #282a35;
    border-radius: 15px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
}

.maze-board-wrap {
    min-height: 520px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 22px;
    overflow: hidden;
}

#maze-canvas {
    width: min(100%, 700px);
    height: auto;

    display: block;

    border: 1px solid #252735;
    border-radius: 8px;
    background: #0a0b11;
}

.maze-panel {
    padding: 28px;
}

.maze-panel-title {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 26px;
}

.maze-stat {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    padding: 15px 0;

    border-top: 1px solid #252630;
}

.maze-stat:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.maze-stat span {
    color: #7d7f8a;
    font-size: 12px;
}

.maze-stat strong {
    color: white;
    font-size: 14px;
}

.maze-objective {
    color: #a7a9b2;
    font-size: 13px;
    line-height: 1.7;
    margin: 28px 0;
}

.maze-restart {
    width: 100%;

    padding: 14px 18px;

    background: #6c63ff;
    border: 0;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    transition: transform 0.25s, background 0.25s;
}

.maze-restart:hover {
    background: #7b74ff;
    transform: translateY(-3px);
}

.maze-restart:disabled {
    background: #2a2b35;
    color: #757783;
    cursor: not-allowed;
    transform: none;
}

.maze-volume {
    padding: 15px 0 18px;

    border-bottom: 1px solid #252630;
}

.maze-volume label {
    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #7d7f8a;
    font-size: 12px;
    margin-bottom: 12px;
}

.maze-volume label span {
    color: #c3c2ff;
    font-weight: 700;
}

.maze-volume input {
    width: 100%;
    accent-color: #6c63ff;
    cursor: pointer;
}

.maze-controls {
    color: #71737e;
    font-size: 11px;
    line-height: 1.6;
    margin-top: 18px;
    text-align: center;
}

.maze-message {
    min-height: 42px;

    color: #aeadff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 23px;
    text-align: center;
}

.leave-game-modal,
.game-over-modal {
    display: none;
    align-items: center;
    justify-content: center;

    position: fixed;
    inset: 0;

    padding: 24px;

    background: rgba(4, 5, 9, 0.76);
    z-index: 2000;
}

.leave-game-modal.is-visible,
.game-over-modal.is-visible {
    display: flex;
}

.leave-game-dialog {
    width: min(100%, 460px);

    padding: 35px;

    background: #12131b;
    border: 1px solid #303241;
    border-radius: 15px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.leave-game-dialog > p {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 17px;
}

.leave-game-dialog h2 {
    color: white;
    font-size: 32px;
    letter-spacing: -2px;
    margin-bottom: 14px;
}

.leave-game-dialog > span {
    color: #999ba5;
    display: block;
    font-size: 14px;
    line-height: 1.7;
}

.leave-game-actions {
    display: flex;
    gap: 11px;

    margin-top: 28px;
}

.leave-game-actions button {
    flex: 1;

    padding: 13px 10px;

    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;

    transition: transform 0.25s, background 0.25s;
}

.leave-game-actions button:hover {
    transform: translateY(-2px);
}

.leave-game-cancel {
    background: transparent;
    border: 1px solid #414351;
    color: #d6d7dd;
}

.leave-game-confirm {
    background: #6c63ff;
    border: 1px solid #6c63ff;
    color: white;
}

.game-over-modal {
    z-index: 2100;
}

.game-over-dialog {
    width: min(100%, 560px);

    padding: 35px;

    background: #12131b;
    border: 1px solid #303241;
    border-radius: 15px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.game-over-dialog > p {
    color: #ff8f8f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 17px;
}

.game-over-dialog h2 {
    color: white;
    font-size: 36px;
    letter-spacing: -2px;
    margin-bottom: 14px;
}

.game-over-dialog > span {
    color: #999ba5;
    display: block;
    font-size: 14px;
    line-height: 1.7;
}

.game-over-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;

    margin: 26px 0;
}

.game-over-stats div {
    padding: 15px;

    background: #191a23;
    border: 1px solid #292b38;
    border-radius: 8px;
}

.game-over-stats span,
.game-over-stats strong {
    display: block;
}

.game-over-stats span {
    color: #81838e;
    font-size: 10px;
    margin-bottom: 7px;
}

.game-over-stats strong {
    color: white;
    font-size: 16px;
}

.game-over-actions {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 11px;
}

.game-over-actions button {
    padding: 13px 10px;

    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;

    transition: transform 0.25s, background 0.25s;
}

.game-over-actions button:hover {
    transform: translateY(-2px);
}

.game-over-menu {
    background: transparent;
    border: 1px solid #414351;
    color: #d6d7dd;
}

.game-over-checkpoint {
    background: #6c63ff;
    border: 1px solid #6c63ff;
    color: white;
}

.game-over-reset {
    grid-column: 1 / -1;

    background: #2b2c36;
    border: 1px solid #3d3f4d;
    color: #d6d7dd;
}


/* BUG BUSTER */

.bug-page {
    min-height: 100vh;

    padding: 140px 10% 90px;

    position: relative;
    overflow: hidden;
}

.bug-page::before {
    content: "";

    position: absolute;
    width: 720px;
    height: 720px;

    right: -330px;
    bottom: -310px;

    background: #6c63ff;
    border-radius: 50%;
    filter: blur(200px);
    opacity: 0.13;

    pointer-events: none;
}

.bug-header {
    max-width: 1200px;
    margin: 0 auto 45px;

    position: relative;
    z-index: 1;
}

.bug-header .back-link {
    margin-bottom: 35px;
}

.bug-kicker {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.bug-header h1 {
    color: white;
    font-size: clamp(44px, 6vw, 78px);
    line-height: 0.9;
    letter-spacing: -5px;
}

.bug-header h1 span {
    color: #777985;
}

.bug-header > p:last-child {
    max-width: 600px;

    color: #9799a4;
    line-height: 1.7;
    margin-top: 22px;
}

.bug-game-shell {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 25px;

    position: relative;
    z-index: 1;
}

.code-terminal,
.bug-panel {
    background: rgba(15, 16, 22, 0.88);
    border: 1px solid #282a35;
    border-radius: 15px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
}

.code-terminal {
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 16px 20px;

    border-bottom: 1px solid #252630;
}

.terminal-dot {
    width: 9px;
    height: 9px;

    background: #555865;
    border-radius: 50%;
}

.terminal-dot:first-child {
    background: #ff7777;
}

.terminal-dot:nth-child(2) {
    background: #f5bc62;
}

.terminal-dot:nth-child(3) {
    background: #72cf96;
}

.terminal-file {
    color: #777985;
    font-family: monospace;
    font-size: 11px;
    margin-left: 8px;
}

.code-viewport {
    height: 440px;

    position: relative;
    overflow: hidden;
}

.code-stream {
    min-height: 100%;

    padding: 17px 0;

    color: #c9cad2;
    font-family: "Courier New", monospace;
    font-size: clamp(11px, 1.2vw, 14px);
    line-height: 34px;

    transform: translateY(0);
    transition: transform 0.4s ease;
    will-change: transform;
}

.code-line {
    height: 34px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    gap: 14px;

    white-space: pre;
}

.line-number {
    width: 25px;

    color: #535663;
    flex: 0 0 auto;
    font-size: 11px;
    text-align: right;
    user-select: none;
}

.line-code {
    min-width: 0;
}

.code-red,
.code-bug,
.code-green {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    position: relative;

    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.code-red {
    min-height: 30px;
    padding: 2px 8px;

    background: rgba(255, 87, 87, 0.12);
    color: #ff8585;
    text-decoration: underline wavy rgba(255, 133, 133, 0.8);
    text-underline-offset: 3px;
}

.code-red:hover {
    background: rgba(255, 87, 87, 0.25);
}

.code-green {
    min-height: 30px;
    padding: 2px 9px;

    background: rgba(93, 216, 139, 0.13);
    border: 1px solid rgba(93, 216, 139, 0.65);
    color: #82e8aa;
    font-size: 12px;
    font-weight: 700;
}

.code-green:hover {
    background: rgba(93, 216, 139, 0.26);
}

.code-bug {
    width: 34px;
    height: 34px;

    background: #2a2633;
    border: 1px solid #ff8799;
    color: #ff9bac;
    font-size: 17px;
    vertical-align: middle;
}

.code-bug::after {
    content: "";

    position: absolute;
    inset: -3px;

    border: 2px solid transparent;
    border-top-color: #ff9bac;
    border-radius: 50%;

    opacity: 0;
}

.code-bug.damaged::after {
    border-color: #ff9bac;
    opacity: 1;
}

.code-bug.damaged {
    background: #543044;
    transform: scale(1.08);
}

.code-red.resolved,
.code-bug.resolved,
.code-green.resolved {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
    transition: opacity 0.2s, transform 0.2s;
}

.code-viewport.mistake {
    animation: terminal-shake 0.25s linear;
}

.terminal-hint {
    padding: 15px 20px;

    color: #777985;
    border-top: 1px solid #252630;
    font-size: 11px;
    line-height: 1.6;
}

.bug-panel {
    padding: 28px;
}

.bug-panel-title {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 26px;
}

.bug-stat {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    padding: 14px 0;

    border-top: 1px solid #252630;
}

.bug-stat:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.bug-stat span {
    color: #7d7f8a;
    font-size: 12px;
}

.bug-stat strong {
    color: white;
    font-size: 14px;
}

.bug-status {
    min-height: 42px;

    color: #aeadff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 28px;
    text-align: center;
}

.bug-restart {
    width: 100%;

    padding: 14px 18px;

    background: #6c63ff;
    border: 0;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    margin-top: 20px;

    transition: transform 0.25s, background 0.25s;
}

.bug-restart:hover {
    background: #7b74ff;
    transform: translateY(-3px);
}

.bug-over-modal {
    display: none;
    align-items: center;
    justify-content: center;

    position: fixed;
    inset: 0;

    padding: 24px;

    background: rgba(4, 5, 9, 0.76);
    z-index: 2100;
}

.bug-over-modal.is-visible {
    display: flex;
}

.bug-over-dialog {
    width: min(100%, 530px);

    padding: 35px;

    background: #12131b;
    border: 1px solid #303241;
    border-radius: 15px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.bug-over-dialog > p {
    color: #ff8f8f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 17px;
}

.bug-over-dialog h2 {
    color: white;
    font-size: 36px;
    letter-spacing: -2px;
    margin-bottom: 14px;
}

.bug-over-dialog > span {
    color: #999ba5;
    display: block;
    font-size: 14px;
    line-height: 1.7;
}

.bug-over-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;

    margin: 26px 0;
}

.bug-over-stats div {
    padding: 15px;

    background: #191a23;
    border: 1px solid #292b38;
    border-radius: 8px;
}

.bug-over-stats span,
.bug-over-stats strong {
    display: block;
}

.bug-over-stats span {
    color: #81838e;
    font-size: 10px;
    margin-bottom: 7px;
}

.bug-over-stats strong {
    color: white;
    font-size: 16px;
}

.bug-over-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
}

.bug-over-actions button {
    padding: 14px 10px;

    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;

    transition: transform 0.25s, background 0.25s;
}

.bug-over-actions button:hover {
    transform: translateY(-2px);
}

.bug-over-home {
    background: transparent;
    border: 1px solid #414351;
    color: #d6d7dd;
}

.bug-over-restart {
    background: #6c63ff;
    border: 1px solid #6c63ff;
    color: white;
}


/* PIANO PULSE */

.pulse-page {
    min-height: 100vh;

    padding: 140px 10% 90px;

    position: relative;
    overflow: hidden;
}

.pulse-page::before {
    content: "";

    position: absolute;
    width: 740px;
    height: 740px;

    left: -350px;
    top: 220px;

    background: #6c63ff;
    border-radius: 50%;
    filter: blur(200px);
    opacity: 0.13;

    pointer-events: none;
}

.pulse-header {
    max-width: 1200px;
    margin: 0 auto 45px;

    position: relative;
    z-index: 1;
}

.pulse-header .back-link {
    margin-bottom: 35px;
}

.pulse-kicker {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.pulse-header h1 {
    color: white;
    font-size: clamp(44px, 6vw, 78px);
    line-height: 0.9;
    letter-spacing: -5px;
}

.pulse-header h1 span {
    color: #777985;
}

.pulse-header > p:last-child {
    max-width: 620px;

    color: #9799a4;
    line-height: 1.7;
    margin-top: 22px;
}

.pulse-game-shell {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 25px;

    position: relative;
    z-index: 1;
}

.pulse-board,
.pulse-panel {
    background: rgba(15, 16, 22, 0.88);
    border: 1px solid #282a35;
    border-radius: 15px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
}

.pulse-board {
    min-height: 530px;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.pulse-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 20px;

    border-bottom: 1px solid #252630;
}

.pulse-topbar span {
    color: #777985;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.pulse-feedback {
    color: #aeadff !important;
    letter-spacing: 1px !important;
}

.pulse-playfield {
    min-height: 410px;
    flex: 1;

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    position: relative;
    overflow: hidden;
}

.pulse-lane {
    position: relative;

    border-right: 1px solid #252630;
    background: linear-gradient(180deg, rgba(108, 99, 255, 0.03), transparent 55%);
}

.pulse-lane:last-child {
    border-right: 0;
}

.pulse-target {
    height: 52px;

    position: absolute;
    right: 8px;
    bottom: 16px;
    left: 8px;

    background: rgba(108, 99, 255, 0.15);
    border: 1px solid #7670ff;
    border-radius: 8px;
    box-shadow: 0 0 22px rgba(108, 99, 255, 0.17);
}

.pulse-note {
    height: 34px;

    position: absolute;
    right: 10px;
    left: 10px;

    background: linear-gradient(135deg, #b5b2ff, #6c63ff);
    border-radius: 8px;
    box-shadow: 0 7px 20px rgba(108, 99, 255, 0.36);
}

.pulse-note.life {
    background: linear-gradient(135deg, #56e58a, #19ad61);
    box-shadow: 0 7px 20px rgba(47, 211, 112, 0.34);
}

.pulse-note.danger {
    background: linear-gradient(135deg, #ff6a78, #df2843);
    box-shadow: 0 7px 20px rgba(242, 53, 78, 0.36);
}

.pulse-note.hit {
    opacity: 0;
    transform: scale(1.35);
    transition: opacity 0.18s, transform 0.18s;
}

.pulse-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;

    padding: 14px;

    border-top: 1px solid #252630;
}

.pulse-key {
    min-height: 54px;

    background: #191a23;
    border: 1px solid #383a48;
    border-radius: 8px;
    color: #e6e6eb;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;

    transition: transform 0.12s, background 0.12s, border-color 0.12s;
}

.pulse-key.active {
    background: #6c63ff;
    border-color: #bbb8ff;
    transform: translateY(3px);
}

.pulse-panel {
    padding: 28px;
}

.pulse-panel-title {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 26px;
}

.pulse-stat {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    padding: 14px 0;

    border-top: 1px solid #252630;
}

.pulse-stat:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.pulse-stat span {
    color: #7d7f8a;
    font-size: 12px;
}

.pulse-stat strong {
    color: white;
    font-size: 14px;
}

.pulse-start {
    width: 100%;

    padding: 14px 18px;

    background: #6c63ff;
    border: 0;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    margin-top: 22px;

    transition: transform 0.25s, background 0.25s;
}

.pulse-start:hover {
    background: #7b74ff;
    transform: translateY(-3px);
}

.pulse-help {
    color: #777985;
    font-size: 11px;
    line-height: 1.6;
    margin-top: 16px;
    text-align: center;
}

.pulse-over-modal {
    display: none;
    align-items: center;
    justify-content: center;

    position: fixed;
    inset: 0;

    padding: 24px;

    background: rgba(4, 5, 9, 0.76);
    z-index: 2100;
}

.pulse-over-modal.is-visible {
    display: flex;
}

.pulse-over-dialog {
    width: min(100%, 520px);

    padding: 35px;

    background: #12131b;
    border: 1px solid #303241;
    border-radius: 15px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.pulse-over-dialog > p {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 17px;
}

.pulse-over-dialog h2 {
    color: white;
    font-size: 36px;
    letter-spacing: -2px;
    margin-bottom: 14px;
}

.pulse-over-dialog > span {
    color: #999ba5;
    display: block;
    font-size: 14px;
    line-height: 1.7;
}

.pulse-over-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;

    margin: 26px 0;
}

.pulse-over-stats div {
    padding: 15px;

    background: #191a23;
    border: 1px solid #292b38;
    border-radius: 8px;
}

.pulse-over-stats span,
.pulse-over-stats strong {
    display: block;
}

.pulse-over-stats span {
    color: #81838e;
    font-size: 10px;
    margin-bottom: 7px;
}

.pulse-over-stats strong {
    color: white;
    font-size: 16px;
}

.pulse-over-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
}

.pulse-over-actions button {
    padding: 14px 10px;

    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;

    transition: transform 0.25s, background 0.25s;
}

.pulse-over-actions button:hover {
    transform: translateY(-2px);
}

.pulse-over-home {
    background: transparent;
    border: 1px solid #414351;
    color: #d6d7dd;
}

.pulse-over-restart {
    background: #6c63ff;
    border: 1px solid #6c63ff;
    color: white;
}

@keyframes terminal-shake {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-6px); }
    70% { transform: translateX(6px); }
}

@media (max-width: 900px) {

    .bug-game-shell {
        grid-template-columns: 1fr;
    }

    .pulse-game-shell {
        grid-template-columns: 1fr;
    }

}


/* MOBILE */

@media (max-width: 700px) {

    .navbar {
        padding: 0 6%;
    }

    .nav-links {
        display: none;
    }

    .hero {
        min-height: auto;

        flex-direction: column;
        align-items: flex-start;

        padding-left: 7%;
        padding-right: 7%;
    }

    .hero-games {
        width: 100%;
        flex-basis: auto;
        padding: 25px;
    }

    .detail-page {
        padding: 135px 7% 80px;
    }

    .detail-page h1 {
        letter-spacing: -4px;
    }

    .maze-page {
        padding: 125px 7% 65px;
    }

    .maze-header h1 {
        letter-spacing: -3px;
    }

    .maze-board-wrap {
        padding: 12px;
    }

    .maze-panel {
        padding: 24px;
    }

    .bug-page {
        padding: 125px 7% 65px;
    }

    .bug-header h1 {
        letter-spacing: -3px;
    }

    .code-viewport {
        height: 370px;
    }

    .code-line {
        gap: 9px;
        padding: 0 12px;
    }

    .bug-panel {
        padding: 24px;
    }

    .bug-over-dialog {
        padding: 27px 22px;
    }

    .bug-over-stats,
    .bug-over-actions {
        grid-template-columns: 1fr;
    }

    .pulse-page {
        padding: 125px 7% 65px;
    }

    .pulse-header h1 {
        letter-spacing: -3px;
    }

    .pulse-board {
        min-height: 480px;
    }

    .pulse-playfield {
        min-height: 350px;
    }

    .pulse-panel {
        padding: 24px;
    }

    .pulse-over-dialog {
        padding: 27px 22px;
    }

    .pulse-over-stats,
    .pulse-over-actions {
        grid-template-columns: 1fr;
    }

    .game-over-dialog {
        padding: 27px 22px;
    }

    .game-over-stats {
        grid-template-columns: 1fr;
    }

    .game-over-actions {
        grid-template-columns: 1fr;
    }

    .game-over-reset {
        grid-column: auto;
    }

    .hero h1 {
        letter-spacing: -4px;
    }

    .skills-section,
    .about-section {
        padding-left: 7%;
        padding-right: 7%;
    }

    .contact-cta {
        padding: 100px 7%;
    }

    .contact-cta a {
        letter-spacing: -4px;
    }

    footer {
        padding: 60px 7% 30px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 55px;

        padding-bottom: 55px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }

    .skill-card {
        min-height: auto;
    }
}


/* =========================
   NICOON // CREATIVE LAB
========================= */

.creative-lab {
    background:
        radial-gradient(circle at 12% 8%, rgba(108, 99, 255, 0.13), transparent 24%),
        radial-gradient(circle at 88% 24%, rgba(42, 105, 255, 0.10), transparent 22%),
        #08090d;
}

.boot-screen {
    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    inset: 0;

    background: #08090d;
    z-index: 5000;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.creative-lab.boot-complete .boot-screen {
    opacity: 0;
    visibility: hidden;
}

.boot-screen-content {
    width: min(430px, 82vw);
    text-align: center;
}

.boot-screen-content p,
.boot-screen-content strong {
    display: block;
    color: #aaa8ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
}

.boot-screen-content strong {
    color: #777985;
    font-size: 9px;
    margin-top: 16px;
}

.boot-loader {
    height: 2px;
    margin: 26px 0 0;
    overflow: hidden;
    background: #292b36;
}

.boot-loader span {
    display: block;
    width: 45%;
    height: 100%;
    background: #8079ff;
    box-shadow: 0 0 18px #8079ff;
    animation: lab-loader 1.1s ease-in-out infinite alternate;
}

.boot-screen-content button {
    margin-top: 38px;
    padding: 9px 0;

    background: transparent;
    border: 0;
    color: #8b8d98;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.boot-screen-content button:hover {
    color: white;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 1500;
}

.scroll-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #6c63ff, #b6b2ff, #5de4f0);
    box-shadow: 0 0 14px rgba(132, 126, 255, 0.9);
}

.cursor-glow {
    position: fixed;
    width: 280px;
    height: 280px;
    left: 0;
    top: 0;

    background: radial-gradient(circle, rgba(108, 99, 255, 0.11), transparent 67%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: opacity 0.25s ease;
}

.creative-lab .navbar {
    height: 76px;
    background: rgba(8, 9, 13, 0.55);
    border-bottom-color: rgba(175, 172, 255, 0.10);
}

.creative-lab .logo {
    position: relative;
}

.creative-lab .logo::before {
    content: "CREATIVE LAB";
    position: absolute;
    left: 100%;
    bottom: 2px;
    width: max-content;
    margin-left: 11px;
    color: #777985;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.8px;
}

.creative-lab .nav-links {
    gap: 28px;
}

.creative-lab .nav-links a {
    color: #8f919d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.creative-lab .nav-links a:hover {
    color: #b9b6ff;
}

.creative-lab .hero {
    isolation: isolate;
    min-height: 100svh;
    gap: clamp(35px, 6vw, 100px);
    overflow: hidden;
    padding-top: 145px;
    padding-bottom: 95px;
}

.creative-lab .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.42;
    background-image:
        linear-gradient(rgba(151, 149, 255, 0.065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(151, 149, 255, 0.065) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black 10%, transparent 92%);
}

.creative-lab .hero::after {
    content: "NICOON // 2026";
    position: absolute;
    right: -8px;
    bottom: 21px;
    color: rgba(255, 255, 255, 0.10);
    font-size: clamp(38px, 7vw, 115px);
    font-weight: 800;
    letter-spacing: -6px;
    line-height: 0.8;
    pointer-events: none;
    z-index: -1;
}

.creative-lab .hero-content {
    max-width: 780px;
}

.hero-system-line {
    display: flex;
    justify-content: space-between;
    gap: 26px;
    max-width: 620px;
    margin-bottom: 39px;
    color: #868892;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.9px;
}

.system-online {
    color: #9a97ff;
}

.system-online i {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 7px;
    background: #65eb9d;
    border-radius: 50%;
    box-shadow: 0 0 12px #65eb9d;
}

.creative-lab .intro {
    color: #a4a0ff;
    font-size: 11px;
    margin-bottom: 12px;
}

.creative-lab .hero h1 {
    color: #fff;
    font-size: clamp(78px, 13.2vw, 178px);
    letter-spacing: -10px;
    line-height: 0.76;
    margin-bottom: 37px;
    text-shadow: 0 0 75px rgba(123, 116, 255, 0.17);
}

.creative-lab .hero h1 span {
    color: transparent;
    -webkit-text-stroke: 1.5px #9a96ff;
    text-shadow: none;
}

.creative-lab .hero h2 {
    color: #71737d;
    font-size: clamp(29px, 4.2vw, 58px);
    font-weight: 700;
    letter-spacing: -3px;
    margin-bottom: 27px;
}

.creative-lab .hero h2 span {
    color: #fff;
}

.creative-lab .hero-description {
    max-width: 540px;
    color: #a5a6af;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 34px;
}

.creative-lab .main-button {
    padding: 17px 21px;
    background: #f4f4f6;
    border: 1px solid white;
    border-radius: 0;
    box-shadow: 7px 7px 0 #6c63ff;
    color: #101116;
    font-size: 12px;
    letter-spacing: 0.7px;
}

.creative-lab .main-button span {
    padding-left: 17px;
    font-size: 17px;
}

.creative-lab .main-button:hover {
    box-shadow: 3px 3px 0 #6c63ff;
    transform: translate(4px, 4px);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 43px;
}

.hero-tags span {
    padding: 7px 9px;
    border: 1px solid #30323d;
    color: #858792;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.creative-lab .hero-games {
    overflow: hidden;
    padding: 28px;
    background: linear-gradient(145deg, rgba(25, 25, 39, 0.91), rgba(10, 11, 17, 0.95));
    border-color: rgba(152, 147, 255, 0.42);
    border-radius: 0;
    box-shadow: 18px 18px 0 rgba(80, 75, 185, 0.14), 0 25px 70px rgba(0, 0, 0, 0.31);
}

.creative-lab .hero-games::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    top: -158px;
    right: -103px;
    border: 1px solid rgba(167, 163, 255, 0.43);
    border-radius: 50%;
}

.arcade-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.arcade-header > span {
    color: #65eb9d;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

.creative-lab .games-label {
    color: #aaa7ff;
    margin-bottom: 17px;
}

.creative-lab .hero .hero-games h2 {
    position: relative;
    z-index: 1;
    font-size: 38px;
    letter-spacing: -3px;
    margin-bottom: 13px;
}

.creative-lab .hero .hero-games h2 em {
    color: #9e9aa8;
    font-style: normal;
}

.creative-lab .games-description {
    position: relative;
    z-index: 1;
}

.creative-lab .games-list button {
    position: relative;
    z-index: 1;
    padding: 13px 11px;
    background: rgba(18, 19, 28, 0.82);
    border-radius: 0;
}

.creative-lab .games-list button:hover {
    background: #6c63ff;
    border-color: #b8b5ff;
    transform: translateX(6px);
}

.creative-lab .games-list button:hover span,
.creative-lab .games-list button:hover b {
    color: white;
}

.creative-lab .games-status {
    position: relative;
    z-index: 1;
    color: #7774ed;
}

.creative-lab .glow {
    opacity: 0.26;
}

.creative-lab .hero-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.hero-orbit {
    position: absolute;
    border: 1px solid rgba(148, 144, 255, 0.22);
    border-radius: 50%;
}

.orbit-one {
    width: 550px;
    height: 550px;
    right: -270px;
    top: 68px;
    animation: orbit-spin 22s linear infinite;
}

.orbit-two {
    width: 350px;
    height: 350px;
    right: -170px;
    top: 166px;
    border-style: dashed;
    animation: orbit-spin 16s linear infinite reverse;
}

.hero-coordinate {
    position: absolute;
    right: 37px;
    bottom: 60px;
    color: rgba(202, 200, 255, 0.42);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.7px;
    line-height: 1.7;
    text-align: right;
}

.creative-lab .skills-section {
    position: relative;
    padding-top: 150px;
    padding-bottom: 150px;
}

.creative-lab .section-title {
    max-width: 900px;
    margin-bottom: 58px;
}

.creative-lab .section-title h2 {
    font-size: clamp(46px, 7.5vw, 100px);
    letter-spacing: -6px;
    line-height: 0.88;
}

.creative-lab .section-title h2 span {
    color: #777985;
}

.creative-lab .skills-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 13px;
}

.creative-lab .skill-card {
    position: relative;
    min-height: 290px;
    overflow: hidden;
    padding: 30px;
    background: linear-gradient(145deg, #11121a, #0b0c11);
    border-radius: 0;
}

.creative-lab .skill-card::before {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    top: -92px;
    right: -88px;
    border: 1px solid var(--world-color, #6c63ff);
    border-radius: 50%;
    opacity: 0.58;
    transition: transform 0.45s ease;
}

.creative-lab .skill-card:hover::before {
    transform: scale(2.35);
}

.creative-lab .skill-card > * {
    position: relative;
    z-index: 1;
}

.creative-lab .skill-card:hover {
    background: #151622;
    border-color: var(--world-color, #6c63ff);
    transform: translateY(-8px);
}

.creative-lab .skill-card:nth-child(1),
.creative-lab .skill-card:nth-child(4) {
    grid-column: span 7;
}

.creative-lab .skill-card:nth-child(2),
.creative-lab .skill-card:nth-child(3),
.creative-lab .skill-card:nth-child(5),
.creative-lab .skill-card:nth-child(6) {
    grid-column: span 5;
}

.world-game { --world-color: #8079ff; }
.world-edit { --world-color: #ff7196; }
.world-film { --world-color: #ffa85b; }
.world-content { --world-color: #ea5cff; }
.world-music { --world-color: #58e6c2; }
.world-tech { --world-color: #5faeff; }

.skill-index {
    display: block;
    color: var(--world-color, #aaa7ff);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.9px;
    margin-bottom: 29px;
}

.creative-lab .icon {
    font-size: 30px;
    margin-bottom: 25px;
}

.creative-lab .skill-card h3 {
    font-size: 27px;
    letter-spacing: -1.2px;
}

.creative-lab .skill-card span:not(.skill-index) {
    color: var(--world-color, #aaa7ff);
}

.creative-lab .about-section {
    position: relative;
    padding-top: 60px;
}

.creative-lab .about-box {
    border-radius: 0;
    border-left: 2px solid #7a74ef;
}

.creative-lab .contact-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(110deg, rgba(86, 80, 211, 0.16), transparent 50%);
}

.creative-lab .contact-cta::after {
    content: "LET'S BUILD";
    position: absolute;
    right: -18px;
    bottom: -30px;
    color: rgba(255, 255, 255, 0.035);
    font-size: clamp(70px, 14vw, 220px);
    font-weight: 800;
    letter-spacing: -12px;
    pointer-events: none;
}

.creative-lab .footer-name::after {
    content: " // NICOON.EU";
    color: #7773ec;
    font-size: 9px;
}

.creative-lab .skill-card,
.creative-lab .about-box,
.creative-lab .contact-cta,
.creative-lab footer {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.creative-lab .is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes lab-loader {
    from { transform: translateX(-20%); }
    to { transform: translateX(165%); }
}

@keyframes orbit-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1050px) {
    .creative-lab .hero {
        align-items: center;
    }

    .creative-lab .hero-games {
        flex-basis: 350px;
    }
}

@media (max-width: 900px) {
    .creative-lab .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .creative-lab .hero-content,
    .creative-lab .hero-games {
        width: 100%;
        max-width: 680px;
    }

    .creative-lab .hero-games {
        flex-basis: auto;
    }

    .creative-lab .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .creative-lab .skill-card:nth-child(n) {
        grid-column: span 1;
    }
}

@media (max-width: 700px) {
    .cursor-glow,
    .hero-decoration {
        display: none;
    }

    .creative-lab .navbar {
        height: 68px;
    }

    .creative-lab .logo::before {
        display: none;
    }

    .creative-lab .hero {
        min-height: auto;
        padding-top: 124px;
    }

    .hero-system-line {
        margin-bottom: 31px;
        font-size: 8px;
    }

    .creative-lab .hero h1 {
        font-size: clamp(67px, 22vw, 120px);
        letter-spacing: -7px;
    }

    .creative-lab .hero h2 {
        letter-spacing: -2px;
    }

    .creative-lab .hero::after {
        font-size: 54px;
        letter-spacing: -4px;
    }

    .creative-lab .skills-section {
        padding-top: 105px;
        padding-bottom: 105px;
    }

    .creative-lab .section-title h2 {
        letter-spacing: -3px;
    }

    .creative-lab .skills-grid {
        grid-template-columns: 1fr;
    }

    .creative-lab .skill-card:nth-child(n) {
        grid-column: span 1;
    }

    .creative-lab .skill-card {
        min-height: 250px;
    }
}


/* FOCUS LOCK */

.focus-page {
    min-height: 100vh;
    padding: 140px 10% 90px;
    position: relative;
    overflow: hidden;
}

.focus-page::before {
    content: "";
    position: absolute;
    width: 720px;
    height: 720px;
    right: -330px;
    bottom: -310px;
    background: #6c63ff;
    border-radius: 50%;
    filter: blur(200px);
    opacity: 0.13;
    pointer-events: none;
}

.focus-header {
    max-width: 1200px;
    margin: 0 auto 45px;
    position: relative;
    z-index: 1;
}

.focus-header .back-link {
    margin-bottom: 35px;
}

.focus-kicker {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.focus-header h1 {
    color: white;
    font-size: clamp(44px, 6vw, 78px);
    line-height: 0.9;
    letter-spacing: -5px;
}

.focus-header h1 span {
    color: #777985;
}

.focus-header > p:last-child {
    max-width: 600px;
    color: #9799a4;
    line-height: 1.7;
    margin-top: 22px;
}

.focus-game-shell {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.focus-monitor,
.focus-panel {
    background: rgba(15, 16, 22, 0.88);
    border: 1px solid #282a35;
    border-radius: 15px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
}

.focus-monitor {
    min-height: 510px;
    overflow: hidden;
    position: relative;
}

.focus-monitor.mistake {
    animation: focus-shake 0.28s linear;
}

@keyframes focus-shake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    20% { transform: translate3d(-8px, 2px, 0); }
    45% { transform: translate3d(7px, -2px, 0); }
    70% { transform: translate3d(-5px, 1px, 0); }
}

#focus-canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 510px;
    cursor: none;
}

.focus-corner {
    position: absolute;
    z-index: 2;
    color: rgba(255, 255, 255, 0.72);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    pointer-events: none;
}

.focus-corner-top {
    top: 20px;
    right: 23px;
}

.focus-corner-top i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 6px;
    background: #ff576d;
    border-radius: 50%;
    box-shadow: 0 0 11px #ff576d;
}

.focus-corner-bottom {
    left: 23px;
    bottom: 20px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 9px;
}

.focus-progress-wrap {
    position: absolute;
    right: 23px;
    bottom: 20px;
    width: 170px;
    height: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15);
}

.focus-progress-wrap span {
    display: block;
    width: 0;
    height: 100%;
    background: #69f5b0;
    box-shadow: 0 0 12px #69f5b0;
    transition: width 0.08s linear;
}

.focus-panel {
    padding: 28px;
}

.focus-panel-title {
    color: #6c63ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 26px;
}

.focus-stat {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #252630;
}

.focus-stat:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.focus-stat span {
    color: #7d7f8a;
    font-size: 12px;
}

.focus-stat strong {
    color: white;
    font-size: 14px;
}

.focus-status {
    min-height: 35px;
    color: #aaa7ff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.1px;
    line-height: 1.5;
    margin: 22px 0 14px;
    text-align: center;
}

.focus-start {
    width: 100%;
    padding: 14px 18px;
    background: #6c63ff;
    border: 0;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: transform 0.25s, background 0.25s;
}

.focus-start:hover {
    background: #7b74ff;
    transform: translateY(-3px);
}

.focus-help {
    color: #777985;
    font-size: 11px;
    line-height: 1.6;
    margin-top: 17px;
    text-align: center;
}

.focus-over-modal {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 10, 0.82);
    z-index: 2100;
}

.focus-over-modal.is-visible {
    display: flex;
}

.focus-over-dialog {
    width: min(100%, 520px);
    padding: 35px;
    background: #101117;
    border: 1px solid #393b48;
    border-radius: 12px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.focus-over-dialog > p {
    color: #ff8f8f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 17px;
}

.focus-over-dialog h2 {
    color: white;
    font-size: 36px;
    letter-spacing: -2px;
    margin-bottom: 14px;
}

.focus-over-dialog > span {
    display: block;
    color: #999ba5;
    font-size: 14px;
    line-height: 1.7;
}

.focus-over-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 26px 0;
}

.focus-over-stats div {
    padding: 15px;
    background: #191a23;
    border: 1px solid #2b2d37;
    border-radius: 8px;
}

.focus-over-stats span,
.focus-over-stats strong {
    display: block;
}

.focus-over-stats span {
    color: #81838e;
    font-size: 10px;
    margin-bottom: 7px;
}

.focus-over-stats strong {
    color: white;
    font-size: 16px;
}

.focus-over-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
}

.focus-over-actions button {
    padding: 14px 10px;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    transition: transform 0.25s, background 0.25s;
}

.focus-over-actions button:hover {
    transform: translateY(-2px);
}

.focus-over-home {
    background: transparent;
    border: 1px solid #414351;
    color: #d6d7dd;
}

.focus-over-restart {
    background: #6c63ff;
    border: 1px solid #6c63ff;
    color: white;
}

.creative-lab.lab-game .focus-page {
    isolation: isolate;
    background-image:
        linear-gradient(rgba(151, 149, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(151, 149, 255, 0.055) 1px, transparent 1px);
    background-size: 54px 54px;
}

.creative-lab.lab-game .focus-page::after {
    content: "ARCADE";
    position: absolute;
    right: -7px;
    bottom: 17px;
    z-index: -1;
    color: rgba(255, 255, 255, 0.045);
    font-size: clamp(45px, 9vw, 130px);
    font-weight: 800;
    letter-spacing: -8px;
    line-height: 0.8;
    pointer-events: none;
}

.creative-lab.lab-game .focus-header {
    padding-top: 7px;
}

.creative-lab.lab-game .focus-kicker {
    color: #aaa7ff;
    font-size: 10px;
    letter-spacing: 2.4px;
}

.creative-lab.lab-game .focus-kicker::before {
    content: "ARCADE MODULE // ";
    color: #777985;
}

.creative-lab.lab-game .focus-header h1 {
    font-size: clamp(52px, 7vw, 96px);
    letter-spacing: -7px;
    line-height: 0.79;
}

.creative-lab.lab-game .focus-header h1 span {
    color: transparent;
    -webkit-text-stroke: 1px #9a96ff;
}

.creative-lab.lab-game .focus-header > p:last-child {
    color: #a5a6af;
}

.creative-lab.lab-game .focus-monitor,
.creative-lab.lab-game .focus-panel {
    border-color: rgba(152, 147, 255, 0.42);
    border-radius: 0;
    box-shadow: 13px 13px 0 rgba(80, 75, 185, 0.12), 0 25px 70px rgba(0, 0, 0, 0.26);
}

.creative-lab.lab-game .focus-monitor::before {
    content: "LIVE MODULE";
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    padding: 7px 10px;
    background: #6c63ff;
    color: white;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.creative-lab.lab-game .focus-panel-title {
    color: #aaa7ff;
    letter-spacing: 2.4px;
}

.creative-lab.lab-game .focus-stat strong {
    color: #e5e4ff;
}

.creative-lab.lab-game .focus-start {
    border-radius: 0;
    box-shadow: 4px 4px 0 rgba(155, 151, 255, 0.35);
}

.creative-lab.lab-game .focus-start:hover {
    box-shadow: 1px 1px 0 rgba(155, 151, 255, 0.35);
    transform: translate(3px, 3px);
}

.creative-lab.lab-game .focus-over-dialog {
    border-color: rgba(152, 147, 255, 0.52);
    border-radius: 0;
}

@media (max-width: 900px) {
    .focus-game-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .focus-page {
        padding: 125px 7% 65px;
    }

    .focus-header h1,
    .creative-lab.lab-game .focus-header h1 {
        letter-spacing: -4px;
    }

    .focus-monitor,
    #focus-canvas {
        min-height: 360px;
    }

    .focus-panel {
        padding: 24px;
    }

    .focus-over-dialog {
        padding: 27px 22px;
    }

    .focus-over-stats,
    .focus-over-actions {
        grid-template-columns: 1fr;
    }
}

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


/* CREATIVE LAB — WORLD FILES + ARCADE MODULES */

.creative-lab.lab-subpage .detail-page,
.creative-lab.lab-game .maze-page,
.creative-lab.lab-game .bug-page,
.creative-lab.lab-game .pulse-page {
    isolation: isolate;
    background-image:
        linear-gradient(rgba(151, 149, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(151, 149, 255, 0.055) 1px, transparent 1px);
    background-size: 54px 54px;
}

.creative-lab.lab-subpage .detail-page::after,
.creative-lab.lab-game .maze-page::after,
.creative-lab.lab-game .bug-page::after,
.creative-lab.lab-game .pulse-page::after {
    position: absolute;
    right: -7px;
    bottom: 17px;
    z-index: -1;

    color: rgba(255, 255, 255, 0.045);
    font-size: clamp(45px, 9vw, 130px);
    font-weight: 800;
    letter-spacing: -8px;
    line-height: 0.8;
    pointer-events: none;
}

.creative-lab.lab-subpage .detail-page::after {
    content: "WORLD FILE";
}

.creative-lab.lab-game .maze-page::after,
.creative-lab.lab-game .bug-page::after,
.creative-lab.lab-game .pulse-page::after {
    content: "ARCADE";
}

.creative-lab.lab-subpage .detail-content {
    max-width: 1040px;
}

.creative-lab.lab-subpage .detail-content::before {
    content: "NICOON // CREATIVE LAB · WORLD FILE UNLOCKED";
    display: block;

    width: fit-content;
    margin-bottom: 42px;
    padding: 8px 10px;

    border: 1px solid rgba(159, 155, 255, 0.42);
    color: #a7a3ff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.7px;
}

.creative-lab.lab-subpage .back-link,
.creative-lab.lab-game .back-link {
    padding-bottom: 9px;
    border-bottom: 1px solid #45435e;
    color: #a8a6b4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.creative-lab.lab-subpage .detail-icon {
    display: grid;
    place-items: center;

    width: 92px;
    height: 92px;
    margin-bottom: 32px;

    background: #151623;
    border: 1px solid #5954a6;
    border-radius: 0;
    box-shadow: 8px 8px 0 rgba(108, 99, 255, 0.21);
}

.creative-lab.lab-subpage .detail-page .intro {
    color: #aaa7ff;
    font-size: 10px;
    letter-spacing: 2.7px;
}

.creative-lab.lab-subpage .detail-page h1 {
    max-width: 1000px;
    font-size: clamp(58px, 10vw, 142px);
    letter-spacing: -8px;
    line-height: 0.82;
    text-shadow: 0 0 80px rgba(108, 99, 255, 0.16);
}

.creative-lab.lab-subpage .detail-page h1::after {
    content: "↘";
    display: inline-block;
    margin-left: 14px;
    color: #918cff;
    font-size: 0.46em;
    vertical-align: top;
}

.creative-lab.lab-game .maze-header,
.creative-lab.lab-game .bug-header,
.creative-lab.lab-game .pulse-header {
    padding-top: 7px;
}

.creative-lab.lab-game .maze-kicker,
.creative-lab.lab-game .bug-kicker,
.creative-lab.lab-game .pulse-kicker {
    color: #aaa7ff;
    font-size: 10px;
    letter-spacing: 2.4px;
}

.creative-lab.lab-game .maze-kicker::before,
.creative-lab.lab-game .bug-kicker::before,
.creative-lab.lab-game .pulse-kicker::before {
    content: "ARCADE MODULE // ";
    color: #777985;
}

.creative-lab.lab-game .maze-header h1,
.creative-lab.lab-game .bug-header h1,
.creative-lab.lab-game .pulse-header h1 {
    font-size: clamp(52px, 7vw, 96px);
    letter-spacing: -7px;
    line-height: 0.79;
}

.creative-lab.lab-game .maze-header h1 span,
.creative-lab.lab-game .bug-header h1 span,
.creative-lab.lab-game .pulse-header h1 span {
    color: transparent;
    -webkit-text-stroke: 1px #9a96ff;
}

.creative-lab.lab-game .maze-header > p:last-child,
.creative-lab.lab-game .bug-header > p:last-child,
.creative-lab.lab-game .pulse-header > p:last-child {
    color: #a5a6af;
}

.creative-lab.lab-game .maze-board-wrap,
.creative-lab.lab-game .maze-panel,
.creative-lab.lab-game .code-terminal,
.creative-lab.lab-game .bug-panel,
.creative-lab.lab-game .pulse-board,
.creative-lab.lab-game .pulse-panel {
    border-color: rgba(152, 147, 255, 0.42);
    border-radius: 0;
    box-shadow: 13px 13px 0 rgba(80, 75, 185, 0.12), 0 25px 70px rgba(0, 0, 0, 0.26);
}

.creative-lab.lab-game .maze-board-wrap,
.creative-lab.lab-game .code-terminal,
.creative-lab.lab-game .pulse-board {
    position: relative;
}

.creative-lab.lab-game .maze-board-wrap::before,
.creative-lab.lab-game .code-terminal::before,
.creative-lab.lab-game .pulse-board::before {
    content: "LIVE MODULE";
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;

    padding: 7px 10px;
    background: #6c63ff;
    color: white;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.creative-lab.lab-game .maze-panel-title,
.creative-lab.lab-game .bug-panel-title,
.creative-lab.lab-game .pulse-panel-title {
    color: #aaa7ff;
    letter-spacing: 2.4px;
}

.creative-lab.lab-game .maze-stat strong,
.creative-lab.lab-game .bug-stat strong,
.creative-lab.lab-game .pulse-stat strong {
    color: #e5e4ff;
}

.creative-lab.lab-game .maze-restart,
.creative-lab.lab-game .bug-restart,
.creative-lab.lab-game .pulse-start {
    border-radius: 0;
    box-shadow: 4px 4px 0 rgba(155, 151, 255, 0.35);
}

.creative-lab.lab-game .maze-restart:hover,
.creative-lab.lab-game .bug-restart:hover,
.creative-lab.lab-game .pulse-start:hover {
    box-shadow: 1px 1px 0 rgba(155, 151, 255, 0.35);
    transform: translate(3px, 3px);
}

.creative-lab.lab-game .maze-restart:disabled {
    box-shadow: none;
}

.creative-lab.lab-game .pulse-key,
.creative-lab.lab-game .games-list button {
    border-radius: 0;
}

.creative-lab.lab-game .game-over-dialog,
.creative-lab.lab-game .bug-over-dialog,
.creative-lab.lab-game .pulse-over-dialog,
.creative-lab.lab-game .leave-game-dialog {
    border-color: rgba(152, 147, 255, 0.52);
    border-radius: 0;
}

@media (max-width: 700px) {
    .creative-lab.lab-subpage .detail-content::before {
        margin-bottom: 31px;
        font-size: 8px;
    }

    .creative-lab.lab-subpage .detail-page h1 {
        letter-spacing: -5px;
    }

    .creative-lab.lab-game .maze-header h1,
    .creative-lab.lab-game .bug-header h1,
    .creative-lab.lab-game .pulse-header h1 {
        letter-spacing: -4px;
    }
}

/* CONTROLLI MOBILE DEI MINIGIOCHI — non modificano l'esperienza desktop */
.maze-touch-controls,
.mobile-only {
    display: none;
}

@media (max-width: 700px) and (pointer: coarse) {
    .mobile-only {
        display: inline;
    }

    .maze-board-wrap {
        align-items: flex-start;
        padding: 12px 12px 122px;
    }

    .maze-touch-controls {
        position: absolute;
        left: 50%;
        bottom: 15px;
        display: grid;
        grid-template-columns: repeat(3, 56px);
        grid-template-rows: repeat(2, 52px);
        gap: 7px;
        transform: translateX(-50%);
    }

    .maze-touch-controls button {
        min-height: 52px;
        padding: 0;
        border: 1px solid rgba(172, 167, 255, 0.55);
        background: #1b1d2a;
        color: #f0efff;
        font: 700 25px/1 Inter, sans-serif;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .maze-touch-controls button:active {
        transform: scale(0.94);
        background: #6c63ff;
    }

    .maze-touch-controls .maze-touch-up {
        grid-column: 2;
    }

    .code-viewport,
    .code-terminal .anomaly,
    .pulse-key {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .code-red,
    .code-bug,
    .code-green {
        min-height: 36px;
        padding: 5px 9px;
        font-size: 13px;
    }

    .code-bug {
        min-width: 43px;
        font-size: 18px;
    }

    .pulse-keys {
        gap: 8px;
        padding: 12px;
    }

    .pulse-key {
        min-height: 68px;
        font-size: 20px;
    }

    #focus-canvas {
        cursor: crosshair;
        touch-action: none;
    }

    .focus-monitor {
        min-height: 335px;
    }
}
