:root {
    --deep-blue: #004e92; --teal: #00ced1; --mint: #08dfc8; 
    --black: #000000; --yellow: #FFEB3B; --pink: #FF91AF; --red: #FF5252;
}

* { box-sizing: border-box; }

body, html { margin: 0; padding: 0; height: 100dvh; width: 100%; font-family: 'Arial Black', sans-serif; background: white; overflow-x: hidden; }

.gradient-bg {
    background: linear-gradient(180deg, var(--deep-blue) 0%, var(--teal) 50%, var(--mint) 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px;
}

.container { width: 100%; max-width: 800px; margin: auto; }

.card {
    background: white; border: 6px solid var(--black); box-shadow: 12px 12px 0px var(--black);
    margin-bottom: 30px; width: 100%; max-width: 500px; overflow: hidden; display: block;
}
.card-header { background: var(--black); color: white; padding: 15px; text-align: center; font-size: 24px; text-transform: uppercase; }

label { display: block !important; width: 100%; font-size: 14px; font-weight: 900; margin: 15px 0 5px 0; text-transform: uppercase; text-align: center; }
input, textarea {
    display: block !important; width: 100% !important; border: 4px solid var(--black); 
    padding: 15px; margin-bottom: 10px; font-size: 18px; background: white;
    font-family: Arial, sans-serif; font-weight: bold;
}
textarea { height: 100px; resize: none; }

button, .btn-act {
    display: block; width: 100%; background: var(--yellow); border: 4px solid var(--black);
    padding: 15px; font-weight: 900; box-shadow: 5px 5px 0px var(--black); cursor: pointer; transition: 0.1s; text-transform: uppercase;
}
button:active { transform: translate(3px, 3px); box-shadow: none; }

.chat-item-box {
    display: flex; align-items: center; border: 4px solid black; padding: 15px;
    text-decoration: none; color: black; background: white; box-shadow: 6px 6px 0px black;
    margin-bottom: 15px; transition: 0.1s; width: 100%;
}

/* --- CHAT ROOM CORE STYLES --- */
.chat-window { display: flex; flex-direction: column; height: 100dvh; width: 100vw; border: 8px solid black; background: white; overflow: hidden; }

.cat-header-overlay {
    position: relative; width: 100%; height: 120px; border-bottom: 6px solid black; flex-shrink: 0;
}
.header-bg-img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; z-index: 1; }

.header-content {
    position: relative; z-index: 2; width: 100%; height: 100%; 
    background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}

.room-name-box { background: white; border: 4px solid black; padding: 5px 20px; box-shadow: 5px 5px 0px black; }
.room-name-text { font-size: 20px; margin: 0; text-transform: uppercase; }

#chat-box { flex-grow: 1; overflow-y: auto; background: white; padding: 10px 0; display: flex; flex-direction: column; }

.msg { display: flex; padding: 10px 25px; width: 100%; gap: 12px; align-items: flex-start; }
.msg.is-me { flex-direction: row-reverse; text-align: right; }
.avatar { width: 50px; height: 50px; border: 3px solid var(--black); border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-user { font-size: 16px; font-weight: 900; text-transform: uppercase; color: var(--teal); }
.msg.is-me .msg-user { color: var(--pink); }
.msg-text { font-family: Arial; font-weight: normal; font-size: 24px; text-transform: none; line-height: 1.2; color: black; }
.chat-img { max-width: 50vw !important; max-height: 50vh !important; border: 4px solid black; box-shadow: 6px 6px 0px black; border-radius: 10px; margin-top: 5px; object-fit: contain; display: block; }

.input-area { background: linear-gradient(90deg, var(--deep-blue) 0%, var(--teal) 50%, var(--mint) 100%); border-top: 6px solid var(--black); padding: 15px 20px; display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
#msgInput { flex-grow: 1; height: 55px; border: 4px solid black; padding: 10px; font-family: Arial; font-weight: bold; font-size: 18px; }

.btn-sq { width: 55px !important; height: 55px !important; background: white; border: 4px solid black; box-shadow: 4px 4px 0px black; cursor: pointer; font-size: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin: 0 !important; }

/* THE GHOST CLICK FIX */
input[type="file"]#fileIn { display: none !important; }

#context-menu, #viewers-modal { position: fixed; display: none; background: white; border: 4px solid black; box-shadow: 6px 6px 0px black; z-index: 1000; width: 140px; }
.menu-item { padding: 10px; cursor: pointer; font-size: 10px; border-bottom: 2px solid black; font-weight: 900; text-align: center; }