:root {
  --bg-color: #0d0f1a;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.2);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-secondary: #ec4899;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

html {
  position: relative;
  zoom: 0.95;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  padding-bottom: 3rem;
}

/* Background Animated Orbs */
.glass-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
  animation: float 20s infinite alternate;
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -100px;
  left: -100px;
}
.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-secondary);
  bottom: -50px;
  right: -50px;
  animation-duration: 25s;
}

@keyframes float {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(100px) translateX(50px); }
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border-radius: 20px;
}

/* Ticker */
.stat-ticker {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.ticker-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ticker-content b {
  color: var(--accent-secondary);
  font-size: 1.1rem;
}
.divider {
  width: 1px;
  height: 20px;
  background: var(--glass-highlight);
}

/* Main Container */
.app-container {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 2rem;
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}
.header-text h1 {
  font-size: 3rem;
  background: linear-gradient(135deg, #a5b4fc, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}
.header-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
}
.header-branding .mascot {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.1));
}

/* Nav */
.app-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}
.app-nav a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 600;
}
.app-nav a:hover, .app-nav a.active {
  background: var(--glass-highlight);
  color: var(--text-main);
}

/* Grid Views */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Cards & Forms */
.action-card {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.card-header h2 {
  font-size: 1.5rem;
  color: var(--accent);
}

textarea, input[type="text"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  transition: all 0.3s ease;
}
textarea { height: 120px; }
textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}
.char-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}
.primary {
  background: var(--accent);
  color: white;
}
.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid var(--glass-border);
  width: 100%;
}
.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}
.icon-btn {
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  padding: 0;
  line-height: 1;
}
.icon-btn:hover {
  color: var(--accent);
  transform: rotate(180deg);
}
.mt-3 { margin-top: 1rem; }
.small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: var(--accent);
  color: white;
}

/* Content Typography */
.random-question blockquote {
  font-size: 1.3rem;
  font-style: italic;
  margin-bottom: 2rem;
  line-height: 1.5;
  border-left: 4px solid var(--accent-secondary);
  padding-left: 1rem;
}

/* Answers */
.recent-answers {
  margin-top: 2rem;
}
.recent-answers h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.answer-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.answer-content {
  flex: 1;
}
.upvote-form {
  margin: 0;
}
.upvote-btn {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.upvote-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}
.answer-bubble.muted {
  display: block;
  color: var(--text-muted);
  font-style: italic;
  border: none;
  background: transparent;
  padding-left: 0;
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
  font-style: italic;
}

/* Community Feed */
.community-view h2 {
  margin-bottom: 1.5rem;
  color: var(--text-main);
}
.feed-grid {
  display: grid;
  gap: 1.5rem;
}
.feed-card {
  padding: 1.5rem;
}
.feed-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.feed-card .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.answers-list {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.feed-reply {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .section-grid { grid-template-columns: 1fr; }
  .app-header { flex-direction: column; text-align: center; gap: 1rem; }
}

.answer-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.flag-btn, .flag-btn-icon {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.flag-btn:hover, .flag-btn-icon:hover {
  filter: grayscale(0) brightness(1.2);
  transform: scale(1.1);
}

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 1rem;
  background: var(--glass-bg);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transform: translateY(150%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  pointer-events: none;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
