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

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f9fafb;
  color: #111;
}

.chat-wrapper {
  max-width: 600px;
  margin: 1rem auto;
  display: flex;
  flex-direction: column;
  height: 90vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.1);
  overflow: hidden;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f3f4f6;
}

.msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #e5e7eb;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: inset 0 0 5px rgb(0 0 0 / 0.05);
}

.msg.system {
  background: #d1fae5;
  font-style: italic;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.owner-avatar {
  border-color: #f59e0b;
}

.content {
  flex: 1;
  word-break: break-word;
}

.nick {
  font-weight: bold;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nick.owner {
  background: linear-gradient(90deg, #f87171, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}

.nick.global {
  background: linear-gradient(90deg, #34d399, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.checkmark {
  color: #10b981;
  font-weight: 900;
  font-size: 1.1em;
}

.form-section {
  padding: 14px 16px;
  background: #ccc;
  border-top: 1px solid #000000;
}

.input-area {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.input-area textarea {
  flex: 1;
  min-height: 60px;
  padding: 10px 12px;
  font-size: 16px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  resize: vertical;
  transition: border-color 0.3s;
}

.input-area textarea:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 5px rgba(59,130,246,0.5);
}

.input-area button {
  background: #3b82f6;
  color: white;
  font-size: 22px;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.input-area button:hover {
  background: #2563eb;
}

.settings {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  font-size: 14px;
  color: #555;
}

.settings label {
  flex-shrink: 0;
}

.settings input[type="text"] {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1.2px solid #ccc;
  width: 120px;
  transition: border-color 0.3s;
}

.settings input[type="text"]:focus {
  border-color: #3b82f6;
  outline: none;
}

.settings input[type="color"] {
  width: 40px;
  height: 32px;
  border: none;
  cursor: pointer;
}

.settings input[type="file"] {
  cursor: pointer;
}

.active-users {
  text-align: center;
  font-weight: bold;
  padding: 8px;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
}

.commands-list {
  background: #f3f4f6;
  padding: 10px 16px;
  font-size: 14px;
  color: #666;
  border-top: 1px solid #ddd;
  max-height: 80px;
  overflow-y: auto;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .chat-wrapper {
    height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  .input-area textarea {
    font-size: 14px;
  }
  .settings {
    font-size: 13px;
  }
}

/* === Dark mode === */
body.dark-mode {
  background-color: #111827;
  color: #f3f4f6;
}

body.dark-mode .chat-wrapper {
  background: #1f2937;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.05);
}

body.dark-mode .messages {
  background: #1f2937;
}

body.dark-mode .msg {
  background-color: #374151;
  border-color: #4b5563;
}

body.dark-mode .msg.system {
  background: #064e3b;
  color: #d1fae5;
}

body.dark-mode .input-area textarea,
body.dark-mode .input-area button,
body.dark-mode input[type="text"] {
  background-color: #1f2937;
  color: #f3f4f6;
  border-color: #4b5563;
}

body.dark-mode .input-area button {
  background: #2563eb;
}

body.dark-mode .input-area button:hover {
  background: #1d4ed8;
}

body.dark-mode .settings label,
body.dark-mode .commands-list {
  color: #ccc;
}

body.dark-mode .commands-list {
  background: #111827;
  border-top-color: #374151;
}

/* === Pastel mode === */
body.pastel-mode {
  background-color: #fffafc;
  color: #444;
}

body.pastel-mode .chat-wrapper {
  background: #fdfdfe;
  box-shadow: 0 8px 24px rgba(200, 170, 200, 0.2);
}

body.pastel-mode .messages {
  background: #fce7f3;
}

body.pastel-mode .msg {
  background-color: #fde68a;
  border-color: #fbcfe8;
}

body.pastel-mode .msg.system {
  background: #bbf7d0;
  color: #065f46;
}

body.pastel-mode .input-area textarea,
body.pastel-mode .input-area button,
body.pastel-mode input[type="text"] {
  background-color: #fdf4ff;
  color: #333;
  border-color: #e9d5ff;
}

body.pastel-mode .input-area button {
  background: #a78bfa;
  color: white;
}

body.pastel-mode .input-area button:hover {
  background: #7c3aed;
}

body.pastel-mode .settings label,
body.pastel-mode .commands-list {
  color: #6b7280;
}

body.pastel-mode .commands-list {
  background: #e0f2fe;
  border-top-color: #bae6fd;
}

/* === Neon mode === */
body.neon-mode {
  background-color: #0d0d0d;
  color: #f8f8f8;
}

body.neon-mode .chat-wrapper {
  background: #111;
  box-shadow: 0 0 20px rgba(0,255,255,0.4);
}

body.neon-mode .messages {
  background: #0d0d0d;
}

body.neon-mode .msg {
  background: #1a1a1a;
  border: 1px solid #0ff;
  color: #0ff;
  text-shadow: 0 0 4px #0ff, 0 0 8px #0ff;
}

body.neon-mode .msg.system {
  background: #111;
  color: #ff00ff;
  text-shadow: 0 0 6px #ff00ff;
}

body.neon-mode .input-area textarea,
body.neon-mode .input-area button,
body.neon-mode input[type="text"] {
  background-color: #000;
  color: #0ff;
  border-color: #0ff;
  text-shadow: 0 0 4px #0ff;
}

body.neon-mode .input-area button {
  background: #ff00ff;
  color: #fff;
  text-shadow: 0 0 6px #ff00ff;
}

body.neon-mode .input-area button:hover {
  background: #ff1493;
}

body.neon-mode .settings label,
body.neon-mode .commands-list {
  color: #39ff14;
  text-shadow: 0 0 6px #39ff14;
}

body.neon-mode .commands-list {
  background: #000;
  border-top: 1px solid #0ff;
}

body.cutemode {
  background-color: #fb87ff;
  color: #4a044e;
}

body.cutemode .chat-wrapper {
  background: #ffe4f1;
  box-shadow: 0 0 20px rgba(255, 182, 193, 0.6);
  border: 2px solid #fbcfe8;
}

body.cutemode .messages {
  background: #fdbfff;
}

body.cutemode .msg {
  background-color: #fbcfe8;
  border: 1px solid #f472b6;
  color: #4a044e;
}

body.cutemode .msg.system {
  background: #fecdd3;
  color: #831843;
  font-style: italic;
}

body.cutemode .input-area textarea,
body.cutemode .input-area button,
body.cutemode input[type="text"] {
  background-color: #fff0f6;
  color: #4a044e;
  border-color: #fa68ff;
}

body.cutemode .input-area button {
  background: #f472b6;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 0 6px rgba(244, 114, 182, 0.6);
}

body.cutemode .input-area button:hover {
  background: #ec4899;
}

body.cutemode .settings label,
body.cutemode .commands-list {
  color: #fa68ff;
}

body.cutemode .commands-list {
  background: #ffe4f1;
  border-top-color: #f9a8d4;
}

/* === Sekcja wiadomości do właściciela === */
.wiadomosci {
  max-width: 600px;
  margin: 2rem auto;
  padding: 16px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wiadomosci h2 { font-size: 1.3rem; text-align:center; }
.wiadomosci input, .wiadomosci textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1.5px solid #ccc; font-size: 15px;
}
.wiadomosci button {
  align-self: flex-start; background: #3b82f6; color: #fff;
  border: none; border-radius: 8px; padding: 10px 18px;
  font-size: 15px; cursor: pointer;
}
.wiadomosci button:hover { background: #2563eb; }

/* Dark mode */
body.dark-mode .wiadomosci { background:#1f2937; }
body.dark-mode .wiadomosci input,
body.dark-mode .wiadomosci textarea { background:#111827; color:#f3f4f6; border-color:#374151; }
body.dark-mode .wiadomosci button { background:#2563eb; }

/* Pastel mode */
body.pastel-mode .wiadomosci { background:#fdf4ff; }
body.pastel-mode .wiadomosci input,
body.pastel-mode .wiadomosci textarea { background:#fff; border-color:#e9d5ff; }
body.pastel-mode .wiadomosci button { background:#a78bfa; }
body.pastel-mode .wiadomosci button:hover { background:#7c3aed; }

/* Neon mode */
body.neon-mode .wiadomosci { background:#111; border:1px solid #0ff; box-shadow:0 0 12px #0ff; }
body.neon-mode .wiadomosci input,
body.neon-mode .wiadomosci textarea { background:#000; color:#0ff; border-color:#0ff; }
body.neon-mode .wiadomosci button { background:#ff00ff; }
body.neon-mode .wiadomosci button:hover { background:#ff1493; }

/* Cute mode */
body.cutemode .wiadomosci { background:#fdbaff; border:2px solid #fbcfe8; }
body.cutemode .wiadomosci input,
body.cutemode .wiadomosci textarea { background:#fff0f6; border-color:#f9a8d4; color:#4a044e; }
body.cutemode .wiadomosci button { background:#f472b6; font-weight:bold; }
body.cutemode .wiadomosci button:hover { background:#ec4899; }

.badge {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 6px;
}
.badge.nowy { background: #d1d5db; color: #111; }
.badge.aktywny { background: #3b82f6; color: white; }
.badge.pro { background: #10b981; color: white; }
.badge.legenda { background: gold; color: #111; }

.reactions {
  margin-top: 6px;
  display: flex;
  gap: 6px;
}
.reactions button {
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 2px 6px;
  cursor: pointer;
}
.reactions button:hover {
  background: #eee;
}
