
:root {
    color-scheme: dark;

    --void: #030207;
    --silver: #c8c4e1;
    --muted: #8e899f;
    --violet: #8871bd;
    --crimson: #f02b48;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--void);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--void);
    color: #eeeaf6;
    font-family: "Segoe UI", Arial, sans-serif;
}

.forbidden-world {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100svh;
    padding: 24px clamp(16px, 4vw, 48px) 18px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(
            ellipse at 50% 42%,
            rgba(70, 49, 110, 0.16),
            transparent 52%
        ),
        #030207;
}

.forbidden-world::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(
            180deg,
            rgba(3, 2, 7, 0.28),
            rgba(3, 2, 7, 0.02) 35%,
            rgba(3, 2, 7, 0.08) 58%,
            #030207 84%
        ),
        url("images/forbidden-island-background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.025);
    animation: background-drift 28s ease-in-out infinite alternate;
}

.forbidden-world::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0.12;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 3px,
            rgba(210, 197, 255, 0.08) 4px
        );
}

.return-link {
    position: relative;
    z-index: 6;
    align-self: flex-start;
    color: #a8a0b9;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.return-link span {
    margin-right: 8px;
}

.return-link:hover {
    color: white;
}

.world-label {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    color: #b7aeca;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-align: center;
}

.signal-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #d93650;
    box-shadow: 0 0 12px rgba(255, 34, 70, 0.8);
    animation: signal-pulse 2s ease-in-out infinite;
}

.island-trigger {
    position: relative;
    display: block;
    width: min(100%, 1000px);
    height: clamp(350px, 58vh, 650px);
    min-height: 350px;
    margin: 12px auto 0;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.island-trigger:focus-visible {
    outline: 1px solid rgba(205, 185, 255, 0.8);
    outline-offset: -6px;
}

.reality-layer {
    position: absolute;
    inset: -2%;
    background-image: url("forbidden-island-background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

.reality-one {
    z-index: 0;
    opacity: 0.94;
    filter: saturate(0.8) contrast(1.08);
    animation: reality-one-drift 19s ease-in-out infinite alternate;
}

.reality-two {
    z-index: 1;
    opacity: 0.25;
    mix-blend-mode: screen;
    filter:
        hue-rotate(48deg)
        saturate(0.9)
        contrast(1.3);
    clip-path: polygon(
        0 0, 100% 0, 100% 28%,
        74% 38%, 100% 48%,
        100% 100%, 0 100%,
        22% 72%, 0 55%
    );
    animation: reality-two-drift 12s ease-in-out infinite alternate;
}

.island-trigger::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at center,
            transparent 25%,
            rgba(3, 2, 7, 0.12) 56%,
            rgba(3, 2, 7, 0.8) 100%
        );
}

.island-trigger::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(3, 2, 7, 0.12),
            transparent 25%,
            transparent 66%,
            rgba(3, 2, 7, 0.55)
        );
}

.rift {
    position: absolute;
    z-index: 3;
    display: block;
    width: 2px;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(222, 208, 255, 0.95) 20%,
        rgba(148, 111, 221, 0.9) 60%,
        transparent
    );
    opacity: 0.72;
    filter: drop-shadow(0 0 5px #9b7ae5);
    transform-origin: top center;
    animation: rift-flicker 5s steps(1, end) infinite;
}

.rift-one {
    top: 4%;
    left: 34%;
    height: 47%;
    transform: rotate(23deg);
}

.rift-two {
    top: 28%;
    left: 65%;
    height: 42%;
    transform: rotate(-28deg);
    animation-delay: -1.5s;
}

.rift-three {
    top: 48%;
    left: 18%;
    height: 32%;
    transform: rotate(-55deg);
    animation-delay: -3s;
}

.rift-four {
    top: 13%;
    left: 78%;
    height: 26%;
    transform: rotate(46deg);
    animation-delay: -2s;
}

.island-focus {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 94%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
    text-shadow: 0 2px 22px #000;
}

