:root {
  --bg: #11100e;
  --panel: #191715;
  --panel-2: #22201d;
  --text: #fff8ec;
  --muted: #cabda9;
  --line: rgba(255, 248, 236, 0.14);
  --accent: #d7a45f;
  --accent-2: #7fb069;
  --danger: #e76f51;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(17, 16, 14, 0.94), rgba(17, 16, 14, 0.74)),
    url("https://roadhousegrillbar.de/wp-content/uploads/2026/06/roadhouse-interior-3.jpg") center / cover fixed;
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: end;
  min-height: 190px;
  padding: 20px 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small,
.eyebrow,
.notice,
.entry-notice {
  color: var(--muted);
}

.hero-copy {
  max-width: 720px;
}

.hero-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.language-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.language-field select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 10px;
}

.language-field option {
  color: #17110a;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
}

.hero-copy p:last-child {
  margin-bottom: 0;
  max-width: 620px;
  color: #f1e4d1;
  font-size: 17px;
}

.entry-panel,
.chat-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 23, 21, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.entry-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-height: 560px;
}

.entry-panel.is-choosing {
  grid-template-columns: 1fr;
  min-height: 430px;
}

.entry-main {
  padding: 24px;
}

.entry-choice {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 0;
}

.entry-choice h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.entry-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.entry-choice-card {
  min-height: 150px;
  border: 1px solid rgba(215, 164, 95, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 236, 0.06);
  color: var(--text);
  padding: 18px;
  text-align: left;
}

.entry-choice-card:hover {
  border-color: rgba(215, 164, 95, 0.78);
  background: rgba(215, 164, 95, 0.13);
}

.entry-choice-card strong,
.entry-choice-card span {
  display: block;
}

.entry-choice-card strong {
  margin-bottom: 8px;
  font-size: 20px;
}

.entry-choice-card span {
  color: var(--muted);
  line-height: 1.45;
}

.back-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 800;
  padding: 0 12px;
  margin-bottom: 18px;
}

.tabs,
.client-switch {
  display: none;
  grid-auto-flow: column;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.tab,
.switch-button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 0 14px;
}

.tab.is-active,
.switch-button.is-active {
  background: var(--accent);
  color: #1b1208;
}

.entry-mode {
  display: none;
  max-width: 620px;
  margin-top: 28px;
}

.entry-mode.is-active {
  display: block;
}

.entry-mode p,
.rules-card li {
  color: #eadcc8;
  line-height: 1.55;
}

label {
  display: block;
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
  padding: 12px 13px;
}

textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
  padding: 12px 13px;
  font: inherit;
}

input:focus {
  border-color: var(--accent);
}

textarea:focus {
  border-color: var(--accent);
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.avatar-row.compact {
  margin: 10px 0 8px;
}

.avatar-preview,
.message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 248, 236, 0.18);
  border-radius: 50%;
  color: #17110a;
  font-weight: 900;
  overflow: hidden;
  text-align: center;
}

.avatar-preview.small {
  width: 46px;
  height: 46px;
}

.avatar-preview.tiny {
  width: 34px;
  height: 34px;
  border-width: 1px;
  font-size: 12px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-button {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  padding: 0 14px;
}

.primary-action,
.composer button,
#logoutButton {
  border: 0;
  border-radius: 7px;
  font-weight: 800;
}

.primary-action {
  min-height: 46px;
  background: var(--accent);
  color: #1b1208;
  padding: 0 18px;
}

.rules-card {
  border-left: 1px solid var(--line);
  background: rgba(16, 15, 14, 0.74);
  padding: 24px;
}

.rules-card ul {
  margin: 18px 0;
  padding-left: 20px;
}

.rules-card li + li {
  margin-top: 10px;
}

.rules-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 18px;
  color: var(--text);
}

.rules-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.entry-notice {
  min-height: 23px;
  margin: 14px 0 0;
  font-size: 13px;
}

.entry-notice.is-active {
  color: #ffe0a8;
}

.chat-panel {
  display: grid;
  grid-template-columns: 330px 1fr;
  min-height: 650px;
}

.chat-panel.is-locked {
  display: none;
}

.rooms {
  border-right: 1px solid var(--line);
  background: rgba(16, 15, 14, 0.72);
  padding: 18px;
}

.profile-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 236, 0.06);
}

.profile-editor {
  margin-top: 12px;
  border: 1px solid rgba(215, 164, 95, 0.28);
  border-radius: 8px;
  background: rgba(215, 164, 95, 0.06);
  padding: 12px;
}

.profile-editor h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.profile-editor label {
  margin-top: 10px;
}

.profile-editor input,
.profile-editor textarea {
  padding: 10px 11px;
  font-size: 14px;
}

#saveProfileButton {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #1b1208;
  font-weight: 900;
}

.profile-card strong,
.profile-card small {
  display: block;
}

.profile-card small {
  color: var(--muted);
}

#logoutButton {
  min-height: 34px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0 10px;
}

.room-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.online-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 236, 0.045);
  padding: 12px;
}

