/* =========================================
   BEBO GAMEWORLD
   Main stylesheet
========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --lab-ink: #060c1c;
    --lab-navy: #060f32;
    --lab-blue: #08278d;
    --lab-deep-blue: #0c1e5f;
    --lab-purple: #7e41f9;
    --lab-magenta: #a345f0;
    --lab-panel: rgba(6, 12, 28, 0.86);
    --lab-line: rgba(126, 65, 249, 0.28);
    --lab-text: #fefdfe;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(
            rgba(6, 12, 28, 0.82),
            rgba(6, 12, 28, 0.94)
        ),
        url("../images/immagine_Bebo_game_lab_B.g.l..png");
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: var(--lab-text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1440px, 90%);
    margin: 0 auto;
}


/* =========================================
   HEADER
========================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(3, 8, 27, 0.9);
    border-bottom: 1px solid rgba(126, 65, 249, 0.18);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(14px);
}

.navbar {
    min-height: 75px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;

    font-size: 25px;
    font-weight: 900;
    letter-spacing: 0;
}

.logo span {
    color: var(--lab-purple);
}

.logo .logo-mark {
    width: 38px;
    height: 38px;

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

    background: linear-gradient(135deg, var(--lab-magenta), var(--lab-purple));
    color: #ffffff;

    border-radius: 11px;

    font-size: 22px;
    box-shadow: 0 0 26px rgba(126, 65, 249, 0.7);
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    position: relative;

    color: #fefdfe;
    font-weight: 700;

    transition: color 0.2s;
}

nav a:hover {
    color: #ffffff;
}

nav a.active::after,
nav a:hover::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: -26px;

    height: 3px;

    background: var(--lab-purple);
    border-radius: 999px;
}

nav a.nav-button {
    padding: 10px 16px;

    background: linear-gradient(135deg, var(--lab-purple), #6728e8);

    border-radius: 8px;
    box-shadow: 0 0 24px rgba(126, 65, 249, 0.38);
}

nav a.nav-button::after {
    display: none;
}

.nav-user,
.nav-logout {
    color: #ffffff;
    font: inherit;
    font-weight: 800;
}

.nav-user {
    padding: 10px 0;
}

.nav-logout {
    padding: 10px 16px;

    background: rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(126, 65, 249, 0.35);
    border-radius: 8px;

    cursor: pointer;
}


/* =========================================
   HERO
========================================= */
.hero {
    min-height: 610px;

    display: flex;
    align-items: center;

    position: relative;

    background-image:
        linear-gradient(
            90deg,
            rgba(6, 15, 50, 0.82) 0%,
            rgba(8, 39, 141, 0.34) 45%,
            rgba(6, 12, 28, 0.08) 100%
        ),
        url("../images/immagine_Bebo_game_lab_B.g.l..png");

    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}


.badge {
    color: var(--lab-purple);

    font-size: 15px;
    font-weight: bold;

    letter-spacing: 0;
}

.hero h1 {
    margin-top: 20px;

    max-width: 900px;

    font-size: clamp(54px, 7vw, 86px);
    font-weight: 900;

    line-height: 1.05;
}

.hero h1 span {
    color: var(--lab-purple);
}

.hero p {
    margin-top: 25px;

    max-width: 560px;

    color: #fefdfe;

    font-size: 22px;
    line-height: 1.45;
}
.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    max-width: 700px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero p {
    max-width: 600px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* =========================================
   BUTTONS
========================================= */

.main-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 30px;

    padding: 17px 28px;

    background: linear-gradient(135deg, var(--lab-purple), #6728e8);
    color: #ffffff;

    border: none;
    border-radius: 8px;

    font-weight: bold;

    cursor: pointer;

    transition:
        background 0.2s,
        transform 0.2s;
}

.main-button:hover {
    background: linear-gradient(135deg, var(--lab-magenta), var(--lab-purple));
    transform: translateY(-2px);
}


/* =========================================
   GAMES SECTION
========================================= */

.games-section {
    position: relative;

    width: min(1280px, 88%);

    margin: -82px auto 80px;
    padding: 28px;

    background: var(--lab-panel);

    border: 1px solid var(--lab-line);
    border-radius: 18px;

    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 30px;

    margin-bottom: 35px;
}

.section-header h2 {
    font-size: 26px;
    text-transform: uppercase;
}

#search {
    width: 300px;

    padding: 13px 15px;

    background: rgba(9, 12, 31, 0.82);
    color: #ffffff;

    border: 1px solid rgba(126, 65, 249, 0.28);
    border-radius: 8px;

    outline: none;
}

