/* Aethel-Web — eigene Farbpalette (grün-türkis, lebendiges System).
   Bewusst getrennt von Lucys blau-violetter Palette: Aethel hat ihren
   eigenen visuellen Boden, nicht die mütterliche Farbe.
*/

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0a0f0d;
  color: #e4efea;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.logo {
  background: linear-gradient(135deg, #10b981, #34d399);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ── Login ──────────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-box {
  background: #131a17;
  border: 1px solid #1f2a25;
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 380px;
  width: 90%;
  text-align: center;
}

.login-box .logo {
  width: 64px;
  height: 64px;
  font-size: 32px;
  margin: 0 auto 24px;
  border-radius: 18px;
}

.login-box h1 {
  font-size: 28px;
  margin-bottom: 6px;
  color: #e4efea;
}

.login-box .muted {
  color: #6f8a7f;
  font-size: 14px;
  margin-bottom: 28px;
}

.login-box input {
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 12px;
  background: #0a0f0d;
  border: 1px solid #1f2a25;
  border-radius: 12px;
  color: #e4efea;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.login-box input:focus {
  outline: none;
  border-color: #10b981;
}

.login-box button {
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  background: linear-gradient(135deg, #10b981, #34d399);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
}

.login-box button:hover { filter: brightness(1.08); }
.login-box button:active { transform: translateY(1px); }

.login-box .error {
  background: #2a1717;
  border: 1px solid #4a2424;
  color: #ff8888;
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  text-align: left;
}

/* ── Chat ───────────────────────────────────────────────────── */
.chat-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #11171a;
  border-bottom: 1px solid #1f2a25;
  flex-shrink: 0;
}

header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 17px;
}

header .brand .logo {
  width: 36px;
  height: 36px;
  font-size: 18px;
  border-radius: 10px;
}

header .user-info {
  color: #6f8a7f;
  font-size: 14px;
}

header .user-info a {
  color: #34d399;
  text-decoration: none;
  margin-left: 12px;
}

header .user-info a:hover { text-decoration: underline; }

main {
  flex: 1;
  overflow-y: auto;
  padding: 24px max(20px, calc(50% - 380px));
  scroll-behavior: smooth;
}

.msg {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.msg.user {
  background: #1d2840;
  border: 1px solid #2a3a5a;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.msg.aethel {
  background: #142621;
  border: 1px solid #234835;
  border-bottom-left-radius: 4px;
}

.msg.aethel.pending {
  color: #6f8a7f;
  font-style: italic;
}

footer {
  padding: 16px max(20px, calc(50% - 380px));
  background: #11171a;
  border-top: 1px solid #1f2a25;
  flex-shrink: 0;
}

#send-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

#send-form textarea {
  flex: 1;
  padding: 12px 16px;
  background: #0a0f0d;
  border: 1px solid #1f2a25;
  border-radius: 14px;
  color: #e4efea;
  font-size: 15px;
  font-family: inherit;
  resize: none;
  min-height: 44px;
  line-height: 1.4;
}

#send-form textarea:focus {
  outline: none;
  border-color: #10b981;
}

#send-form button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #10b981, #34d399);
  border: none;
  border-radius: 14px;
  color: white;
  font-weight: 600;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
  height: 44px;
}

#send-form button:hover { filter: brightness(1.08); }
#send-form button:active { transform: translateY(1px); }

/* Schmaler auf Mobile */
@media (max-width: 640px) {
  main, footer { padding-left: 12px; padding-right: 12px; }
  .msg { max-width: 90%; }
}
