*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #000;
    overflow: hidden;
    font-family: "Courier New", monospace;
}

#stage {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.fact {
    position: absolute;
    left: 0;
    top: 0;
    color: #00ff88;
    font-size: 1.4rem;
    padding: 6px 12px;
    border: 1px solid #00ff88;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.85);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.25), inset 0 0 5px rgba(0, 255, 136, 0.15);
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
    max-width: 380px;
    white-space: normal;
    /* allow wrapping */
    word-wrap: break-word;
    line-height: 1.3;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    will-change: transform;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* GPU-accelerated glow overlay */
.fact::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid #00ff88;
    border-radius: 4px;
    pointer-events: none;
    box-shadow: 0 0 22px rgba(0, 255, 136, 0.55), inset 0 0 10px rgba(0, 255, 136, 0.35);
    animation: glow-pulse 3s ease-in-out infinite alternate;
    will-change: opacity;
    opacity: 0;
}

@keyframes glow-pulse {
    from {
        opacity: 0.1;
    }
    to {
        opacity: 0.9;
    }
}

#submit-form {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    max-width: 500px;
    width: calc(100% - 32px);
    z-index: 10000;
}

#fact-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #00ff88;
    border-radius: 4px;
    color: #00ff88;
    font-family: "Courier New", monospace;
    font-size: 1rem;
    padding: 10px 14px;
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.15), inset 0 0 5px rgba(0, 255, 136, 0.05);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

#fact-input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.35), inset 0 0 10px rgba(0, 255, 136, 0.15);
}

#submit-btn {
    background: #00ff88;
    color: #000;
    border: 1px solid #00ff88;
    border-radius: 4px;
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 1rem;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

#submit-btn:hover {
    background: #000;
    color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

/* Highly responsive adjustments for mobile and tablets */
@media (max-width: 600px) {
    #submit-form {
        bottom: 12px;
        width: calc(100% - 24px);
        gap: 6px;
    }
    #fact-input {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    #submit-btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}