#search:focus {
    border-color: var(--lab-purple);
}


/* =========================================
   GAME GRID
========================================= */

.games-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(190px, 1fr));

    gap: 16px;
}


/* =========================================
   GAME CARD
========================================= */

.game-card {
    overflow: hidden;

    background: linear-gradient(180deg, rgba(10, 18, 48, 0.96), rgba(5, 9, 27, 0.98));

    border: 1px solid rgba(126, 65, 249, 0.28);
    border-radius: 16px;

    transition:
        transform 0.2s,
        border-color 0.2s;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--lab-purple);
}

.game-image {
    height: 174px;

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

    padding: 16px;

    background:
        linear-gradient(
            135deg,
            #08278d,
            #060c1c
        );
}

.game-image span {
    min-width: 58px;
    min-height: 58px;

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

    background: rgba(6, 12, 28, 0.68);
    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;

    font-size: 24px;
    font-weight: 900;
}

.game-image-cyber {
    background:
        linear-gradient(90deg, rgba(126, 65, 249, 0.22) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 209, 255, 0.18) 1px, transparent 1px),
        linear-gradient(135deg, #1d0f72, #051a39);
    background-size: 28px 28px, 28px 28px, cover;
}

.game-image-space {
    background:
        radial-gradient(circle at 25% 24%, #fefdfe 1px, transparent 2px),
        radial-gradient(circle at 78% 32%, #7e41f9, transparent 24%),
        linear-gradient(135deg, #01164c, #060c1c);
    background-size: 42px 42px, cover, cover;
}

.game-image-kingdom,
.game-image-empire {
    background:
        linear-gradient(135deg, rgba(255, 179, 49, 0.32), transparent 48%),
        linear-gradient(135deg, #08278d, #060f32);
}

.game-image-factory {
    background:
        repeating-linear-gradient(45deg, rgba(254, 162, 58, 0.18) 0 12px, transparent 12px 24px),
        linear-gradient(135deg, #30237f, #060c1c);
}

.game-image-shadow {
    background:
        radial-gradient(circle at center, rgba(163, 69, 240, 0.42), transparent 42%),
        linear-gradient(135deg, #2a1e48, #060c1c);
}

.game-info {
    padding: 18px;
}

.game-info h3 {
    margin-bottom: 8px;

    font-size: 18px;
}

.developer {
    margin-bottom: 14px;

    color: #d7ddf0;

    font-size: 14px;
}

.description {
    min-height: 65px;

    color: #f1f4ff;

    font-size: 14px;
    line-height: 1.45;
}

.game-footer {
    margin-top: 20px;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 10px;
}

.category {
    display: inline-block;
    align-self: flex-start;

    padding: 6px 10px;

    background: linear-gradient(135deg, var(--lab-purple), #5f24d8);
    color: #ffffff;

    border-radius: 5px;

    font-size: 12px;
    font-weight: 800;
}

.detail-button {
    width: 100%;
    padding: 12px 13px;

    background: linear-gradient(135deg, var(--lab-purple), #6728e8);
    color: #ffffff;

    border: none;
    border-radius: 6px;

    cursor: pointer;

    transition: background 0.2s;
}

.detail-button:hover {
    background: linear-gradient(135deg, var(--lab-magenta), var(--lab-purple));
}

.empty-games {
    grid-column: 1 / -1;

    padding: 40px 0;

    color: #aeb7c8;

    text-align: center;
}


/* =========================================
   ABOUT SECTION
========================================= */

.about-section {
    padding: 10px 0 80px;
}

.about-content {
    max-width: 900px;
}

.about-content h2 {
    margin-top: 12px;

    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
}

.about-content p {
    margin-top: 18px;

    color: #d7ddf0;

    font-size: 18px;
    line-height: 1.6;
}


/* =========================================
   GAME DETAIL PAGE
========================================= */

.game-detail-page {
    min-height: calc(100vh - 150px);

    padding-top: 50px;
    padding-bottom: 80px;
}

.game-single-page {
    width: min(1320px, 94%);
}

.game-detail.cyber-layout,
.game-detail.space-layout,
.kingdom-page .game-detail,
.factory-page .game-detail,
.game-detail.empire-layout,
.shadow-page .game-detail {
    min-height: calc(100vh - 250px);

    padding: 34px;

    border: 1px solid #2c3549;
    border-radius: 16px;
}

.game-detail.cyber-layout {
    grid-template-columns: 1fr 1.25fr;

    background:
        linear-gradient(90deg, rgba(0, 209, 255, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 209, 255, 0.08) 1px, transparent 1px),
        #080d16;
    background-size: 44px 44px;
}

.game-detail.space-layout {
    grid-template-columns: 1.25fr 1fr;

    background:
        radial-gradient(circle at 15% 20%, rgba(124, 255, 155, 0.26), transparent 28%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.12), transparent 18%),
        #02040a;
}

.kingdom-page .game-detail {
    grid-template-columns: minmax(260px, 360px) 1fr;

    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.22), transparent 42%),
        #121018;
}

.factory-page .game-detail {
    grid-template-columns: 1.15fr minmax(260px, 390px);

    background:
        repeating-linear-gradient(90deg, rgba(255, 143, 61, 0.1) 0 18px, transparent 18px 36px),
        #11141a;
}

.game-detail.empire-layout {
    grid-template-columns: minmax(260px, 420px) 1fr;

    background:
        linear-gradient(135deg, rgba(255, 92, 138, 0.2), transparent 45%),
        #140c12;
}

.shadow-page .game-detail {
    grid-template-columns: 1fr minmax(260px, 390px);

    background:
        radial-gradient(circle at center, rgba(169, 135, 255, 0.22), transparent 36%),
        #05060a;
}

.game-detail.cyber-layout .detail-cover,
.game-detail.space-layout .detail-cover,
.kingdom-page .detail-cover,
.factory-page .detail-cover,
.game-detail.empire-layout .detail-cover,
.shadow-page .detail-cover {
    min-height: 520px;
}

.game-detail.space-layout .detail-content,
.factory-page .detail-content,
.shadow-page .detail-content {
    order: 1;
}

.game-detail.space-layout .detail-cover,
.factory-page .detail-cover,
.shadow-page .detail-cover {
    order: 2;
}

.back-link {
    display: inline-block;

    margin-bottom: 30px;

    color: #9ba5b7;

    transition: color 0.2s;
}

.back-link:hover {
    color: #ffffff;
}

.game-detail {
    display: grid;

    grid-template-columns:
        minmax(280px, 430px)
        1fr;

    gap: 50px;

    align-items: center;
}


/* GAME COVER */

.detail-cover {
    min-height: 420px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at center,
            rgba(121, 92, 255, 0.4),
            transparent 60%
        ),
        linear-gradient(
            135deg,
            #20284a,
            #10141f
        );

    border: 1px solid #2c3549;
    border-radius: 20px;
}

.detail-cover-cyber {
    background:
        linear-gradient(90deg, rgba(0, 209, 255, 0.2) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 209, 255, 0.16) 1px, transparent 1px),
        linear-gradient(135deg, #10233a, #080b12);
    background-size: 34px 34px, 34px 34px, cover;
}

.detail-cover-space {
    background:
        radial-gradient(circle at 25% 25%, #ffffff 1px, transparent 2px),
        radial-gradient(circle at 75% 45%, rgba(124, 255, 155, 0.42), transparent 24%),
        linear-gradient(135deg, #08152a, #02040a);
    background-size: 72px 72px, cover, cover;
}

.detail-cover-kingdom {
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.28), transparent 40%),
        linear-gradient(45deg, #2c2240, #11151f);
}

.detail-cover-factory {
    background:
        repeating-linear-gradient(45deg, rgba(255, 143, 61, 0.18) 0 12px, transparent 12px 24px),
        linear-gradient(135deg, #2b2b32, #10141f);
}

.detail-cover-empire {
    background:
        linear-gradient(90deg, rgba(255, 92, 138, 0.22), transparent 55%),
        linear-gradient(135deg, #35172a, #10141f);
}

.detail-cover-shadow {
    background:
        radial-gradient(circle at center, rgba(169, 135, 255, 0.34), transparent 48%),
        linear-gradient(135deg, #171225, #05060a);
}

.detail-icon {
    font-size: 140px;
}


/* GAME INFORMATION */

.detail-content h1 {
    margin-top: 15px;

    font-size: clamp(42px, 6vw, 72px);

    line-height: 1;
}

.detail-developer {
    margin-top: 18px;

    color: #9ca6b8;

    font-size: 18px;
}

.detail-developer strong {
    color: #ffffff;
}

.detail-description {
    max-width: 700px;

    margin-top: 30px;

    color: #b7bfce;

    font-size: 18px;

    line-height: 1.7;
}

.play-button {
    font-size: 17px;
}

.game-player {
    grid-column: 1 / -1;

    min-height: 0;
}

.game-player:empty {
    display: none;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 24px;

    margin-top: 20px;
    margin-bottom: 18px;
}

.player-header h2 {
    margin-top: 8px;

    font-size: 32px;
}

.player-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.player-stats span {
    padding: 9px 12px;

    background: #161d2a;

    border: 1px solid #30384a;
    border-radius: 6px;
}

.player-goal {
    max-width: 420px;

    color: #b7bfce;

    line-height: 1.5;
}

.play-field {
    position: relative;

    height: 360px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 70% 20%,
            rgba(120, 92, 255, 0.28),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #121b2a,
            #080b12
        );

    border: 1px solid #2c3549;
    border-radius: 12px;
}

.arena-cyber {
    background:
        linear-gradient(90deg, rgba(0, 209, 255, 0.18) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 209, 255, 0.14) 1px, transparent 1px),
        linear-gradient(135deg, #10233a, #080b12);
    background-size: 42px 42px, 42px 42px, cover;
}

.arena-space {
    background:
        radial-gradient(circle at 20% 30%, #ffffff 1px, transparent 2px),
        radial-gradient(circle at 80% 25%, rgba(124, 255, 155, 0.38), transparent 25%),
        linear-gradient(135deg, #06162f, #02040a);
    background-size: 64px 64px, cover, cover;
}

.arena-kingdom {
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.24), transparent 36%),
        linear-gradient(45deg, #2c2240, #11151f);
}

.arena-factory {
    background:
        repeating-linear-gradient(45deg, rgba(255, 143, 61, 0.17) 0 14px, transparent 14px 28px),
        linear-gradient(135deg, #2a2b30, #10141f);
}

.arena-empire {
    background:
        linear-gradient(90deg, rgba(255, 92, 138, 0.2), transparent 55%),
        linear-gradient(135deg, #35172a, #10141f);
}

.arena-shadow {
    background:
        radial-gradient(circle at center, rgba(169, 135, 255, 0.28), transparent 42%),
        linear-gradient(135deg, #171225, #05060a);
}

.game-target {
    position: absolute;

    width: 74px;
    height: 74px;

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

    background: var(--game-accent, #785cff);
    color: #ffffff;

    border: none;
    border-radius: 50%;

    font-size: 22px;
    font-weight: 900;

    cursor: pointer;

    transition:
        background 0.2s,
        transform 0.2s;
}

.game-target:hover {
    transform: scale(1.05);
}

.game-target:disabled {
    cursor: default;
    opacity: 0.55;
}

.player-message {
    margin-top: 14px;

    color: #aeb7c8;
}

.player-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    margin-top: 16px;
}

.runner-game,
.scan-game,
.quest-game,
.factory-game,
.empire-game,
.shadow-game {
    padding: 22px;

    background: #101722;

    border: 1px solid #30384a;
    border-radius: 12px;
}

.runner-track {
    position: relative;

    height: 300px;

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

    overflow: hidden;

    margin-top: 16px;

    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 16px),
        linear-gradient(135deg, #122235, #070a10);

    border: 1px solid #2c3549;
    border-radius: 12px;
}

.runner-lane {
    border-right: 1px dashed rgba(255, 255, 255, 0.22);
}

.runner-lane:last-child {
    border-right: none;
}

.runner-player {
    position: absolute;
    bottom: 28px;

    width: 78px;
    height: 78px;

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

    background: var(--game-accent, #785cff);
    color: #061018;

    border-radius: 8px;

    font-weight: 900;

    transform: translateX(-50%);
    transition: left 0.18s;
}

.quest-scene {
    min-height: 180px;

    display: flex;
    align-items: center;

    padding: 28px;

    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.16), transparent),
        #141722;

    border: 1px solid #343b4c;
    border-radius: 12px;

    font-size: 24px;
    line-height: 1.4;
}

.choice-grid,
.strategy-map,
.puzzle-grid {
    display: grid;

    gap: 14px;

    margin-top: 16px;
}

.choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.puzzle-grid,
.strategy-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.puzzle-grid button,
.strategy-map button {
    min-height: 92px;

    background: #151d2a;
    color: #ffffff;

    border: 1px solid #30384a;
    border-radius: 8px;

    font-weight: 900;

    cursor: pointer;

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

.puzzle-grid button:hover,
.strategy-map button:hover {
    border-color: var(--game-accent, #785cff);
    transform: translateY(-2px);
}

.puzzle-grid button.active,
.strategy-map button.active {
    background: var(--game-accent, #785cff);
    color: #080b12;
}

.planet-target {
    width: 90px;
    height: 90px;

    color: #07100c;
}


/* =========================================
   PUBLISH PAGE
========================================= */

.publish-page {
    min-height: calc(100vh - 150px);

    padding-top: 60px;
    padding-bottom: 85px;
}

.publish-header {
    max-width: 760px;

    margin-bottom: 40px;
}

.publish-header h1 {
    margin-top: 15px;

    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.05;
}

.publish-header p {
    margin-top: 20px;

    color: #b4bdce;

    font-size: 18px;
    line-height: 1.6;
}

.publish-form {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 22px;

    max-width: 880px;
}

.field {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.field-full {
    grid-column: 1 / -1;
}

.field span {
    color: #dce3f1;

    font-weight: bold;
}

.field input,
.field select,
.field textarea {
    width: 100%;

    padding: 14px 15px;

    background: #111722;
    color: #ffffff;

    border: 1px solid #30384a;
    border-radius: 8px;

    outline: none;
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #785cff;
}

.upload-area {
    min-height: 230px;

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

    gap: 12px;

    padding: 30px;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            rgba(120, 92, 255, 0.16),
            rgba(17, 23, 34, 0.92)
        );

    border: 2px dashed #4a5368;
    border-radius: 12px;

    cursor: pointer;

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

.upload-area:hover,
.upload-area:focus-within {
    border-color: #785cff;
    transform: translateY(-2px);
}

.upload-area input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}

.upload-area strong {
    font-size: 22px;
}

.upload-area small {
    color: #aeb7c8;
}

.upload-area em {
    color: #907aff;

    font-style: normal;
    font-weight: bold;
}

.publish-actions {
    grid-column: 1 / -1;
}


/* =========================================
   AUTH PAGES
========================================= */

.auth-page {
    min-height: calc(100vh - 150px);

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

    padding-top: 70px;
    padding-bottom: 90px;
}

.auth-panel {
    width: min(520px, 100%);

    padding: 34px;

    background: var(--lab-panel);

    border: 1px solid var(--lab-line);
    border-radius: 18px;

    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.auth-panel h1 {
    margin-top: 12px;
    margin-bottom: 26px;

    font-size: clamp(38px, 6vw, 58px);
    line-height: 1;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-form .main-button {
    width: 100%;
}

.auth-switch {
    margin-top: 24px;

    color: #d7ddf0;

    text-align: center;
}

.auth-switch a {
    color: var(--lab-purple);

    font-weight: 800;
}

.auth-message {
    min-height: 22px;

    color: #d7ddf0;

    font-weight: 700;
    text-align: center;
}

.auth-message.success {
    color: #7cff9b;
}

.auth-message.error {
    color: #ff8f8f;
}


/* =========================================
   AI HELPER
========================================= */

.ai-helper {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
}

.ai-toggle {
    width: 66px;
    height: 66px;

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

    background:
        radial-gradient(circle at 30% 25%, #ffffff, transparent 18%),
        linear-gradient(135deg, var(--lab-magenta), var(--lab-purple));
    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;

    box-shadow:
        0 0 28px rgba(126, 65, 249, 0.72),
        0 18px 40px rgba(0, 0, 0, 0.45);

    cursor: pointer;
}

.robot-icon {
    position: relative;

    width: 36px;
    height: 40px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.robot-antenna {
    width: 3px;
    height: 8px;

    background: #ffffff;

    border-radius: 999px;
}

.robot-antenna::before {
    content: "";

    position: absolute;
    top: -2px;
    left: 50%;

    width: 8px;
    height: 8px;

    background: #ffd166;

    border-radius: 50%;

    transform: translateX(-50%);
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.85);
}

.robot-head {
    width: 34px;
    height: 24px;

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

    gap: 7px;

    background: #fefdfe;

    border: 2px solid rgba(6, 12, 28, 0.42);
    border-radius: 9px;

    box-shadow: inset 0 -4px 0 rgba(126, 65, 249, 0.18);
}

.robot-eye {
    width: 7px;
    height: 7px;

    background: #08278d;

    border-radius: 50%;
    box-shadow: 0 0 8px rgba(8, 39, 141, 0.7);
}

.robot-body {
    width: 24px;
    height: 10px;

    margin-top: 2px;

    background: #fefdfe;

    border-radius: 4px 4px 8px 8px;
    box-shadow: inset 0 -3px 0 rgba(126, 65, 249, 0.22);
}

.ai-panel {
    position: absolute;
    right: 0;
    bottom: 82px;

    width: min(360px, calc(100vw - 32px));

    overflow: hidden;

    background: rgba(6, 12, 28, 0.94);

    border: 1px solid rgba(126, 65, 249, 0.36);
    border-radius: 16px;

    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);

    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);

    transition:
        opacity 0.2s,
        transform 0.2s;
}

.ai-panel.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 16px;

    padding: 16px;

    background: linear-gradient(135deg, rgba(126, 65, 249, 0.26), rgba(8, 39, 141, 0.16));

    border-bottom: 1px solid rgba(126, 65, 249, 0.25);
}

.ai-header strong,
.ai-header span {
    display: block;
}

.ai-header span {
    margin-top: 3px;

    color: #d7ddf0;

    font-size: 13px;
}

.ai-header button {
    width: 34px;
    height: 34px;

    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;

    cursor: pointer;
}

.ai-chat {
    max-height: 280px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    overflow-y: auto;

    padding: 16px;
}

.ai-bubble {
    width: fit-content;
    max-width: 88%;

    padding: 11px 12px;

    border-radius: 12px;

    font-size: 14px;
    line-height: 1.4;
}

.ai-bubble.bot {
    background: rgba(255, 255, 255, 0.09);
    color: #fefdfe;
}

.ai-bubble.me {
    align-self: flex-end;

    background: linear-gradient(135deg, var(--lab-purple), #6728e8);
    color: #ffffff;
}

.ai-suggestions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;

    padding: 0 16px 12px;
}

.ai-suggestions button {
    padding: 8px 10px;

    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;

    border: 1px solid rgba(126, 65, 249, 0.32);
    border-radius: 999px;

    cursor: pointer;
}

.ai-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;

    padding: 12px 16px 16px;

    border-top: 1px solid rgba(126, 65, 249, 0.22);
}

.ai-form input {
    min-width: 0;

    padding: 11px 12px;

    background: rgba(9, 12, 31, 0.82);
    color: #ffffff;

    border: 1px solid rgba(126, 65, 249, 0.28);
    border-radius: 8px;

    outline: none;
}

.ai-form button {
    padding: 11px 13px;

    background: linear-gradient(135deg, var(--lab-purple), #6728e8);
    color: #ffffff;

    border: none;
    border-radius: 8px;

    font-weight: 800;
    cursor: pointer;
}


/* =========================================
   GAME NOT FOUND
========================================= */

.game-not-found {
    grid-column: 1 / -1;

    padding: 80px 0;

    text-align: center;
}

.game-not-found h1 {
    font-size: 45px;
}

.game-not-found p {
    margin: 20px 0 30px;

    color: #9da6b8;
}


/* =========================================
   FOOTER
========================================= */

footer {
    padding: 35px 0;

    color: #7e8797;

    border-top: 1px solid #252c3b;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 800px) {

    nav {
        gap: 16px;
        overflow-x: auto;
        width: 100%;
    }

    .navbar {
        align-items: flex-start;
        flex-direction: column;

        padding: 16px 0;
    }

    .hero {
        min-height: 520px;
        padding: 70px 0 120px;
        background-position: 58% top;
    }

    .hero h1 {
        font-size: 48px;
    }

    .game-detail {
        grid-template-columns: 1fr;
    }

    .player-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .choice-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        min-height: 300px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .games-section {
        width: min(94%, 760px);

        margin-top: -80px;
        padding: 22px;
    }

    .publish-form {
        grid-template-columns: 1fr;
    }

    #search {
        width: 100%;
    }
}


/* =========================================
   SMARTPHONE
========================================= */

@media (max-width: 500px) {

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 17px;
    }

    .games-section {
        width: 92%;

        margin-top: -70px;
        padding: 18px;

        border-radius: 14px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .detail-icon {
        font-size: 100px;
    }

    .detail-content h1 {
        font-size: 40px;
    }

    .play-field {
        height: 300px;
    }

    .game-target {
        width: 64px;
        height: 64px;

        font-size: 19px;
    }

    .runner-game,
    .scan-game,
    .quest-game,
    .factory-game,
    .empire-game,
    .shadow-game {
        padding: 16px;
    }

    .runner-track,
    .play-field {
        height: 280px;
    }

    .quest-scene {
        min-height: 150px;

        padding: 20px;

        font-size: 20px;
    }

    .puzzle-grid,
    .strategy-map {
        grid-template-columns: 1fr;
    }

    .publish-page {
        padding-top: 45px;
        padding-bottom: 60px;
    }

    .upload-area {
        min-height: 200px;
        padding: 24px 18px;
    }

    .upload-area strong {
        font-size: 19px;
    }

    .ai-helper {
        right: 16px;
        bottom: 16px;
    }

    .ai-toggle {
        width: 58px;
        height: 58px;
    }

    .ai-panel {
        bottom: 74px;
    }
}
