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

a {
  text-decoration: none;
  color: inherit;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #09090b;
  color: #fafafa;
  min-height: 100vh;
  line-height: 1.5;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: #18181b;
  border-bottom: 1px solid #27272a;
  z-index: 100;
}

.header-content {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.mobile-nav-toggle:hover {
  background-color: #27272a;
  color: #fafafa;
}

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

@media (min-width: 1280px) {
  .mobile-nav-toggle {
    display: none;
  }
}

.header-logo {
  flex-shrink: 0;
}

.header-logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon-box {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #ec4899);
  border-radius: 0.5rem;
  font-size: 1.125rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fafafa;
  display: none;
}

@media (min-width: 640px) {
  .logo-text {
    display: block;
  }
}

/* Search Bar Desktop */
.header-search-desktop {
  flex: 1;
  max-width: 512px;
  display: none;
}

@media (min-width: 768px) {
  .header-search-desktop {
    display: block;
  }
}

.search-bar {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 9999px;
  color: #71717a;
  cursor: text;
  transition: all 0.2s;
}

.search-bar:hover {
  border-color: #52525b;
}

.search-icon {
  width: 16px;
  height: 16px;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.search-placeholder {
  flex: 1;
  text-align: left;
  font-size: 0.875rem;
}

.search-kbd {
  background-color: #3f3f46;
  color: #a1a1aa;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-family: inherit;
  display: none;
}

@media (min-width: 1024px) {
  .search-kbd {
    display: block;
  }
}

/* Search Mobile */
.search-mobile {
  display: flex;
}

@media (min-width: 768px) {
  .search-mobile {
    display: none;
  }
}

/* Header Icon Button */
.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.header-icon-btn:hover {
  background-color: #27272a;
  color: #fafafa;
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
}

.header-icon-btn-wrapper {
  display: none;
}

@media (min-width: 640px) {
  .header-icon-btn-wrapper {
    display: block;
  }
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.nav-link-wrapper {
  display: none;
}

@media (min-width: 640px) {
  .nav-link-wrapper {
    display: block;
  }
}

.nav-link-wrapper a {
  color: #a1a1aa;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.nav-link-wrapper a:hover {
  color: #fafafa;
  background-color: #27272a;
}

/* Login Button */
.login-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #f97316;
  color: white;
  border: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.login-btn:hover {
  background-color: #ea580c;
}

.login-btn svg {
  width: 16px;
  height: 16px;
}

.login-text {
  display: none;
}

@media (min-width: 640px) {
  .login-text {
    display: inline;
  }
}

/* Search Modal */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-modal {
  width: 100%;
  max-width: 600px;
  margin: 0 1rem;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  overflow: hidden;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid #27272a;
}

.search-modal-header svg {
  width: 20px;
  height: 20px;
  color: #71717a;
  flex-shrink: 0;
}

.search-modal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fafafa;
  font-size: 1rem;
  outline: none;
}

.search-modal-input::placeholder {
  color: #71717a;
}

.search-modal-close {
  padding: 0.25rem 0.5rem;
  background-color: #27272a;
  border: none;
  border-radius: 0.25rem;
  color: #71717a;
  font-size: 0.75rem;
  cursor: pointer;
}

.search-modal-close:hover {
  background-color: #3f3f46;
  color: #a1a1aa;
}

.search-modal-body {
  padding: 2rem;
}

.search-modal-hint {
  color: #71717a;
  font-size: 0.875rem;
  text-align: center;
}

/* Mobile Nav */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 150;
}

@media (min-width: 1280px) {
  .mobile-nav-overlay {
    display: none;
  }
}

.mobile-nav-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 288px;
  background-color: #18181b;
  border-right: 1px solid #27272a;
  z-index: 150;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-nav-sidebar.open {
  transform: translateX(0);
}

@media (min-width: 1280px) {
  .mobile-nav-sidebar {
    display: none;
  }
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #27272a;
}

.mobile-nav-logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.mobile-nav-close:hover {
  background-color: #27272a;
  color: #fafafa;
}

.mobile-nav-close svg {
  width: 20px;
  height: 20px;
}

.mobile-nav-menu {
  padding: 0.75rem;
}

.mobile-nav-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: #a1a1aa;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.mobile-nav-item a:hover {
  background-color: rgba(39, 39, 42, 0.5);
  color: #fafafa;
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-nav-divider {
  height: 1px;
  background-color: #27272a;
  margin: 0.5rem 1rem;
}

.mobile-nav-tags {
  padding: 0.75rem;
}

.mobile-nav-tags-title {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #71717a;
  letter-spacing: 0.05em;
}

.mobile-nav-tag-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  color: #a1a1aa;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.mobile-nav-tag-item a:hover {
  background-color: rgba(39, 39, 42, 0.5);
  color: #fafafa;
}