.island-coordinate {
    margin-bottom: 14px;
    color: #c4b4e3;
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.island-name {
    color: #f2edf9;
    font-size: clamp(1.8rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 0.11em;
    line-height: 1.1;
    text-shadow:
        0 0 28px rgba(175, 139, 236, 0.35),
        0 4px 25px #000;
}

.island-subtitle {
    max-width: 90%;
    margin-top: 18px;
    color: #c3bacf;
    font-size: clamp(0.56rem, 1.5vw, 0.72rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.7;
}

.touch-indicator {
    position: absolute;
    z-index: 4;
    bottom: 20px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 11px;
    width: max-content;
    max-width: 90%;
    transform: translateX(-50%);
    pointer-events: none;
}

.touch-ring {
    width: 8px;
    height: 8px;
    border: 1px solid #c5b1ed;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(166, 121, 238, 0.7);
    animation: signal-pulse 2s ease-in-out infinite;
}

.touch-text {
    color: #b6a9ca;
    font-size: 0.59rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.secret-message {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 720px);
    margin: -3px auto 0;
    text-align: center;
}

.message-line {
    width: min(280px, 65%);
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(155, 132, 194, 0.6),
        transparent
    );
}

.message-overline {
    margin: 19px 0 14px;
    color: #9b8bb6;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.23em;
}

.secret-message h1 {
    margin: 0;
    color: #eee7f7;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.23;
    text-shadow: 0 0 25px rgba(148, 108, 204, 0.12);
}

.message-description {
    margin: 17px 0 0;
    color: #a8a0b4;
    font-size: 0.82rem;
    line-height: 1.7;
}

.prohibition-seal {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 23px 0 25px;
    padding: 11px 17px;
    border: 1px solid rgba(199, 58, 80, 0.36);
    background: rgba(31, 4, 13, 0.52);
    color: #d68a98;
    font-size: 0.63rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.prohibition-seal span {
    font-size: 0.85rem;
}

.page-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    width: min(100%, 1000px);
    margin-top: auto;
    padding-top: 22px;
    color: #655d72;
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

/* LOCKDOWN EFFECT */

.lockdown-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
    overflow: hidden;
    background: #050108;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.18s ease,
        visibility 0.18s ease;
}

.lockdown-screen::before,
.lockdown-screen::after {
    content: "";
    position: absolute;
    inset: -20%;
    pointer-events: none;
}

.lockdown-screen::before {
    background:
        repeating-linear-gradient(
            135deg,
            transparent 0,
            transparent 65px,
            rgba(255, 28, 63, 0.13) 66px,
            transparent 68px
        );
    transform: rotate(-7deg);
}

.lockdown-screen::after {
    background:
        radial-gradient(
            ellipse at center,
            rgba(111, 0, 32, 0.4),
            transparent 67%
        );
}

.lockdown-content {
    position: relative;
    z-index: 2;
    width: min(540px, 100%);
    padding: clamp(28px, 6vw, 48px);
    border: 1px solid rgba(255, 43, 72, 0.65);
    background: rgba(12, 2, 9, 0.94);
    box-shadow:
        0 0 55px rgba(255, 0, 44, 0.13),
        inset 0 0 35px rgba(255, 0, 44, 0.04);
    text-align: center;
}

.fracture-symbol {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 27px;
    border: 1px solid #ff3453;
    transform: rotate(45deg);
    box-shadow: 0 0 28px rgba(255, 31, 65, 0.18);
}

.fracture-symbol span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 75px;
    background: #ff4b65;
    transform: translate(-50%, -50%) rotate(30deg);
}

.fracture-symbol span:nth-child(2) {
    transform: translate(-50%, -50%) rotate(75deg);
}

.fracture-symbol span:nth-child(3) {
    height: 45px;
    transform: translate(-50%, -50%) rotate(-30deg);
}

.lockdown-label {
    margin: 0 0 13px;
    color: #e67c8c;
    font-size: 0.61rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.lockdown-content h2 {
    margin: 0;
    color: #fff0f2;
    font-size: clamp(1.7rem, 6vw, 2.8rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1.15;
}

.lockdown-warning {
    margin: 20px 0;
    color: #ff415b;
    font-size: 0.77rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.lockdown-divider {
    width: 75%;
    height: 1px;
    margin: 23px auto;
    background: linear-gradient(
        90deg,
        transparent,
        #a8203b,
        transparent
    );
}

.lockdown-secret {
    color: #dfb0b8;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.7;
}

.lockdown-return {
    margin: 32px 0 12px;
    color: #f1e6eb;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    line-height: 1.7;
}

.lockdown-progress {
    height: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.lockdown-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: #ff294c;
    transform-origin: left;
}

.lockdown-footer {
    margin: 23px 0 0;
    color: #9f4c5c;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.7;
}

body.lockdown-active .lockdown-screen {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.lockdown-active .lockdown-progress span {
    animation: lockdown-countdown 3.2s linear forwards;
}

body.lockdown-active {
    animation: reality-collapse 0.35s steps(2, end) 4;
}

@keyframes background-drift {
    from { transform: scale(1.025) translateX(-0.4%); }
    to { transform: scale(1.07) translateX(0.4%); }
}

@keyframes reality-one-drift {
    from { transform: scale(1.015) translate(-0.2%, 0); }
    to { transform: scale(1.04) translate(0.4%, -0.4%); }
}

@keyframes reality-two-drift {
    from { transform: translate(-1.5%, 0.5%) scale(1.02); }
    to { transform: translate(1.5%, -0.5%) scale(1.06); }
}

@keyframes rift-flicker {
    0%, 89%, 93%, 100% { opacity: 0.72; }
    90%, 92% { opacity: 0.12; }
}

@keyframes signal-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@keyframes lockdown-countdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@keyframes reality-collapse {
    0%, 100% { filter: none; }
    50% { filter: hue-rotate(-20deg) contrast(1.25); }
}

@media (max-width: 600px) {
    .forbidden-world {
        padding: 19px 16px 15px;
    }

    .world-label {
        margin-top: 30px;
        font-size: 0.55rem;
        letter-spacing: 0.12em;
    }

    .island-trigger {
        height: 48svh;
        min-height: 320px;
        max-height: 490px;
    }

    .island-name {
        letter-spacing: 0.045em;
    }

    .island-subtitle {
        letter-spacing: 0.06em;
    }

    .secret-message h1 {
        font-size: clamp(1.75rem, 7vw, 2.6rem);
    }

    .message-description {
        max-width: 310px;
        font-size: 0.76rem;
    }

    .page-footer {
        font-size: 0.48rem;
        letter-spacing: 0.05em;
    }
}

@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;
    }
}