.online-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.online-head h3 {
  margin: 0;
  font-size: 15px;
}

.online-head button,
.online-user {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.online-head button {
  min-height: 32px;
  padding: 0 10px;
  font-weight: 800;
}

.online-list {
  display: grid;
  gap: 7px;
  max-height: 210px;
  overflow-y: auto;
}

.online-user {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  min-height: 50px;
  padding: 7px;
  text-align: left;
}

.online-user.is-active {
  border-color: rgba(215, 164, 95, 0.86);
  background: rgba(215, 164, 95, 0.18);
}

.online-user:disabled {
  cursor: default;
  opacity: 0.72;
}

.online-user strong,
.online-user small {
  display: block;
}

.online-user small {
  color: var(--muted);
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.68);
  padding: 18px;
}

.profile-modal__panel {
  position: relative;
  width: min(430px, 100%);
  border: 1px solid rgba(215, 164, 95, 0.42);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(25, 23, 21, 0.98), rgba(13, 12, 11, 0.98));
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 24px;
  text-align: center;
}

.profile-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.modal-avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  font-size: 28px;
}

.modal-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-modal h2 {
  margin: 0 0 6px;
}

#modalUsername,
#modalBio,
.modal-meta {
  color: var(--muted);
}

#modalBio {
  min-height: 24px;
  line-height: 1.5;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.modal-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 900;
}

.modal-actions button:first-child {
  border: 0;
  background: var(--accent);
  color: #1b1208;
}

.room-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.room-button.is-active {
  border-color: rgba(215, 164, 95, 0.8);
  background: rgba(215, 164, 95, 0.16);
}

.room-button strong,
.room-button small {
  display: block;
}

.room-button small {
  margin-top: 3px;
  color: var(--muted);
}

.room-button em {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(127, 176, 105, 0.18);
  color: #cae8bd;
  font-style: normal;
  font-weight: 800;
}

.conversation {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-width: 0;
}

.conversation-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}

.conversation-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.conversation-head h2 {
  margin: 4px 0 0;
  font-size: 28px;
}

#onlineCount {
  white-space: nowrap;
  color: #cae8bd;
}

.messages {
  overflow-y: auto;
  padding: 20px 22px;
}

.message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  max-width: 820px;
  margin-bottom: 14px;
}

.message-content {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 13px 14px 36px;
}

.message-client .message-content {
  border-color: rgba(215, 164, 95, 0.42);
}

.message-private .message-content {
  border-color: rgba(215, 164, 95, 0.78);
  background:
    linear-gradient(135deg, rgba(215, 164, 95, 0.16), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 0 0 1px rgba(215, 164, 95, 0.08);
}

.message-top {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.message-top span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.message-top em {
  border-radius: 99px;
  background: rgba(127, 176, 105, 0.16);
  color: #cae8bd;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
}

.message-top .private-to {
  color: #f5d39e;
  font-size: 12px;
}

.message-guest .message-top em {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.message p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.report {
  position: absolute;
  right: 10px;
  bottom: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.report:hover {
  color: var(--danger);
}

.composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 16px 22px;
  position: relative;
}

.composer button {
  background: var(--accent);
  color: #1b1208;
  padding: 0 16px;
}

.private-bar,
.emoji-picker {
  grid-column: 1 / -1;
}

.private-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  border: 1px solid rgba(215, 164, 95, 0.5);
  border-radius: 7px;
  background: rgba(215, 164, 95, 0.14);
  color: #ffe0a8;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.private-bar button,
.emoji-toggle {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.private-bar button {
  min-height: 28px;
  padding: 0 10px;
}

.emoji-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 20px;
}

.emoji-picker {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 15, 14, 0.96);
  padding: 8px;
}

.emoji-picker button {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid rgba(255, 248, 236, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 18px;
  padding: 0;
}

.notice {
  min-height: 23px;
  margin: 0;
  padding: 0 22px 16px;
  font-size: 13px;
}

.notice.is-active {
  color: #ffe0a8;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 18px, 720px);
    padding: 14px 0;
  }

  .hero,
  .entry-panel,
  .chat-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 18px;
    min-height: 0;
  }

  .hero-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand img {
    width: 58px;
    height: 58px;
  }

  h1 {
    font-size: 38px;
  }

  .rules-card {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .chat-panel {
    min-height: auto;
  }

  .rooms {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .room-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .online-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .room-button {
    min-height: 74px;
  }

  .messages {
    height: 54vh;
    padding: 16px;
  }

  .conversation-head,
  .composer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 560px) {
  .entry-main,
  .rules-card {
    padding: 16px;
  }

  .tabs,
  .client-switch,
  .entry-choice-grid {
    width: 100%;
    grid-auto-flow: row;
  }

  .entry-choice-grid {
    grid-template-columns: 1fr;
  }

  .room-list {
    grid-template-columns: 1fr;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .emoji-picker {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .composer button {
    min-height: 44px;
  }

  h1 {
    font-size: 33px;
  }
}