/* App Layout */
.app-layout {
  display: flex;
  padding-top: 56px;
  min-height: 100vh;
}

/* Left Sidebar */
.left-sidebar {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  width: 240px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid #27272a;
  background-color: #18181b;
  display: none;
}

@media (min-width: 1280px) {
  .left-sidebar {
    display: block;
  }
}

.sidebar-nav {
  padding: 0.75rem;
}

.nav-item-wrapper a {
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  color: #a1a1aa;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item:hover {
  background-color: rgba(39, 39, 42, 0.5);
  color: #fafafa;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background-color: #27272a;
  margin: 1rem 0;
}

/* Tags Section Header */
.tags-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: #71717a;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}

.tags-section-header:hover {
  color: #a1a1aa;
}

.tags-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tags-header-left svg {
  width: 16px;
  height: 16px;
}

.tags-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.tags-chevron.expanded {
  transform: rotate(180deg);
}

/* Tags List */
.tags-list {
  margin-top: 0.25rem;
}

.tag-item-wrapper a {
  display: block;
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  color: #a1a1aa;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.tag-item:hover {
  background-color: rgba(39, 39, 42, 0.5);
  color: #fafafa;
}

.tag-emoji {
  font-size: 1rem;
}

.tag-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.browse-all .tag-item {
  color: #71717a;
}

.browse-all .tag-item:hover {
  color: #a1a1aa;
}

.tag-item-skeleton {
  height: 36px;
  margin: 0.125rem 0;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
  padding-top: 1rem;
  padding-bottom: 4rem;
}

.container {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Page Header */
.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fafafa;
  margin-bottom: 0.25rem;
}

.page-desc {
  font-size: 0.875rem;
  color: #71717a;
}

/* Sort Tabs */
.sort-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sort-tabs::-webkit-scrollbar {
  display: none;
}

.sort-tab {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: #27272a;
  color: #a1a1aa;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.sort-tab:hover {
  background-color: #3f3f46;
  color: #fafafa;
}

.sort-tab.active {
  background-color: #f97316;
  color: white;
}

.sort-icon {
  font-size: 1rem;
}

/* Posts List */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Post Card */
.post-card {
  display: flex;
  gap: 0.75rem;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  padding: 1rem;
  transition: border-color 0.2s;
}

.post-card:hover {
  border-color: #3f3f46;
}

/* Vote Section */
.vote-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 40px;
}

.vote-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #71717a;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.vote-btn:hover {
  background-color: #27272a;
}

.vote-btn.upvote:hover {
  color: #f97316;
}

.vote-btn.upvote.voted {
  color: #f97316;
  background-color: rgba(249, 115, 22, 0.1);
}

.vote-btn.downvote:hover {
  color: #3b82f6;
}

.vote-btn.downvote.voted {
  color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
}

.vote-score.positive {
  color: #f97316;
}

.vote-score.negative {
  color: #3b82f6;
}

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

.vote-score {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fafafa;
}

/* Post Content */
.post-content {
  flex: 1;
  min-width: 0;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #71717a;
  margin-bottom: 0.375rem;
}

.post-author {
  color: #a1a1aa;
}

.separator {
  color: #52525b;
}

.post-time {
  color: #71717a;
}

.post-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  word-break: break-word;
}

