* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Arial, Helvetica, sans-serif; color: white; background: #080c25; }

/* Landing: the original supplied image contains the complete artwork and text.
   Display it once, without duplicate HTML headings over it. */
.landing-page { min-height: 100vh; display: grid; place-items: center; background: #060b24; }
.landing-art { position: relative; width: 100%; max-width: 1672px; }
.landing-image { width: 100%; height: auto; display: block; }
/* Position corresponds to the glowing ВЛЕЗ button inside the supplied image. */
.landing-enter { position: absolute; left: 38%; top: 55.7%; width: 24%; height: 12.5%; border-radius: 100px; cursor: pointer; }
.landing-enter:hover { box-shadow: 0 0 28px rgba(123, 86, 255, .55); }
.landing-enter:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.menu-page { min-height: 100vh; background: linear-gradient(rgba(5, 9, 33, .82),rgba(20, 6, 54, .94)), url('future-World-2050-Neon-Cityscape.png') center/cover fixed; }
.menu-content { max-width: 1120px; margin: auto; padding: 55px 20px 70px; text-align: center; }
.eyebrow { color: #d2bbff; letter-spacing: 3px; font-size: 12px; }
.menu-content h1 { font-size: clamp(34px, 5vw, 66px); text-shadow: 0 0 24px #536bff; margin: 16px 0; }
.menu-content h1 span { color: #d4a0ff; }
.menu-subtitle { color: #8fe4ff; font-size: 24px; margin: 0 0 42px; }
.topics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 22px; margin-bottom: 48px; }
.topic { display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; }
.topic-icon { width: min(100%, 150px); aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(42px, 5vw, 65px); border-radius: 28px; border: 2px solid rgba(187, 148, 255, .9); background: linear-gradient(135deg, rgba(32, 90, 220, .84), rgba(120, 37, 190, .84)); box-shadow: 0 0 22px rgba(111, 70, 255, .35); transition: transform .25s, box-shadow .25s; }
.topic:hover .topic-icon { transform: translateY(-5px); box-shadow: 0 0 35px rgba(158, 93, 255, .8); }
.back-button { display: inline-block; color: #fff; text-decoration: none; font-weight: 700; font-size: 19px; padding: 16px 46px; border-radius: 40px; background: linear-gradient(90deg,#2563eb,#9333ea); box-shadow: 0 0 22px rgba(124, 58, 237, .65); }
.back-button:hover { filter: brightness(1.2); }
@media (max-width: 850px) { .topics { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .topics { grid-template-columns: repeat(2, 1fr); gap: 25px 14px; } .topic-icon { max-width: 125px; } .topic { font-size: 14px; } .menu-content { padding-top: 36px; } }

/* RESPONSIVE - NO SCROLL */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;

    padding: 0;
    margin: 0;

    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

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

.content {
    max-width: 100%;
    box-sizing: border-box;
}

/* MENU PAGE */

.menu-page {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;

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

    padding: 12px;
    box-sizing: border-box;
}

.topics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: clamp(4px, 1.5vh, 15px);
    width: min(95vw, 900px);

    margin: 10px auto;
}

.topic {
    min-width: 0;
    gap: 5px;
    font-size: clamp(9px, 1.4vw, 16px);
}

.topic-icon {
    width: min(12vw, 13vh, 120px);
    height: min(12vw, 13vh, 120px);

    font-size: clamp(20px, 5vh, 55px);
    border-radius: 20px;
}

.menu-page h1 {
    font-size: clamp(18px, 4vh, 42px);
    margin-bottom: 5px;
}

.menu-page h2 {
    font-size: clamp(13px, 2.5vh, 24px);
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .topics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .topic-icon {
        width: min(20vw, 11vh, 80px);
        height: min(20vw, 11vh, 80px);
        font-size: clamp(18px, 4vh, 36px);
    }

    .topic {
        font-size: 11px;
    }
}

/* ОТДЕЛЕН ФОН ЗА МЕНЮТО */

.menu-content {
    width: 100%;
    height: 100dvh;
    min-height: 0;

    background: linear-gradient(
        135deg,
        #070b24 0%,
        #171044 50%,
        #35135d 100%
    );

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

    padding: 15px;
    overflow: hidden;
}

/* ==========================================
   FUTURE WORLD 2050 - MENU AND EDITOR
   ========================================== */

/* FULLSCREEN MENU */

body.menu-body {
    width: 100%;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(
        120deg,
        #0866f5 0%,
        #5541ee 50%,
        #b62df0 100%
    );
}

.menu-body .menu-content {
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    box-sizing: border-box;
    background: transparent;
}

.menu-body .topic {
    color: white;
    text-decoration: none;
}

/* TOPIC PAGE */

body.article-body {
    margin: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    color: white;
    background: linear-gradient(
        125deg,
        #0866f5 0%,
        #6539e9 55%,
        #a52de5 100%
    );
}

.article-page {
    width: min(100%, 1000px);
    height: 100dvh;
    margin: auto;
    padding: 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-back {
    color: white;
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
    padding-right: 145px;
}

.article-header {
    text-align: center;
}

.article-header h1 {
    margin: 4px 0;
    font-size: clamp(22px, 4vw, 40px);
}

.article-header p {
    margin: 4px;
}

.article-emoji {
    font-size: clamp(30px, 5vh, 55px);
}

/* EDIT BUTTON - TOP RIGHT */

.edit-corner {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 1000;
}

.edit-button {
    background: linear-gradient(
        135deg,
        #2563eb,
        #9333ea
    );
    color: white;
    border: 2px solid #b9a0ff;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
}

.edit-button:hover {
    transform: scale(1.05);
}

/* SMALL PASSWORD POPUP */

.password-box {
    position: absolute;
    top: 60px;
    right: 0;
    width: 240px;
    padding: 18px;
    box-sizing: border-box;
    border-radius: 16px;
    background: #15113f;
    border: 1px solid #9282ee;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.password-box[hidden] {
    display: none !important;
}

.password-box h3 {
    margin: 0 0 14px;
    color: white;
    font-size: 16px;
}

.password-box form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.password-box input[type="password"] {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: none;
    border-radius: 8px;
    font-size: 15px;
}

.unlock-button {
    background: linear-gradient(
        90deg,
        #2563eb,
        #9333ea
    );
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
}

.error-text {
    color: #ffb8b8;
    font-size: 13px;
    margin: 0;
}

/* ARTICLE CONTENT */

.article-content {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(8,10,55,0.35);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    backdrop-filter: blur(12px);
}

.article-content form {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-content textarea {
    flex: 1;
    min-height: 100px;
    width: 100%;
    resize: none;
    border: none;
    border-radius: 12px;
    padding: 16px;
    box-sizing: border-box;
    font: 16px Arial, sans-serif;
    line-height: 1.6;
}

.article-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.7;
    font-size: 17px;
}

.save-button {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(
        90deg,
        #2563eb,
        #a32dea
    );
}

/* MOBILE */

@media (max-width: 600px) {
    .edit-corner {
        top: 10px;
        right: 10px;
    }

    .edit-button {
        padding: 9px 13px;
        font-size: 12px;
    }

    .password-box {
        top: 48px;
        width: min(240px, 90vw);
    }

    .article-page {
        padding: 10px;
        gap: 8px;
    }

    .article-content {
        padding: 10px;
    }

    .article-back {
        padding-right: 130px;
    }
}
