<style>
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pipboy-green: #00ff00;
    --pipboy-dark: #001100;
    --pipboy-glow: rgba(0, 255, 0, 0.5);
}

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: #0a0a0a;
    color: var(--pipboy-green);
    min-height: 100vh;
    overflow: hidden;
}

.door-checkbox {
    display: none;
}

.landing-page {
    position: fixed;
    inset: 0;
    z-index: 10;
    transition: opacity 0.8s ease 0.5s;
}

.door-checkbox:checked ~ .landing-page {
    opacity: 0;
    pointer-events: none;
}

.background-container {
    position: absolute;
    inset: 0;
    display: flex;
}

.background-container .panel {
    flex: 1;
    overflow: hidden;
}

.background-container .panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dystopia {
    border-right: none;
}

.utopia {
    border-left: none;
}

.floating-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.floating-face img {
    pointer-events: none;
}

.floating-face img {
    width: 40vmin;
    height: 40vmin;
    object-fit: contain;
    filter: drop-shadow(0 0 30px var(--pipboy-glow));
    animation: breathing 4s ease-in-out infinite;
}

@keyframes breathing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.chat-btn {
    background: transparent;
    border: 2px solid var(--pipboy-green);
    color: var(--pipboy-green);
    padding: 15px 40px;
    font-family: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    overflow: hidden;
    transition: all 0.3s;
    text-shadow: 0 0 10px var(--pipboy-glow);
    box-shadow: 0 0 10px var(--pipboy-glow), inset 0 0 10px rgba(0, 255, 0, 0.1);
    z-index: 10;
}

.chat-btn:hover {
    background: var(--pipboy-green);
    color: #000;
    box-shadow: 0 0 30px var(--pipboy-glow);
}

.door-checkbox:checked ~ .landing-page .dystopia {
    transform: translateX(-100%);
}

.door-checkbox:checked ~ .landing-page .utopia {
    transform: translateX(100%);
}

.door-checkbox:checked ~ .landing-page .floating-face {
    transform: scale(0.1);
    opacity: 0;
}

.chat-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pipboy-dark);
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease 1s;
    z-index: 5;
}

.door-checkbox:checked ~ .chat-container {
    opacity: 1;
    pointer-events: auto;
}

.chat-wrapper {
    width: 90vw;
    max-width: 600px;
    height: 80vh;
    max-height: 700px;
    border: 3px solid var(--pipboy-green);
    background: rgba(0, 20, 0, 0.9);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px var(--pipboy-glow), inset 0 0 50px rgba(0, 255, 0, 0.05);
}

.chat-header {
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid var(--pipboy-green);
    background: rgba(0, 255, 0, 0.05);
}

.header-title {
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--pipboy-glow);
    letter-spacing: 5px;
}

.header-title #dx-year-display {
    color: var(--pipboy-green);
}

.header-subtitle {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 5px;
    letter-spacing: 2px;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    95% { opacity: 0.9; }
    96% { opacity: 1; }
}

.chat-output {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-output::-webkit-scrollbar {
    width: 8px;
}

.chat-output::-webkit-scrollbar-track {
    background: var(--pipboy-dark);
}

.chat-output::-webkit-scrollbar-thumb {
    background: var(--pipboy-green);
}

.message {
    padding: 12px 15px;
    max-width: 85%;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.bot {
    align-self: flex-start;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--pipboy-green);
    border-radius: 0 10px 10px 10px;
    animation: glitch-in 0.3s ease;
}

.message.user {
    align-self: flex-end;
    background: var(--pipboy-green);
    color: #000;
    border-radius: 10px 0 10px 10px;
}

@keyframes glitch-in {
    0% {
        opacity: 0;
        transform: translateX(-10px);
        filter: blur(5px);
    }
    50% {
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

.chat-form {
    display: flex;
    padding: 15px;
    border-top: 2px solid var(--pipboy-green);
    background: rgba(0, 255, 0, 0.05);
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: 1px solid var(--pipboy-green);
    color: var(--pipboy-green);
    padding: 12px 15px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-input::placeholder {
    color: rgba(0, 255, 0, 0.4);
}

.chat-input:focus {
    box-shadow: 0 0 10px var(--pipboy-glow);
}

.chat-submit {
    background: transparent;
    border: 2px solid var(--pipboy-green);
    color: var(--pipboy-green);
    padding: 12px 20px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
}

.chat-submit:hover {
    background: var(--pipboy-green);
    color: #000;
    box-shadow: 0 0 15px var(--pipboy-glow);
}

.scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 3px
    );
    animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

@media (max-width: 768px) {
    .chat-btn {
        padding: 10px 25px;
        font-size: 1rem;
    }

    .chat-wrapper {
        width: 95vw;
        height: 90vh;
        max-height: none;
        border-width: 2px;
    }

    .chat-header {
        padding: 10px;
    }

    .header-title {
        font-size: 1rem;
    }

    .header-subtitle {
        font-size: 0.6rem;
    }

    .chat-output {
        padding: 15px;
    }

    .message {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .chat-form {
        padding: 10px;
    }

    .chat-input {
        padding: 10px;
        font-size: 0.85rem;
    }

    .chat-submit {
        padding: 10px 15px;
        font-size: 0.75rem;
    }
}
</style>