:root {
  --primary: #6366f1;
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.screen { display: none; }
.screen.active { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.gate-card, .auth-card {
  background: var(--card);
  padding: 2.5rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  border: 1px solid var(--border);
}

.logo { max-width: 160px; margin-bottom: 1rem; }
.logo-small { height: 32px; margin-right: 0.75rem; }

h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }

input, textarea, button {
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  font-size: 1rem;
}

button {
  background: var(--primary);
  border: none;
  cursor: pointer;
  font-weight: 600;
}

button:hover { opacity: 0.9; }

.error { color: #f87171; margin-top: 0.5rem; font-size: 0.875rem; }

.tabs { display: flex; margin: 1rem 0; }
.tab {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0;
}
.tab.active { background: var(--primary); }

.hidden { display: none !important; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.header-left { display: flex; align-items: center; font-weight: 600; }
.header-right button { width: auto; margin-left: 0.5rem; padding: 0.5rem 1rem; }

main { max-width: 680px; margin: 0 auto; padding: 1.5rem; }

#postFormContainer {
  background: var(--card);
  padding: 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.post {
  background: var(--card);
  padding: 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.post-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.post-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.post-media { max-width: 100%; border-radius: 0.5rem; margin: 0.75rem 0; }

.comments { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.comment { font-size: 0.9rem; margin: 0.5rem 0; color: var(--muted); }
.comment strong { color: var(--text); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  width: 90%;
  max-width: 420px;
  position: relative;
}
.close { position: absolute; top: 0.75rem; right: 1rem; cursor: pointer; font-size: 1.5rem; }
