/* Sphere - Dark Social Platform */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --border: #2a2a3a;
  --text-primary: #f0f0f5;
  --text-secondary: #8888aa;
  --text-muted: #555566;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
}

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

html {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100%;
  width: 100%;
}

#app {
  min-height: 100vh;
  width: 100%;
}

/* Page containers */
.page {
  min-height: 100vh;
  width: 100%;
}

#landing-page {
  min-height: 100vh;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

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

.hidden { display: none !important; }

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: var(--text-secondary);
  background: var(--bg-tertiary);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

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

.btn-lg { padding: 14px 32px; font-size: 1.1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-full { width: 100%; }

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.auth-logo-img {
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
}

.sidebar-logo-img {
  width: 42px;
  height: 42px;
}

/* Landing Page */
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.landing-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 120px 60px 60px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: center;
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 500px;
}

.floating-card {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.floating-card.card-1 {
  top: 50px;
  left: 20%;
  animation-delay: 0s;
}

.floating-card.card-2 {
  top: 200px;
  right: 10%;
  animation-delay: 2s;
}

.floating-card.card-3 {
  bottom: 100px;
  left: 30%;
  animation-delay: 4s;
}

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

.card-avatar {
  width: 48px;
  height: 48px;
  background: var(--gradient);
  border-radius: 50%;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
}

.card-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.card-metric {
  color: var(--success);
  font-weight: 600;
}

/* Features Section */
.features-section {
  padding: 80px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.features-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* Auth Modal */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .logo-icon {
  margin: 0 auto 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
}

.auth-switch a {
  margin-left: 4px;
}

/* Main App Layout */
#main-app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 12px 0 24px;
}

.sidebar-nav {
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  color: var(--text-primary);
  border-radius: 50px;
  margin-bottom: 4px;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-item:hover {
  background: var(--bg-tertiary);
}

.nav-item.active {
  font-weight: 700;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.post-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  margin: 20px 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.post-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

.post-btn-icon {
  font-size: 1.25rem;
  font-weight: 400;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-user:hover {
  background: var(--bg-tertiary);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
}

.user-handle {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Main Content */
.main-content {
  border-right: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.view-header h1 {
  font-size: 1.25rem;
}

.feed-tabs {
  display: flex;
  margin-top: 16px;
}

.tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  background: var(--bg-tertiary);
}

.tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* Compose Box */
.compose-box {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.compose-input {
  flex: 1;
  min-height: 60px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  resize: none;
  outline: none;
}

.compose-input:empty:before {
  content: attr(data-placeholder);
  color: var(--text-muted);
}

/* Posts */
.post {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

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

.post-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.post-author {
  flex: 1;
}

.post-name {
  font-weight: 600;
}

.post-handle {
  color: var(--text-secondary);
  margin-left: 4px;
}

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

.post-content {
  margin: 12px 0 12px 52px;
  white-space: pre-wrap;
}

.post-media {
  margin: 12px 0 12px 52px;
  border-radius: 16px;
  overflow: hidden;
}

.post-media img,
.post-media video {
  max-width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.post-actions {
  display: flex;
  gap: 60px;
  margin-left: 52px;
}

.post-action {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50px;
  transition: all 0.2s;
}

.post-action:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

.post-action.liked {
  color: var(--danger);
}

.post-action svg {
  width: 18px;
  height: 18px;
}

/* Poll */
.poll {
  margin: 12px 0 12px 52px;
}

.poll-option-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.poll-option-item:hover {
  border-color: var(--accent);
}

.poll-option-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--accent-glow);
  z-index: 0;
}

.poll-option-text {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
}

/* Right Sidebar */
.right-sidebar {
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

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

.sidebar-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
}

.sidebar-card h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

/* Profile */
.profile-header {
  position: relative;
}

.profile-cover {
  height: 200px;
  background: var(--gradient);
  background-size: cover;
  background-position: center;
}

.profile-info {
  padding: 0 20px 20px;
  position: relative;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  margin-top: -60px;
  background: var(--bg-secondary);
  object-fit: cover;
}

.profile-actions {
  position: absolute;
  right: 20px;
  top: 16px;
  display: flex;
  gap: 12px;
}

.profile-handle {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.profile-bio {
  margin-bottom: 16px;
}

.profile-stats {
  display: flex;
  gap: 24px;
  color: var(--text-secondary);
}

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

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

/* Creator Dashboard */
.creator-dashboard {
  padding: 20px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-card .stat-label {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  color: var(--text-primary);
}

.creator-section {
  margin-bottom: 32px;
}

.creator-section h3 {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Ad Revenue Section */
.ad-revenue-section .section-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.ad-toggle-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.ad-toggle-info {
  flex: 1;
}

.ad-toggle-label {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.ad-toggle-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  margin-left: 16px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 28px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
  background: white;
  transform: translateX(24px);
}

.ad-stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ad-stat-card {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border);
}

.ad-stat-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.ad-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--success);
}

.ad-performance-section h4 {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.ad-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.ad-metric {
  background: var(--bg-secondary);
  padding: 16px 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
}

.ad-metric-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ad-metric-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .ad-toggle-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .toggle-switch {
    margin-left: 0;
  }

  .ad-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.export-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tiers-list {
  margin-bottom: 16px;
}

.tier-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.tier-card h4 {
  margin-bottom: 8px;
}

.tier-price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.25rem;
}

.earnings-list {
  max-height: 300px;
  overflow-y: auto;
}

.earning-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.earning-amount {
  color: var(--success);
  font-weight: 600;
}

/* Messages */
.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 60px);
}

.conversations-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.conversation-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.conversation-item:hover {
  background: var(--bg-secondary);
}

.conversation-item.active {
  background: var(--bg-tertiary);
}

.messages-panel {
  display: flex;
  flex-direction: column;
}

.messages-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.message {
  max-width: 70%;
  margin-bottom: 12px;
}

.message.sent {
  margin-left: auto;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--bg-tertiary);
}

.message.sent .message-bubble {
  background: var(--accent);
}

.message-input-area {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.message-input-area input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
}

/* Groups */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px;
}

.group-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.group-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.group-cover {
  height: 80px;
  background: var(--gradient);
}

.group-info {
  padding: 16px;
}

.group-info h4 {
  margin-bottom: 4px;
}

.group-members {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Notifications */
.notification-item {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.notification-item:hover {
  background: var(--bg-secondary);
}

.notification-item.unread {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
}

/* Compose Modal */
.compose-full {
  display: flex;
  gap: 12px;
}

.compose-area {
  flex: 1;
}

.compose-area textarea {
  width: 100%;
  min-height: 120px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  resize: none;
  outline: none;
}

.compose-options {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.file-upload,
.poll-toggle {
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
}

.file-upload:hover,
.poll-toggle:hover {
  background: var(--bg-tertiary);
}

.file-upload input,
.poll-toggle input {
  display: none;
}

.file-upload svg,
.poll-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
}

.poll-option {
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
}

.media-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.media-preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

/* Tip Modal */
.tip-amounts {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.tip-amount {
  flex: 1;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tip-amount:hover,
.tip-amount.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* Suggested User */
.suggested-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.suggested-user-info {
  flex: 1;
}

.suggested-user-name {
  font-weight: 600;
}

.suggested-user-handle {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Hero Badge */
.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-weight: 500;
}

/* Hero CTA Buttons Row */
.hero-cta {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-bottom: 32px;
}

/* Hero Highlights */
.hero-highlights {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.highlight {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.highlight-icon {
  font-size: 1.1rem;
}

/* Hero Features Section */
.hero-features-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px;
}

.hero-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-feature {
  text-align: center;
}

.hero-feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.hero-feature h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.hero-feature p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-badge {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.section-badge.blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Creator Section Landing */
.creator-section-landing {
  background: var(--bg-primary);
  padding: 80px 60px;
}

.creator-section-landing .features-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Fans Section Landing */
.fans-section-landing {
  background: var(--bg-secondary);
  padding: 80px 60px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card.compact {
  padding: 24px 20px;
}

.feature-card.compact h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature-card.compact p {
  font-size: 0.85rem;
  line-height: 1.5;
}

.feature-icon-small {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* CTA Section */
.cta-section {
  padding: 100px 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.cta-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

/* User Menu Dropdown */
.sidebar-user-container {
  position: relative;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-user:hover {
  background: var(--bg-tertiary);
}

.user-menu-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  margin-left: auto;
}

.user-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 8px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
}

.user-menu-item:hover {
  background: var(--bg-tertiary);
}

.user-menu-item svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.user-menu-item.logout {
  color: var(--danger);
}

.user-menu-item.logout svg {
  color: var(--danger);
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* Settings Page */
.settings-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 60px);
}

.settings-nav {
  padding: 20px;
  border-right: 1px solid var(--border);
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.settings-nav-item:hover {
  background: var(--bg-tertiary);
}

.settings-nav-item.active {
  background: var(--bg-tertiary);
  color: var(--accent);
}

.settings-nav-item svg {
  width: 20px;
  height: 20px;
}

.settings-content {
  padding: 32px;
  overflow-y: auto;
}

.settings-panel {
  display: none;
  max-width: 600px;
}

.settings-panel.active {
  display: block;
}

.settings-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.settings-section {
  margin-bottom: 32px;
}

.settings-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-form .form-group {
  margin-bottom: 20px;
}

.avatar-upload-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.settings-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.input-with-prefix {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.input-with-prefix span {
  padding: 12px 0 12px 16px;
  color: var(--text-secondary);
}

.input-with-prefix input {
  flex: 1;
  background: transparent;
  border: none;
  padding-left: 4px;
}

.input-with-prefix input:focus {
  outline: none;
  box-shadow: none;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Username Edit */
.username-edit-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.username-input-group {
  position: relative;
}

.username-input-group input:disabled {
  background: transparent;
  cursor: default;
}

.username-input-group input:not(:disabled) {
  background: var(--bg-secondary);
}

.btn-edit-username {
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.btn-edit-username:hover {
  color: var(--accent);
}

.btn-edit-username.editing {
  color: var(--success);
}

.username-availability {
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.username-availability.available {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.username-availability.unavailable {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.username-availability.checking {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Username Confirmation Modal */
.username-confirm-content {
  text-align: center;
}

.username-confirm-content h2 {
  margin-bottom: 12px;
}

.username-confirm-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.username-confirm-content .username-change {
  background: var(--bg-tertiary);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.username-change .old-username {
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 8px;
}

.username-change .new-username {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 600;
}

.username-change .arrow {
  color: var(--text-muted);
  margin: 8px 0;
}

.username-confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.username-confirm-buttons .btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 24px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.username-confirm-buttons .btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
}

/* Toggle Switch */
.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.setting-toggle:last-child {
  border-bottom: none;
}

.setting-info {
  flex: 1;
}

.setting-label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}

.setting-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50px;
  transition: all 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  left: 23px;
  background: white;
}

/* Theme Options */
.theme-options {
  display: flex;
  gap: 16px;
}

.theme-option {
  cursor: pointer;
  text-align: center;
}

.theme-option input {
  display: none;
}

.theme-preview {
  width: 100px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 2px solid var(--border);
  transition: all 0.2s;
}

.theme-option.selected .theme-preview,
.theme-option:has(input:checked) .theme-preview {
  border-color: var(--accent);
}

.theme-preview.dark-theme {
  background: #0a0a0f;
}

.theme-preview.light-theme {
  background: #f8f8f8;
}

.theme-preview.system-theme {
  background: linear-gradient(135deg, #0a0a0f 50%, #f8f8f8 50%);
}

.theme-preview-bar {
  height: 20px;
  background: rgba(128, 128, 128, 0.3);
}

.theme-preview-content {
  padding: 8px;
}

/* Color Options */
.color-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color);
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected,
.color-option:has(input:checked) {
  border-color: white;
  box-shadow: 0 0 0 2px var(--color);
}

.color-option input {
  display: none;
}

/* Cash Out Section */
.cash-out-section {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 24px;
}

.cash-out-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.balance-display {
  display: flex;
  flex-direction: column;
}

.balance-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--success);
}

.balance-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.btn-cash-out {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-cash-out:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-cash-out svg {
  width: 20px;
  height: 20px;
}

.cash-out-note {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Cash Out Modal */
.cashout-header {
  text-align: center;
  margin-bottom: 24px;
}

.cashout-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.cashout-balance {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.cashout-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.cashout-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--success);
}

.cashout-summary {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
}

.summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  color: var(--success);
}

.cashout-note-modal {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 16px;
}

/* Payout Method Section */
.payout-method-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.payout-method-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
}

.payout-method-loading {
  color: var(--text-muted);
  text-align: center;
}

.payout-method-connected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payout-method-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.payout-method-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.payout-method-details h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.payout-method-details p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.payout-method-actions {
  display: flex;
  gap: 8px;
}

.payout-method-not-connected {
  text-align: center;
  padding: 20px 0;
}

.payout-method-not-connected p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.btn-connect-payout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-connect-payout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-connect-payout svg {
  width: 20px;
  height: 20px;
}

/* Payout Method Modal */
.payout-header {
  text-align: center;
  margin-bottom: 24px;
}

.payout-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.payout-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
}

.payout-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.payout-type-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.payout-type-tab:hover {
  border-color: var(--text-secondary);
}

.payout-type-tab.active {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
}

.payout-type-icon {
  font-size: 1.5rem;
}

.payout-form {
  display: none;
}

.payout-form.active {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cash-out-disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
}

.cash-out-disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10000;
}

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

.toast-success {
  border-color: var(--success);
}

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

/* Comments Modal */
.comments-modal-content {
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.comments-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.comments-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.comments-post-preview {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  margin-bottom: 16px;
}

.comments-post-preview .post-preview-content {
  font-size: 0.95rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
  max-height: 400px;
  margin-bottom: 16px;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-content {
  flex: 1;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-name {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-handle {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.comment-time {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: auto;
}

.comment-text {
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.comment-actions {
  display: flex;
  gap: 16px;
}

.comment-action {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.comment-action:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

.comment-action svg {
  width: 14px;
  height: 14px;
}

.comment-compose {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.comment-input-wrapper {
  flex: 1;
  display: flex;
  gap: 8px;
}

.comment-input-wrapper input {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.comment-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent);
}

.no-comments {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.no-comments-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* Bookmark indicator on posts */
.post-action.bookmarked {
  color: var(--accent);
}

.post-action.bookmarked svg {
  fill: var(--accent);
}

/* Responsive */
@media (max-width: 1200px) {
  .right-sidebar {
    display: none;
  }

  #main-app {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  #main-app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    flex-direction: row;
    padding: 8px 16px;
    border-right: none;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
    z-index: 100;
  }

  .sidebar-logo,
  .post-btn,
  .sidebar-user,
  .nav-item span {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    justify-content: space-around;
    width: 100%;
  }

  .nav-item {
    padding: 12px;
    margin: 0;
  }

  .main-content {
    border: none;
    max-width: 100%;
    padding-bottom: 70px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    padding: 100px 20px 40px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-visual {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .features-section {
    padding: 40px 20px;
  }

  .hero-features-section {
    padding: 40px 20px;
  }

  .hero-features-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .creator-section-landing .features-grid,
  .features-grid.three-col {
    grid-template-columns: 1fr 1fr;
  }

  .cta-section {
    padding: 60px 20px;
  }

  .cta-content h2 {
    font-size: 1.75rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }

  .hero-highlights {
    flex-direction: column;
    gap: 12px;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .groups-grid {
    grid-template-columns: 1fr;
  }

  .messages-layout {
    grid-template-columns: 1fr;
  }

  /* Settings responsive */
  .settings-container {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    overflow-x: auto;
    padding: 12px;
    gap: 8px;
  }

  .settings-nav-item {
    flex-shrink: 0;
    padding: 10px 16px;
    margin: 0;
  }

  .settings-nav-item span {
    display: none;
  }

  .settings-content {
    padding: 20px;
  }

  /* Cash out responsive */
  .cash-out-card {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .balance-amount {
    font-size: 2rem;
  }

  /* User menu on mobile */
  .user-menu {
    position: fixed;
    bottom: 70px;
    left: 16px;
    right: 16px;
  }
}

/* ============================================
   TRANSACTION HISTORY
   ============================================ */

.transaction-history-section,
.payout-history-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header-row h3 {
  margin: 0;
  font-size: 1.1rem;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

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

.transaction-stats,
.payout-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-mini {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.stat-mini-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-mini-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-mini-value.success { color: var(--success); }
.stat-mini-value.warning { color: var(--warning); }
.stat-mini-value.danger { color: var(--danger); }
.stat-mini-value.accent { color: var(--accent); }

.running-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.running-balance .balance-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.running-balance .balance-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success);
}

.transaction-list,
.payout-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.transaction-item,
.payout-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
}

.transaction-item:hover,
.payout-item:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent);
}

.transaction-icon,
.payout-icon-status {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.transaction-icon.tip {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(251, 113, 133, 0.2));
}

.transaction-icon.subscription {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
}

.payout-icon-status.pending {
  background: rgba(245, 158, 11, 0.2);
}

.payout-icon-status.processing {
  background: rgba(59, 130, 246, 0.2);
}

.payout-icon-status.completed {
  background: rgba(16, 185, 129, 0.2);
}

.payout-icon-status.failed {
  background: rgba(239, 68, 68, 0.2);
}

.transaction-details,
.payout-details {
  flex: 1;
  min-width: 0;
}

.transaction-type,
.payout-status-text {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.transaction-sender,
.payout-destination {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.transaction-sender .sender-link {
  color: var(--accent);
  cursor: pointer;
}

.transaction-sender .sender-link:hover {
  text-decoration: underline;
}

.transaction-message {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-amount,
.payout-amount {
  text-align: right;
  flex-shrink: 0;
}

.transaction-amount-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--success);
}

.payout-amount-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.payout-amount-value.pending { color: var(--warning); }
.payout-amount-value.processing { color: #3b82f6; }
.payout-amount-value.completed { color: var(--success); }
.payout-amount-value.failed { color: var(--danger); text-decoration: line-through; }

.transaction-date,
.payout-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.status-badge.processing {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.status-badge.completed {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.status-badge.failed {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 0.9rem;
}

/* Responsive for transaction/payout history */
@media (max-width: 768px) {
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .transaction-stats,
  .payout-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .transaction-item,
  .payout-item {
    flex-wrap: wrap;
  }

  .transaction-amount,
  .payout-amount {
    width: 100%;
    text-align: left;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
}

/* ============================================
   POST MENU (Delete Post)
   ============================================ */

.post-menu {
  margin-left: auto;
  position: relative;
}

.post-menu-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
  color: var(--text-muted);
  transition: all 0.2s;
}

.post-menu-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.post-menu-btn svg {
  width: 20px;
  height: 20px;
}

.post-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.post-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.post-menu-item:hover {
  background: var(--bg-tertiary);
}

.post-menu-item.delete {
  color: var(--danger);
}

.post-menu-item.delete:hover {
  background: rgba(239, 68, 68, 0.1);
}

.post-menu-item svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   EDIT PROFILE MODAL
   ============================================ */

#edit-profile-modal .modal-content {
  max-width: 500px;
}

#edit-profile-modal .avatar-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 12px;
}

#edit-profile-modal .settings-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}

#edit-profile-modal .btn-secondary.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  border-radius: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

#edit-profile-modal .btn-secondary.btn-sm:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
}

#edit-profile-modal .form-group {
  margin-bottom: 20px;
}

#edit-profile-modal textarea {
  resize: vertical;
  min-height: 80px;
}

/* ============================================
   FRIENDS FEATURE
   ============================================ */

.friends-container {
  max-width: 800px;
  padding: 20px;
}

.friends-section {
  margin-bottom: 32px;
}

.friends-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.count-badge {
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.2s;
}

.friend-card:hover {
  border-color: var(--accent);
  background: var(--bg-tertiary);
}

.friend-card .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

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

.friend-name {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.friend-name .verified-badge {
  color: var(--accent);
  font-size: 0.9rem;
}

.friend-username {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.friend-bio {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-actions {
  display: flex;
  gap: 8px;
}

.friend-requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.friend-request-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.friend-request-card .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.request-info {
  flex: 1;
}

.request-actions {
  display: flex;
  gap: 8px;
}

.btn-accept {
  background: var(--success);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-accept:hover {
  filter: brightness(1.1);
}

.btn-reject {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

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

.mutual-friends {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.btn-add-friend {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-add-friend:hover {
  background: var(--accent-hover);
}

.btn-pending {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: default;
}

.btn-remove-friend {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-remove-friend:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px dashed var(--border);
}

/* ============================================
   ADS SYSTEM
   ============================================ */

.ad-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.ad-card:hover {
  border-color: var(--text-muted);
}

.ad-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.ad-content {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ad-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.ad-body {
  padding: 16px;
}

.ad-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.ad-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.ad-cta {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.ad-cta:hover {
  background: var(--accent-hover);
}

.sidebar-ad {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.sidebar-ad .ad-label {
  padding: 0 0 8px 0;
  border-bottom: none;
  font-size: 0.7rem;
}

.sidebar-ad .ad-image {
  border-radius: 8px;
  margin-bottom: 12px;
}

/* ============================================
   APPEARANCE SETTINGS - THEME SUPPORT
   ============================================ */

/* Light theme variables */
body.theme-light {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --border: #dee2e6;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
}

body.theme-light .landing-nav {
  background: rgba(255, 255, 255, 0.9);
}

body.theme-light .modal-content {
  background: var(--bg-primary);
}

body.theme-light .post-card {
  background: var(--bg-primary);
}

body.theme-light .sidebar {
  background: var(--bg-secondary);
}

/* Accent color support */
body[data-accent="pink"] {
  --accent: #ec4899;
  --accent-hover: #f472b6;
  --accent-glow: rgba(236, 72, 153, 0.3);
  --gradient: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #fb7185 100%);
}

body[data-accent="orange"] {
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.3);
  --gradient: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #fdba74 100%);
}

body[data-accent="green"] {
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.3);
  --gradient: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
}

body[data-accent="cyan"] {
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.3);
  --gradient: linear-gradient(135deg, #06b6d4 0%, #22d3ee 50%, #67e8f9 100%);
}

body[data-accent="purple"] {
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.3);
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%);
}

/* Theme option styling improvements */
.theme-options {
  display: flex;
  gap: 16px;
}

.theme-option {
  flex: 1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.theme-option input {
  display: none;
}

.theme-preview {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 12px;
  border: 2px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
}

.theme-option.selected .theme-preview,
.theme-option:has(input:checked) .theme-preview {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.theme-preview.dark-theme {
  background: #0a0a0f;
}

.theme-preview.dark-theme .theme-preview-bar {
  background: #1a1a25;
  height: 20%;
}

.theme-preview.dark-theme .theme-preview-content {
  background: #12121a;
  height: 80%;
}

.theme-preview.light-theme {
  background: #ffffff;
}

.theme-preview.light-theme .theme-preview-bar {
  background: #f8f9fa;
  height: 20%;
}

.theme-preview.light-theme .theme-preview-content {
  background: #e9ecef;
  height: 80%;
}

.theme-preview.system-theme {
  background: linear-gradient(135deg, #0a0a0f 50%, #ffffff 50%);
}

.theme-preview.system-theme .theme-preview-bar {
  background: linear-gradient(135deg, #1a1a25 50%, #f8f9fa 50%);
  height: 20%;
}

.theme-preview.system-theme .theme-preview-content {
  background: linear-gradient(135deg, #12121a 50%, #e9ecef 50%);
  height: 80%;
}

/* Color options */
.color-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-option {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color);
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
  position: relative;
}

.color-option input {
  display: none;
}

.color-option.selected,
.color-option:has(input:checked) {
  border-color: var(--text-primary);
  transform: scale(1.1);
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--color);
}