.post-preview {
  font-size: 0.875rem;
  color: #a1a1aa;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-image {
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

/* Post Actions */
.post-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: none;
  background: transparent;
  color: #71717a;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 9999px;
  transition: all 0.2s;
}

.action-btn:hover {
  background-color: #27272a;
  color: #a1a1aa;
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

/* Skeleton Loading */
.post-skeleton {
  display: flex;
  gap: 0.75rem;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  padding: 1rem;
}

.skeleton-vote {
  width: 40px;
  height: 80px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.375rem;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-meta {
  width: 120px;
  height: 14px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

.skeleton-title {
  width: 80%;
  height: 20px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

.skeleton-preview {
  width: 100%;
  height: 48px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
}

.empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 0.5rem;
}

.empty-desc {
  font-size: 0.875rem;
  color: #71717a;
}

/* Error State */
.error-state {
  text-align: center;
  padding: 2rem 1rem;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.75rem;
}

.error-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 0.25rem;
}

.error-desc {
  font-size: 0.875rem;
  color: #fca5a5;
}

/* Performance Badge */
.perf-badge {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  z-index: 50;
}

.perf-label {
  color: #a1a1aa;
}

.perf-time {
  color: #22c55e;
  font-weight: 600;
}

/* Post Title Link */
.post-title-link {
  text-decoration: none;
  color: inherit;
}

.post-title-link:hover .post-title {
  color: #f97316;
}

/* Back Link */
.back-link {
  margin-bottom: 1rem;
}

.back-link a {
  color: #a1a1aa;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.back-link a:hover {
  color: #f97316;
}

/* Post Detail */
.post-detail {
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.post-detail-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.post-detail-info {
  flex: 1;
}

.post-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fafafa;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-detail-image {
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.post-detail-image img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
  background-color: #09090b;
}

.post-detail-content {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #09090b;
  border-radius: 0.5rem;
}

.post-detail-content p {
  color: #d4d4d8;
  line-height: 1.7;
  white-space: pre-wrap;
}

.post-detail-actions {
  display: flex;
  gap: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #27272a;
  margin-bottom: 1.5rem;
}

/* Comments Section */
.comments-section {
  margin-top: 1rem;
}

.comments-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 1rem;
}

.comments-placeholder {
  color: #71717a;
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem;
  background-color: #09090b;
  border-radius: 0.5rem;
}

/* Coming Soon */
.coming-soon {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  color: #71717a;
}

/* Back Home Link */
.back-home {
  display: inline-block;
  margin-top: 1rem;
  color: #f97316;
  text-decoration: none;
  font-size: 0.875rem;
}

.back-home:hover {
  text-decoration: underline;
}

/* Tags Grid */
.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.tag-card-link {
  text-decoration: none;
  color: inherit;
}

.tag-card {
  display: flex;
  gap: 1rem;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.2s;
}

.tag-card:hover {
  border-color: #3f3f46;
  transform: translateY(-2px);
}

.tag-icon {
  width: 64px;
  height: 64px;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #27272a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag-icon-placeholder {
  font-size: 2rem;
}

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

.tag-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 0.25rem;
}

.tag-genre {
  display: inline-block;
  font-size: 0.75rem;
  color: #f97316;
  background-color: rgba(249, 115, 22, 0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  margin-bottom: 0.375rem;
}

.tag-description {
  font-size: 0.75rem;
  color: #a1a1aa;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.tag-stats {
  display: flex;
  gap: 1rem;
}

.tag-stat {
  font-size: 0.75rem;
  color: #71717a;
}

/* Tag Skeleton */
.tag-skeleton {
  display: flex;
  gap: 1rem;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  padding: 1rem;
}

.tag-skeleton .skeleton-icon {
  width: 64px;
  height: 64px;
  border-radius: 0.5rem;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.tag-skeleton .skeleton-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tag-skeleton .skeleton-name {
  width: 60%;
  height: 18px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

.tag-skeleton .skeleton-desc {
  width: 100%;
  height: 14px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

.tag-skeleton .skeleton-stats {
  width: 40%;
  height: 12px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

/* Tag Detail Page */
.tag-detail {
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  overflow: hidden;
}

.tag-banner {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.tag-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag-detail-header {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
}

.tag-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #27272a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-icon-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag-detail-info {
  flex: 1;
}

.tag-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fafafa;
  margin-bottom: 0.5rem;
}

.tag-detail-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tag-developer {
  font-size: 0.75rem;
  color: #a1a1aa;
}

.tag-detail-description {
  padding: 0 1.5rem 1.5rem;
  color: #a1a1aa;
  font-size: 0.875rem;
  line-height: 1.6;
}

.tag-posts-section {
  padding: 1.5rem;
  border-top: 1px solid #27272a;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 1rem;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .hide-mobile {
    display: none;
  }

  .post-card {
    padding: 0.75rem;
  }

  .vote-section {
    min-width: 32px;
  }

  .vote-btn {
    width: 28px;
    height: 28px;
  }

  .vote-btn svg {
    width: 16px;
    height: 16px;
  }

  .vote-score {
    font-size: 0.75rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .action-btn {
    padding: 0.25rem 0.5rem;
  }
}

/* Right Sidebar */
.right-sidebar {
  display: none;
  width: 320px;
  padding: 1rem;
  overflow-y: auto;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  flex-shrink: 0;
}

@media (min-width: 1280px) {
  .right-sidebar {
    display: block;
  }
}

/* Sidebar Cards */
.sidebar-card {
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.sidebar-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #27272a;
}

.sidebar-card-header svg {
  width: 16px;
  height: 16px;
  color: #f97316;
}

.sidebar-card-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fafafa;
}

.sidebar-card-content {
  padding: 0;
}

/* Trending Tags */
.trending-tags-list {
  display: flex;
  flex-direction: column;
}

.trending-tag-item-wrapper {
  border-bottom: 1px solid #27272a;
}

.trending-tag-item-wrapper:last-child {
  border-bottom: none;
}

.trending-tag-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  transition: background-color 0.2s;
}

.trending-tag-item:hover {
  background-color: rgba(39, 39, 42, 0.5);
}

.trending-rank {
  font-size: 0.75rem;
  color: #71717a;
  width: 1rem;
  text-align: center;
}

.trending-emoji {
  font-size: 1.125rem;
}

.trending-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.trending-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-subs {
  font-size: 0.75rem;
  color: #71717a;
}

.trending-tag-skeleton {
  height: 48px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.view-all-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-top: 1px solid #27272a;
}

.view-all-link a {
  font-size: 0.875rem;
  color: #f97316;
  transition: color 0.2s;
}

.view-all-link a:hover {
  color: #fb923c;
}

/* Community Rules */
.rules-list {
  list-style: none;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rules-list li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #a1a1aa;
}

.rule-number {
  color: #f97316;
  font-weight: 500;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.75rem;
  color: #71717a;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #a1a1aa;
}

.footer-copyright {
  font-size: 0.75rem;
  color: #52525b;
}

/* YouTube Gaming Chart */
.youtube-card {
  margin-bottom: 1rem;
}

.youtube-header svg {
  width: 16px;
  height: 16px;
  color: #ef4444;
}

.youtube-videos-list {
  display: flex;
  flex-direction: column;
}

.youtube-video-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #27272a;
  transition: background-color 0.2s;
  text-decoration: none;
  color: inherit;
}

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

.youtube-video-item:hover {
  background-color: rgba(39, 39, 42, 0.5);
}

.youtube-rank {
  font-size: 0.75rem;
  color: #71717a;
  width: 1rem;
  text-align: center;
  padding-top: 0.25rem;
  flex-shrink: 0;
}

.youtube-thumbnail {
  width: 64px;
  height: 36px;
  border-radius: 0.25rem;
  overflow: hidden;
  background-color: #27272a;
  flex-shrink: 0;
}

.youtube-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.youtube-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #fafafa;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.youtube-channel {
  font-size: 0.75rem;
  color: #71717a;
  margin-top: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.youtube-views {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #52525b;
  margin-top: 0.125rem;
}

.youtube-views svg {
  width: 12px;
  height: 12px;
}

.youtube-skeleton {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.youtube-skeleton::before {
  content: '';
  width: 64px;
  height: 36px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.youtube-skeleton::after {
  content: '';
  flex: 1;
  height: 36px;
  background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.25rem;
}

.youtube-error {
  padding: 1rem;
  text-align: center;
  color: #71717a;
  font-size: 0.875rem;
}

.youtube-footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem;
  border-top: 1px solid #27272a;
  font-size: 0.875rem;
  color: #ef4444;
  transition: background-color 0.2s;
  text-decoration: none;
}

.youtube-footer-link:hover {
  background-color: rgba(39, 39, 42, 0.5);
}

.youtube-footer-link svg {
  width: 12px;
  height: 12px;
}

/* ============================================================================
   Auth Pages
   ============================================================================ */

/* Auth Layout */
.auth-layout {
  min-height: 100vh;
  position: relative;
}

.auth-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
}

.auth-bg-gradient {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(249, 115, 22, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 2rem 1rem;
  margin-top: 56px;
}

/* Auth Card */
.auth-container {
  width: 100%;
  max-width: 28rem;
}

.auth-card {
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 1rem;
  padding: 2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border-radius: 9999px;
}

.auth-icon svg {
  width: 2rem;
  height: 2rem;
}

.auth-icon.email-icon {
  background-color: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

.auth-icon.success-icon {
  background-color: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fafafa;
  margin-bottom: 0.5rem;
}

.auth-desc {
  color: #71717a;
  font-size: 0.875rem;
}

.auth-desc strong {
  color: #fafafa;
}

/* OAuth Buttons */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-oauth:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-oauth .oauth-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-google {
  background-color: #fafafa;
  color: #18181b;
}

.btn-google:hover:not(:disabled) {
  background-color: #e4e4e7;
}

.btn-apple {
  background-color: #18181b;
  color: #fafafa;
  border-color: #3f3f46;
}

.btn-apple:hover:not(:disabled) {
  background-color: #27272a;
}

/* Auth Divider */
.auth-divider {
  position: relative;
  margin: 1.5rem 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #27272a;
}

.auth-divider span {
  position: relative;
  display: inline-block;
  padding: 0 1rem;
  background-color: #18181b;
  color: #71717a;
  font-size: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #a1a1aa;
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: #71717a;
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  background-color: #09090b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  color: #fafafa;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.input-with-icon input::placeholder {
  color: #71717a;
}

.input-with-icon input:focus {
  outline: none;
  border-color: #f97316;
}

.otp-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #09090b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  color: #fafafa;
  font-size: 1.5rem;
  font-family: monospace;
  text-align: center;
  letter-spacing: 0.5em;
  transition: border-color 0.2s;
}

.otp-input::placeholder {
  color: #71717a;
  letter-spacing: 0.5em;
}

.otp-input:focus {
  outline: none;
  border-color: #f97316;
}

.form-hint {
  font-size: 0.75rem;
  color: #71717a;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.form-checkbox input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  accent-color: #f97316;
}

.form-checkbox label {
  font-size: 0.875rem;
  color: #a1a1aa;
}

.form-checkbox a {
  color: #f97316;
}

.form-checkbox a:hover {
  color: #fb923c;
}

/* Auth Buttons */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(to right, #f97316, #ec4899);
  border: none;
  border-radius: 0.75rem;
  color: #fafafa;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(to right, #ea580c, #db2777);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-text {
  width: 100%;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: #71717a;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-text:hover {
  color: #fafafa;
}

/* Auth Error */
.auth-error {
  padding: 0.75rem;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.5rem;
  color: #f87171;
  font-size: 0.875rem;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #71717a;
}

.auth-footer a {
  color: #f97316;
  font-weight: 500;
}

.auth-footer a:hover {
  color: #fb923c;
}

.auth-actions {
  margin-top: 1.5rem;
}

.auth-actions .btn-primary {
  text-decoration: none;
}

/* Spinner */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fafafa;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-large {
  width: 3rem;
  height: 3rem;
  border: 3px solid rgba(249, 115, 22, 0.3);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* User Menu */
.user-menu-wrapper {
  position: relative;
  z-index: 200;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.user-menu-btn:hover {
  background-color: #27272a;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: #fafafa;
  font-size: 0.875rem;
  font-weight: 600;
}

.user-name {
  font-size: 0.875rem;
  color: #fafafa;
  font-weight: 500;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  color: #71717a;
}

/* User Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 200px;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  padding: 0.5rem;
  z-index: 200;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background-color: #27272a;
  color: #fafafa;
}

.dropdown-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dropdown-item.logout {
  color: #ef4444;
}

.dropdown-item.logout:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.dropdown-divider {
  height: 1px;
  background-color: #27272a;
  margin: 0.5rem 0;
}

/* Menu Overlay (for closing dropdown) */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
}

/* Hide on mobile */
.hide-mobile {
  display: none;
}

@media (min-width: 640px) {
  .hide-mobile {
    display: inline;
  }
}

/* ============================================
   SUBMIT PAGE STYLES
   ============================================ */

.submit-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.auth-required {
  text-align: center;
  padding: 4rem 2rem;
  background: #18181b;
  border-radius: 12px;
  border: 1px solid #27272a;
}

.auth-required h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.auth-required p {
  color: #a1a1aa;
  margin-bottom: 2rem;
}

.submit-header {
  margin-bottom: 2rem;
}

.submit-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.submit-header p {
  color: #a1a1aa;
}

.submit-form {
  background: #18181b;
  border-radius: 12px;
  border: 1px solid #27272a;
  padding: 1.5rem;
}

.submit-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #e4e4e7;
}

.form-group .required {
  color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 8px;
  color: #fafafa;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #f97316;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: #71717a;
  margin-top: 0.25rem;
}

/* Post Type Tabs */
.post-type-tabs {
  display: flex;
  gap: 0.5rem;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  color: #a1a1aa;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: #3f3f46;
  color: #fafafa;
}

.tab-btn.active {
  background: rgba(249, 115, 22, 0.1);
  border-color: #f97316;
  color: #f97316;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
}

/* Input with Icon */
.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #71717a;
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 2.5rem;
}

/* Image Upload Area */
.image-preview-area {
  margin-bottom: 1rem;
}

.image-carousel {
  position: relative;
  background: #09090b;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.carousel-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.carousel-nav:hover {
  background: rgba(0, 0, 0, 0.9);
}

.carousel-nav.prev {
  left: 0.5rem;
}

.carousel-nav.next {
  right: 0.5rem;
}

.image-counter {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #fff;
}

.image-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-edit-gallery,
.btn-delete-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit-gallery {
  background: #3f3f46;
  color: #fafafa;
}

.btn-edit-gallery:hover {
  background: #52525b;
}

.btn-delete-image {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.btn-delete-image:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-edit-gallery svg,
.btn-delete-image svg {
  width: 16px;
  height: 16px;
}

/* Upload Area */
.upload-area {
  border: 2px dashed #3f3f46;
  border-radius: 8px;
  transition: all 0.2s;
}

.upload-area:hover {
  border-color: #f97316;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
  color: #a1a1aa;
  text-align: center;
  gap: 0.5rem;
}

.upload-label svg {
  width: 48px;
  height: 48px;
  color: #52525b;
  margin-bottom: 0.5rem;
}

.upload-label span {
  font-size: 0.875rem;
}

.upload-hint {
  font-size: 0.75rem !important;
  color: #71717a !important;
}

.upload-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Tag Selector */
.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.selected-tag {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #f97316;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.selected-tag button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: transparent;
  border: none;
  color: #f97316;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.tag-dropdown-wrapper {
  position: relative;
}

.tag-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 8px;
  color: #a1a1aa;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.tag-dropdown-btn:hover {
  border-color: #3f3f46;
}

.tag-dropdown-btn svg {
  width: 16px;
  height: 16px;
}

.tag-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
  margin-top: 0.25rem;
  z-index: 50;
}

.tag-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: #e4e4e7;
  font-size: 0.875rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.tag-option:hover {
  background: #27272a;
}

.tag-option.selected {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

.tag-loading,
.tag-error {
  padding: 1rem;
  text-align: center;
  color: #71717a;
  font-size: 0.875rem;
}

.tag-error {
  color: #ef4444;
}

/* Submit Actions */
.submit-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #27272a;
}

.btn-cancel {
  padding: 0.75rem 1.5rem;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  color: #e4e4e7;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background: #3f3f46;
}

.btn-submit {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(to right, #f97316, #ec4899);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-submit:hover {
  opacity: 0.9;
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   User Profile Page
   ============================================================================ */

.user-profile-page {
  max-width: 48rem;
  margin: 0 auto;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-header {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
  overflow: hidden;
}

.profile-banner {
  height: 6rem;
  background: linear-gradient(to right, rgba(249, 115, 22, 0.2), rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.2));
}

.profile-info {
  padding: 1.5rem;
  margin-top: -3rem;
}

.profile-avatar-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid #18181b;
  background: linear-gradient(to bottom right, #f97316, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.btn-icon {
  padding: 0.5rem;
  background: #27272a;
  border: none;
  border-radius: 8px;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #3f3f46;
  color: #fafafa;
}

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

.profile-name-section {
  margin-bottom: 1rem;
}

.profile-display-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fafafa;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.level-badge svg {
  width: 12px;
  height: 12px;
}

.level-legend {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

.level-master {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.level-veteran {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.level-active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.level-newbie {
  background: rgba(113, 113, 122, 0.2);
  color: #71717a;
}

.profile-username {
  color: #71717a;
  margin: 0.25rem 0 0 0;
}

.profile-bio {
  color: #d4d4d8;
  margin: 0 0 1rem 0;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: #71717a;
  font-size: 0.875rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.meta-item svg {
  width: 16px;
  height: 16px;
}

.profile-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-icon {
  color: #71717a;
}

.stat-icon.star {
  color: #f97316;
}

.stat-value {
  font-weight: 700;
  color: #fafafa;
}

.stat-label {
  color: #71717a;
}

/* Profile Tabs */
.profile-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #71717a;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #d4d4d8;
}

.tab-btn.active {
  background: #27272a;
  color: #fafafa;
}

.tab-count {
  padding: 0.125rem 0.375rem;
  background: #27272a;
  border-radius: 4px;
  font-size: 0.75rem;
}

.tab-btn.active .tab-count {
  background: #3f3f46;
}

/* Tab Content */
.profile-tab-content {
  margin-top: 0.5rem;
}

/* Comments List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-card {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 1rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: #71717a;
}

.meta-separator {
  color: #52525b;
}

.comment-post-link {
  color: #a1a1aa;
  text-decoration: none;
  transition: color 0.2s;
}

.comment-post-link:hover {
  color: #f97316;
}

.comment-content {
  color: #d4d4d8;
  font-size: 0.875rem;
  white-space: pre-wrap;
  margin: 0 0 0.5rem 0;
}

.comment-score {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #71717a;
}

.comment-score svg {
  color: #f97316;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 12px;
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: #3f3f46;
}

.empty-state h3 {
  color: #fafafa;
  font-size: 1.125rem;
  margin: 0 0 0.5rem 0;
}

.empty-state p {
  color: #71717a;
  margin: 0 0 1rem 0;
}

/* Error Container */
.error-container {
  text-align: center;
  padding: 4rem 1rem;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-container h1 {
  color: #fafafa;
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
}

.error-container p {
  color: #71717a;
  margin: 0 0 1.5rem 0;
}

/* Saved Posts Page */
.saved-posts-page {
  max-width: 48rem;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  color: #fafafa;
  margin: 0;
}

.page-header svg {
  color: #f97316;
}

/* Post Tag in PostCard */
.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: rgba(249, 115, 22, 0.1);
  border-radius: 4px;
  color: #f97316;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s;
}

.post-tag:hover {
  background: rgba(249, 115, 22, 0.2);
}

.tag-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.post-author-link {
  color: #a1a1aa;
  text-decoration: none;
  transition: color 0.2s;
}

.post-author-link:hover {
  color: #f97316;
}
