:root {
    --imperial-red: #ff3333;
    --imperial-dark-red: #880000;
    --screen-bg: #0a0a0a;
    --text-color: #ff3333;
    --glow: 0 0 5px var(--imperial-red);
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

.container {
    width: 90%;
    max-width: 800px;
    height: 90vh;
    border: 2px solid var(--imperial-red);
    box-shadow: var(--glow);
    background-color: rgba(10, 10, 10, 0.85);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

header {
    border-bottom: 1px solid var(--imperial-red);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: center;
    position: relative; /* Added for absolute positioning of children */
}

h1 {
    margin: 0;
    font-size: 1.5rem;
    text-shadow: var(--glow);
    letter-spacing: 2px;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Clue Box Styles */
.clue-box {
    position: absolute;
    top: 0;
    right: 0;
    border: 1px solid var(--imperial-red);
    padding: 5px 10px;
    font-size: 0.7rem;
    background: rgba(255, 51, 51, 0.1);
    max-width: 150px;
    text-align: right;
}

.clue-title {
    display: block;
    font-weight: bold;
    border-bottom: 1px solid var(--imperial-red);
    margin-bottom: 2px;
}

.status-ok {
    color: #33ff33;
}

.status-active {
    color: #ff3333;
    animation: blink 2s infinite;
}

.status-warning {
    color: #ffff33;
}

.status-offline {
    color: #ff3333;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

#chat-window {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Scrollbar styling */
#chat-window::-webkit-scrollbar {
    width: 8px;
}

#chat-window::-webkit-scrollbar-track {
    background: #000;
}

#chat-window::-webkit-scrollbar-thumb {
    background: var(--imperial-red);
}

.message {
    line-height: 1.4;
    word-wrap: break-word;
}

.prefix {
    font-weight: bold;
    margin-right: 5px;
}

.user-message {
    color: #33ff33;
}

.ai-message {
    color: var(--imperial-red);
    text-shadow: var(--glow);
}

footer {
    border-top: 1px solid var(--imperial-red);
    padding-top: 10px;
}

.input-area {
    display: flex;
    align-items: center;
}

.prompt {
    margin-right: 10px;
    font-weight: bold;
}

input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    outline: none;
}

button {
    background: var(--imperial-red);
    color: #000;
    border: none;
    padding: 5px 15px;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
}

button:hover {
    background: #ff6666;
}

/* Landing Page Styles */
.landing-container {
    justify-content: center;
    text-align: center;
}

.landing-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    gap: 30px;
}

.message-box {
    border: 1px solid var(--imperial-red);
    padding: 20px;
    background: rgba(255, 51, 51, 0.05);
    max-width: 600px;
    text-align: left;
}

.message-box h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--imperial-red);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.message-box p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.warning {
    color: #ffff33;
    font-weight: bold;
    margin-top: 20px;
    text-align: center;
}

.start-btn {
    display: inline-block;
    background: var(--imperial-red);
    color: #000;
    text-decoration: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid var(--imperial-red);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.start-btn:hover {
    background: transparent;
    color: var(--imperial-red);
    box-shadow: 0 0 15px var(--imperial-red);
}

.footer-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.7;
}