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

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface-hover: #22223a;
  --primary: #e94560;
  --primary-hover: #ff6b81;
  --accent: #7c5cfc;
  --text: #eaeaea;
  --text-muted: #8888aa;
  --success: #2ecc71;
  --danger: #e74c3c;
  --border: #2a2a4a;
  --radius: 12px;
}

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

/* Header */
header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-bottom: 2px solid var(--primary);
}

header h1 {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

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

/* Form */
.form-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
  transition: all 0.3s ease;
}

.form-container.hidden {
  display: none;
}

.form-inner {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-inner h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Form tabs */
.form-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.form-tab {
  flex: 1;
  padding: 0.7rem 1rem;
  background: var(--bg);
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

.form-tab.active {
  background: var(--accent);
  color: white;
}

.form-tab:hover:not(.active) {
  background: var(--surface-hover);
  color: var(--text);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  margin-top: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
}

label:first-of-type {
  margin-top: 0;
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

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

textarea {
  resize: vertical;
}

select option {
  background: var(--bg);
}

.tab-content .btn {
  margin-top: 1.5rem;
  width: 100%;
  font-size: 1.1rem;
  padding: 1rem;
}

/* Dropzone */
.dropzone {
  margin-top: 1rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: #7c5cfc0a;
}

.dropzone-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.dropzone-text {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.dropzone-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dropzone-preview {
  position: relative;
}

.dropzone-preview.hidden {
  display: none;
}

.dropzone-preview img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  object-fit: contain;
}

.remove-image {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.remove-image:hover {
  background: #c0392b;
}

/* Controls */
.controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem 0.5rem;
}

.sort-btn {
  padding: 0.5rem 1.25rem;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sort-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.sort-btn:hover:not(.active) {
  background: var(--surface-hover);
  color: var(--text);
}

/* Posts */
main {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

#posts-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 1rem;
}

.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.post-card:hover {
  border-color: var(--accent);
}

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

.ai-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-badge.chatgpt { background: #10a37f22; color: #10a37f; border: 1px solid #10a37f44; }
.ai-badge.claude { background: #d4a27422; color: #d4a274; border: 1px solid #d4a27444; }
.ai-badge.gemini { background: #4285f422; color: #4285f4; border: 1px solid #4285f444; }
.ai-badge.copilot { background: #6e40c922; color: #6e40c9; border: 1px solid #6e40c944; }
.ai-badge.grok { background: #ffffff22; color: #ffffff; border: 1px solid #ffffff44; }
.ai-badge.perplexity { background: #20808d22; color: #20808d; border: 1px solid #20808d44; }
.ai-badge.siri { background: #5856d622; color: #5856d6; border: 1px solid #5856d644; }
.ai-badge.alexa { background: #00caff22; color: #00caff; border: 1px solid #00caff44; }
.ai-badge.other { background: #88888822; color: #aaa; border: 1px solid #88888844; }

.post-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.post-section {
  margin-bottom: 1rem;
}

.post-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.post-prompt {
  color: var(--text);
  font-style: italic;
}

.post-ai-response {
  background: #e9456015;
  border-left: 3px solid var(--primary);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  color: #ff8a9e;
}

.post-reality {
  background: #2ecc7115;
  border-left: 3px solid var(--success);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  color: #5dde9e;
}

/* Screenshot in posts */
.post-screenshot {
  margin-bottom: 1rem;
}

.post-screenshot img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}

.post-screenshot img:hover {
  transform: scale(1.01);
}

.post-caption {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  cursor: zoom-out;
  padding: 2rem;
}

.lightbox img {
  max-width: 95%;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.vote-buttons {
  display: flex;
  gap: 0.75rem;
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.vote-btn:hover {
  transform: scale(1.05);
}

.vote-btn.up:hover, .vote-btn.up.voted {
  border-color: var(--success);
  color: var(--success);
  background: #2ecc7115;
}

.vote-btn.down:hover, .vote-btn.down.voted {
  border-color: var(--danger);
  color: var(--danger);
  background: #e74c3c15;
}

.post-author {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Load more */
#load-more-container {
  text-align: center;
  padding: 2rem 0;
}

#load-more-container.hidden {
  display: none;
}

/* Empty state */
#empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

#empty-state.hidden {
  display: none;
}

.empty-text {
  color: var(--text-muted);
  font-size: 1.2rem;
  font-style: italic;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.disclaimer {
  margin-top: 0.5rem;
  font-style: italic;
  font-size: 0.75rem;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 1rem 2rem;
  border-radius: var(--radius);
  color: white;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

/* Responsive */
@media (max-width: 600px) {
  header h1 {
    font-size: 2rem;
  }

  .tagline {
    font-size: 0.95rem;
  }

  .form-inner {
    padding: 1.25rem;
  }

  .post-card {
    padding: 1rem;
  }

  .post-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .dropzone {
    padding: 1.5rem 1rem;
  }
}
