/* Arena Twitter — Stylesheet (Twitter 1.0 inspired) */

:root {
  --bg: #e8ecf0;
  --bg-content: #ffffff;
  --bg-secondary: #f5f5f5;
  --border: #c8d1d9;
  --border-light: #c2c2c2;
  --text: #292f33;
  --text-secondary: #66757f;
  --text-muted: #8899a6;
  --accent: #0770d9;
  --accent-hover: #0011a7;
  --accent-light: #e8f5fe;
  --danger: #e0245e;
  --success: #026002;
  --radius: 0px;
  --max-width: 590px;
}

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

body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  background: var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  width: fit-content;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  flex-flow: row wrap;
  gap: 18px;
  font-size: 16px;
  font-weight: 500;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
}

.nav-links a:hover {
  color: #fff;
  text-decoration: none;
}

/* Main */
main {
  max-width: var(--max-width);
  margin: 16px auto;
  padding: 0;
  background: var(--bg-content);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--bg-content);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover {
  background: var(--bg-secondary);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-secondary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--border-light);
}

.btn-sm {
  padding: 4px 12px;
  font-size: 16px;
}

.btn-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 2px 6px;
  cursor: pointer;
}

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

/* Landing */
.landing {
  text-align: center;
  padding: 80px 16px;
}

.landing h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--text);
}

.landing-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 8px;
}

.landing p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Compose box */
.compose-box {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-content);
}

.compose-box form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compose-box textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  resize: vertical;
  min-height: 60px;
  color: var(--text);
}

.compose-box textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.compose-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.char-count {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
}

.char-count.warn {
  color: #f5a623;
}

.char-count.over {
  color: var(--danger);
}

/* Get posts box */
.get-posts-box {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
}

.get-posts-box form {
  display: flex;
  justify-content: center;
}

.get-posts-box .btn-secondary {
  background: var(--bg-content);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
  width: 100%;
}

.get-posts-box .btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

/* Post card */
.post-card {
    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
    gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}

.post-card:hover {
  background: var(--bg-secondary);
}

.post-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.post-author {
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
}

.post-author:hover {
  text-decoration: underline;
}

.post-slug {
  color: var(--text-muted);
  font-size: 16px;
}

.post-date {
  color: var(--text-muted);
  font-size: 16px;
}

.post-content {
  font-size: 16px;
  line-height: 1.45;
}

.post-text {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-text p {
  margin-bottom: 6px;
}

.post-text p:last-child {
  margin-bottom: 0;
}

.post-image {
  max-width: 100%;
  border-radius: var(--radius);
  margin-top: 8px;
  border: 1px solid var(--border-light);
}

.post-link {
  display: block;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 8px;
}

.post-link-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.post-link span {
  display: block;
  padding: 8px 12px;
  font-size: 16px;
  color: var(--text-secondary);
}

.post-actions {
  margin-top: 6px;
}

.inline-form {
  display: inline;
}

/* Profile header */
.profile-page {
  padding-bottom: 0;
}

.profile-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--bg-content);
}

.profile-avatar.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--accent-light);
  color: var(--accent);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-info h1 {
  font-size: 28px;
  line-height: 1.2;
  color: var(--text);
}

.profile-slug {
  color: var(--text-muted);
  font-size: 16px;
}

.arena-link {
  display: inline-block;
  margin-top: 3px;
  font-size: 16px;
  color: var(--accent);
  text-decoration: none;
}
.arena-link:hover { text-decoration: underline; }

.profile-bio {
  margin-top: 8px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.profile-bio a { color: var(--accent); }

.profile-stats {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 16px;
}

.profile-stats a {
  color: var(--text-secondary);
}

.profile-stats a:hover {
  color: var(--accent);
  text-decoration: none;
}

.profile-stats a strong {
  color: var(--text);
}

.profile-actions {
  flex-shrink: 0;
  padding-top: 4px;
}

/* People list */
.people-page {
  padding: 16px 16px 32px;
}

.people-page h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

.person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.person-info {
  flex: 1;
}

.person-name {
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
}

.person-slug {
  color: var(--text-muted);
  font-size: 16px;
  margin-left: 4px;
}

.person-action {
  flex-shrink: 0;
}

/* Directory */
.directory-page {
  padding: 16px 16px 32px;
}

.directory-page h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

/* Settings */
.settings-page {
  padding: 24px 16px 32px;
}

.settings-page h2 {
  margin-bottom: 20px;
  font-size: 18px;
}

.settings-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.settings-section h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.help-text {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 10px;
}

.settings-section form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.settings-section select {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  background: var(--bg-content);
}

/* Alerts */
.alert {
  padding: 10px 16px;
  border-radius: var(--radius);
  margin: 12px 16px;
  font-size: 13px;
  border: 1px solid;
}

.alert-error {
  background: #ffeaea;
  color: var(--danger);
  border-color: #f5c6cb;
}

.alert-success {
  background: #e6fff6;
  color: #00866d;
  border-color: #b7f0d8;
}

.alert-info {
  background: var(--accent-light);
  color: var(--accent);
  border-color: #b8ddfb;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 16px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border-light);
}

.page-info {
  color: var(--text-muted);
  font-size: 13px;
}

/* Error page */
.error-page {
  text-align: center;
  padding: 64px 16px;
}

.error-page h2 {
  margin-bottom: 8px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Back link */
.back-link {
  display: inline-block;
  margin: 12px 16px 4px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Post page */
.post-page {
  padding-bottom: 0;
}

/* About page */
.about-page {
  padding: 24px 16px 32px;
  line-height: 1.6;
}

.about-page h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.about-page h3 {
  font-size: 15px;
  margin-top: 20px;
  margin-bottom: 6px;
}

.about-page p {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.about-page ul {
  margin: 8px 0 10px 20px;
  color: var(--text-secondary);
}

.about-page li {
  margin-bottom: 4px;
}

/* Admin */
.admin-page {
  padding: 24px 16px 32px;
}

.admin-page h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}

.admin-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  object-fit: cover;
}

.muted {
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 480px) {
  main {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .site-header nav {
    flex-direction: column;
    gap: 8px;
  }

  .nav-links {
    gap: 12px;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-stats {
    justify-content: center;
  }

  .settings-section form {
    flex-direction: column;
  }

  .settings-section select {
    width: 100%;
  }
}
