.hidden {
  display: none !important;
}

/* Login screen */
.login-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  gap: 15px;
  background: var(--bg-color);
  color: var(--text-light);
}

.login-screen input,
.login-screen select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--input-bg);
  color: var(--input-text);
  width: 220px;
}

.login-screen button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

/* Lobby */
.lobby-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  gap: 20px;
  background: var(--bg-color);
  color: var(--text-light);
}

.lobby-screen button {
  padding: 12px 24px;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.exit-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: red;
  color: white;
  cursor: pointer;
}

/* === THEME VARIABLES === */
:root {
  --bg-color: #121212;
  --chat-bg: #1e1e1e;
  --bubble-me: #356aff;
  --bubble-other: #2a2a2a;
  --text-light: #ffffff;
  --accent: #356aff;
  --accent-dark: #274bb5;
  --input-bg: #2c2c2c;
  --input-text: #ffffff;
}

body.light {
  --bg-color: #f0f0f0;
  --chat-bg: #ffffff;
  --bubble-me: #0078ff;
  --bubble-other: #e0e0e0;
  --text-light: #000000;
  --accent: #0078ff;
  --accent-dark: #005bbb;
  --input-bg: #ffffff;
  --input-text: #000000;
}

body.relax {
  --bg-color: #f2efe6;
  --chat-bg: #faf8f2;
  --bubble-me: #b5d8cf;
  --bubble-other: #d9cfc1;
  --text-light: #2b2b2b;
  --accent: #6c9a8b;
  --accent-dark: #52756a;
  --input-bg: #ffffff;
  --input-text: #2b2b2b;
}

body.hacker {
  --bg-color: #000000;
  --chat-bg: #0a0a0a;
  --bubble-me: transparent;
  --bubble-other: transparent;
  --text-light: #00ff00;
  --accent: #00ff00;
  --accent-dark: #009900;
  --input-bg: #000000;
  --input-text: #00ff00;
}

/* === LAYOUT WRAPPER === */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: var(--bg-color);
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  color: var(--text-light);
}

.wrapper {
  display: flex;
  height: 100vh;
  width: 100%;
}

.main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.chat-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* === CHAT UI === */
.chat-header {
  background: var(--accent);
  color: var(--text-light);
  padding: 15px;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  position: relative;
}

.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: var(--chat-bg);
}

.chat-message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.4;
  background: var(--bubble-other);
  color: var(--text-light);
  align-self: flex-start;
  word-wrap: break-word;
}

.chat-message.me {
  align-self: flex-end;
  background: var(--bubble-me);
}

.name-label {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 4px;
  display: block;
}

.translate-btn {
  margin-top: 5px;
  padding: 3px 8px;
  font-size: 0.75rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: 0.2s;
}

.translate-btn.toggled {
  background: black;
}

.chat-footer {
  padding: 10px;
  display: flex;
  gap: 10px;
  border-top: 1px solid #333;
  background: var(--chat-bg);
}

.chat-footer input {
  flex: 1;
  padding: 12px;
  border-radius: 25px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--input-text);
}

.chat-footer button {
  padding: 0 18px;
  border: none;
  border-radius: 25px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.2s;
}

.chat-footer button:hover {
  background: var(--accent-dark);
}

select {
  padding: 8px;
  border-radius: 8px;
  border: none;
  background: var(--input-bg);
  color: var(--input-text);
  font-size: 0.9rem;
}

/* === SIDE PANEL === */
.side-panel-toggle {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--accent);
  border: none;
  border-radius: 5px 0 0 5px;
  outline: none;
  cursor: pointer;
  z-index: 20;
  font-size: 1.3rem;
}

.side-panel-toggle:hover {
  background: var(--accent-dark);
}

.side-panel {
  display: none;
  width: 260px;
  flex-shrink: 0;
  padding: 20px;
  color: var(--text-light);
  background: var(--chat-bg);
  border-left: 2px solid var(--accent);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
  overflow-y: auto;
  z-index: 15;
}

.side-panel-open .side-panel {
  display: block;
}

.panel-section {
  margin-bottom: 20px;
}

.panel-section h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: var(--accent);
}

#dictionary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#dictionary-list li {
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--bubble-other);
  word-wrap: break-word;
}

/* === Hacker mode overrides === */
body.hacker .chat-header,
body.hacker .chat-footer input,
body.hacker .chat-footer button,
body.hacker select,
body.hacker .translate-btn,
body.hacker .side-panel-toggle,
body.hacker .side-panel {
  color: #00ff00 !important;
  background: transparent !important;
  border: 1px solid #00ff00 !important;
}

body.hacker .name-label {
  color: #00ff00 !important;
}

body.hacker .chat-message,
body.hacker .chat-message.me,
body.hacker #dictionary-list li {
  background: transparent !important;
  border: 1px solid #00ff00 !important;
  color: #00ff00 !important;
}

/* Force dropdown in hacker mode */
body.hacker select {
  background: #000000 !important;
  color: #00ff00 !important;
  border: 1px solid #00ff00 !important;
  appearance: none; /* removes default system arrow styling */
  padding: 6px 10px;
  border-radius: 6px;
}

.google-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: #4285f4;
  color: white;
  cursor: pointer;
  margin-bottom: 15px;
}

.google-btn:hover {
  background: #357ae8;
}

.email-login input {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--input-bg);
  color: var(--input-text);
  width: 220px;
  margin-bottom: 10px;
}

.email-login button {
  padding: 8px 16px;
  margin: 5px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

