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

:root {
  color-scheme: dark;
  --background: #0b0b0d;
  --surface: #151518;
  --surface-light: #202024;
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --accent: #ed334e;
  --border: #29292e;
}

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

/* Welcome screen */

.welcome {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  margin: auto;
  padding: 45px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 24px;
  margin-bottom: 28px;
}

.welcome h1 {
  font-size: clamp(27px, 7vw, 36px);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
}

.welcome > p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 25px;
}

input,
textarea {
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  outline: none;
}

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

input::placeholder,
textarea::placeholder {
  color: #777780;
}

button {
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

button:hover {
  opacity: 0.9;
}

button:active {
  transform: scale(0.98);
}

.welcome > button {
  width: 100%;
  margin-top: 10px;
  padding: 15px;
  letter-spacing: 1px;
}

#message,
#answerMessage {
  color: var(--accent);
  font-size: 13px;
  margin-top: 12px;
}

/* Main app header */

#app {
  width: 100%;
  max-width: 760px;
  min-height: 100vh;
  margin: auto;
  padding-bottom: 25px;
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 11, 13, 0.96);
}

.header-logo {
  width: 43px;
  height: 43px;
  object-fit: contain;
  border-radius: 10px;
}

header h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}

/* Navigation */

nav {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

nav button {
  flex: 1;
  padding: 11px 8px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
}

nav button:hover {
  background: var(--surface-light);
  color: white;
}

/* Content */

main {
  padding: 24px 18px;
}

.tab h2 {
  font-size: 25px;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.tab > p {
  color: var(--muted);
  margin-bottom: 18px;
}

#feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty {
  padding: 28px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
}

textarea {
  display: block;
  min-height: 150px;
  resize: vertical;
}

#qa button {
  width: 100%;
  margin-top: 8px;
}

#about p {
  padding: 16px;
  margin: 12px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Footer */

footer {
  padding: 22px 15px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* Small screens */

@media (max-width: 380px) {
  .welcome {
    padding: 30px 18px;
  }

  .logo {
    width: 125px;
    height: 125px;
  }

  header h2 {
    font-size: 18px;
  }

  main {
    padding: 20px 14px;
  }
}