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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  color: #1a1a2e;
  line-height: 1.5;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

header h1 {
  font-size: 1.25rem;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  color: inherit;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab.active {
  color: #1a1a2e;
  border-bottom-color: #1a1a2e;
  font-weight: 600;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.panel[hidden] {
  display: none;
}

label {
  font-size: 0.875rem;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  font-family: inherit;
  min-height: 44px;
}

textarea {
  resize: vertical;
}

input[type="file"] {
  font-size: 1rem;
  padding: 0.5rem 0;
}

.btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  min-height: 44px;
  font-weight: 600;
}

.btn.primary {
  background: #1a1a2e;
  color: #fff;
}

.btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#image-preview img {
  max-width: 100%;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.status.success {
  background: #d4edda;
  color: #155724;
}

.status.error {
  background: #f8d7da;
  color: #721c24;
}

.status.loading {
  background: #fff3cd;
  color: #856404;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feed-header h2 {
  font-size: 1rem;
}

.feed-header .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  min-height: auto;
  background: #e0e0e0;
  color: #1a1a2e;
  border-radius: 0.5rem;
}

.mention {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.mention:last-child {
  border-bottom: none;
}

.mention-header {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.mention-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mention-meta {
  font-size: 0.875rem;
  line-height: 1.4;
}

.mention-meta a {
  color: inherit;
  text-decoration: underline;
}

.mention-time {
  display: block;
  font-size: 0.75rem;
  color: #888;
}

.mention-body {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #444;
  padding-left: 44px;
}

#feed-empty {
  font-size: 0.875rem;
  color: #888;
  text-align: center;
  padding: 2rem 0;
}

#feed-empty a {
  color: inherit;
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  body {
    background: #1a1a2e;
    color: #e0e0e0;
  }

  input[type="text"],
  input[type="password"],
  textarea {
    background: #2a2a3e;
    border-color: #444;
    color: #e0e0e0;
  }

  .tabs {
    border-bottom-color: #444;
  }

  .tab {
    color: #888;
  }

  .tab.active {
    color: #e0e0e0;
    border-bottom-color: #e0e0e0;
  }

  .btn.primary {
    background: #e0e0e0;
    color: #1a1a2e;
  }

  .status.success {
    background: #1e3a2f;
    color: #a3d9a5;
  }

  .status.error {
    background: #3a1e1e;
    color: #d9a3a3;
  }

  .status.loading {
    background: #3a351e;
    color: #d9cfa3;
  }

  .feed-header .btn {
    background: #3a3a4e;
    color: #e0e0e0;
  }

  .mention {
    border-bottom-color: #444;
  }

  .mention-body {
    color: #aaa;
  }
}
