/* WebberDeck - Global Styles */
:root {
  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --primary-light: #818CF8;
  --background: #0F172A;
  --surface: #1E293B;
  --surface-light: #334155;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --border-radius: 12px;
  --spacing: 1rem;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ============ ANIMATED BACKGROUND - GLOBAL ============ */

/* Animated gradient background layer */
.gem-background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  z-index: -1;
  pointer-events: none;
}

.gem-background-layer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(129, 140, 248, 0.1) 0%, transparent 50%);
  animation: rotate-gradient 20s linear infinite;
}

@keyframes rotate-gradient {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Floating gem icons - multiple directions */
.floating-gem {
  position: fixed;
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

/* Gem 1: Left to Right - Large, clear - STARTS MID-ANIMATION (already visible) */
.floating-gem:nth-child(1) {
  top: 15%;
  left: -10%;
  font-size: 3rem;
  opacity: 0.2;
  animation: drift-right 28s linear infinite;
  animation-delay: -14s;
  /* Negative delay = starts mid-cycle */
}

/* Gem 2: Right to Left - Small, blurry, slow - STARTS MID-ANIMATION */
.floating-gem:nth-child(2) {
  top: 40%;
  left: 110%;
  font-size: 1.8rem;
  filter: blur(2px);
  opacity: 0.2;
  animation: drift-left 50s linear infinite;
  animation-delay: -25s;
  /* Starts halfway through */
}

/* Gem 3: Left to Right - Medium, clear - STARTS MID-ANIMATION */
.floating-gem:nth-child(3) {
  top: 65%;
  left: -10%;
  font-size: 2.2rem;
  opacity: 0.2;
  animation: drift-right 25s linear infinite;
  animation-delay: -18s;
  /* Starts 18 seconds in */
}

/* Gem 4: Top to Bottom - Large, blurry, very slow - STARTS FROM BEGINNING */
.floating-gem:nth-child(4) {
  left: 20%;
  top: -10%;
  font-size: 3.5rem;
  filter: blur(3px);
  opacity: 0;
  animation: drift-down 60s linear infinite;
  animation-delay: 1s;
}

/* Gem 5: Right to Left - Medium, clear - STARTS MID-ANIMATION */
.floating-gem:nth-child(5) {
  top: 80%;
  left: 110%;
  font-size: 2rem;
  opacity: 0.2;
  animation: drift-left 32s linear infinite;
  animation-delay: -20s;
  /* Starts 20 seconds in */
}

/* Gem 6: Bottom to Top - Small, blurry - STARTS MID-ANIMATION */
.floating-gem:nth-child(6) {
  left: 60%;
  top: 110%;
  font-size: 1.5rem;
  filter: blur(1.5px);
  opacity: 0.2;
  animation: drift-up 45s linear infinite;
  animation-delay: -30s;
  /* Starts 30 seconds in */
}

/* Gem 7: Left to Right - Small, clear, fast - STARTS FROM BEGINNING */
.floating-gem:nth-child(7) {
  top: 50%;
  left: -10%;
  font-size: 2.5rem;
  opacity: 0;
  animation: drift-right 22s linear infinite;
  animation-delay: 10s;
}

/* Gem 8: Top to Bottom - Medium, clear - STARTS MID-ANIMATION */
.floating-gem:nth-child(8) {
  left: 80%;
  top: -10%;
  font-size: 2.8rem;
  opacity: 0.2;
  animation: drift-down 38s linear infinite;
  animation-delay: -22s;
  /* Starts 22 seconds in */
}

/* Gem 9: Right to Left - Large, blurry, slow - STARTS FROM BEGINNING */
.floating-gem:nth-child(9) {
  top: 25%;
  left: 110%;
  font-size: 3.2rem;
  filter: blur(2.5px);
  opacity: 0;
  animation: drift-left 48s linear infinite;
  animation-delay: 4s;
}

/* Gem 10: Bottom to Top - Medium, clear - STARTS FROM BEGINNING */
.floating-gem:nth-child(10) {
  left: 40%;
  top: 110%;
  font-size: 2.3rem;
  opacity: 0;
  animation: drift-up 35s linear infinite;
  animation-delay: 7s;
}

/* Drift from left to right with gentle wave */
@keyframes drift-right {
  0% {
    left: -5%;
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }

  5% {
    opacity: 0.2;
  }

  10% {
    transform: translateY(-20px) rotate(45deg);
  }

  25% {
    transform: translateY(15px) rotate(120deg);
  }

  40% {
    transform: translateY(-10px) rotate(200deg);
  }

  60% {
    transform: translateY(20px) rotate(280deg);
  }

  75% {
    transform: translateY(-15px) rotate(320deg);
  }

  90% {
    transform: translateY(10px) rotate(360deg);
  }

  95% {
    opacity: 0.2;
  }

  100% {
    left: 105%;
    transform: translateY(0) rotate(405deg);
    opacity: 0;
  }
}

/* Drift from right to left with gentle wave */
@keyframes drift-left {
  0% {
    left: 105%;
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }

  5% {
    opacity: 0.2;
  }

  10% {
    transform: translateY(20px) rotate(-45deg);
  }

  25% {
    transform: translateY(-15px) rotate(-120deg);
  }

  40% {
    transform: translateY(10px) rotate(-200deg);
  }

  60% {
    transform: translateY(-20px) rotate(-280deg);
  }

  75% {
    transform: translateY(15px) rotate(-320deg);
  }

  90% {
    transform: translateY(-10px) rotate(-360deg);
  }

  95% {
    opacity: 0.2;
  }

  100% {
    left: -5%;
    transform: translateY(0) rotate(-405deg);
    opacity: 0;
  }
}

/* Drift from top to bottom with gentle wave */
@keyframes drift-down {
  0% {
    top: -5%;
    transform: translateX(0) rotate(0deg);
    opacity: 0;
  }

  5% {
    opacity: 0.2;
  }

  10% {
    transform: translateX(-25px) rotate(50deg);
  }

  25% {
    transform: translateX(20px) rotate(130deg);
  }

  40% {
    transform: translateX(-15px) rotate(210deg);
  }

  60% {
    transform: translateX(25px) rotate(290deg);
  }

  75% {
    transform: translateX(-20px) rotate(330deg);
  }

  90% {
    transform: translateX(15px) rotate(370deg);
  }

  95% {
    opacity: 0.2;
  }

  100% {
    top: 105%;
    transform: translateX(0) rotate(410deg);
    opacity: 0;
  }
}

/* Drift from bottom to top with gentle wave */
@keyframes drift-up {
  0% {
    top: 105%;
    transform: translateX(0) rotate(0deg);
    opacity: 0;
  }

  5% {
    opacity: 0.2;
  }

  10% {
    transform: translateX(25px) rotate(-50deg);
  }

  25% {
    transform: translateX(-20px) rotate(-130deg);
  }

  40% {
    transform: translateX(15px) rotate(-210deg);
  }

  60% {
    transform: translateX(-25px) rotate(-290deg);
  }

  75% {
    transform: translateX(20px) rotate(-330deg);
  }

  90% {
    transform: translateX(-15px) rotate(-370deg);
  }

  95% {
    opacity: 0.2;
  }

  100% {
    top: -5%;
    transform: translateX(0) rotate(-410deg);
    opacity: 0;
  }
}

/* Header / Toolbar */
.toolbar {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 2px solid var(--surface-light);
  padding: 0.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

/* Header Button Section with Vote Tabs */
.header-button-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.header-vote-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

/* Header Vote Tabs */
.header-vote-tab {
  background: var(--surface);
  border: 2px solid var(--surface-light);
  border-radius: 8px;
  width: 48px;
  height: 48px;
  display: none;
  /* Hidden by default, shown when gem is opened */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.header-vote-tab svg {
  width: 24px;
  height: 24px;
  fill: var(--text-muted);
  stroke: none;
  transition: var(--transition);
}

.header-vote-dislike {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
  margin-right: -2px;
  z-index: 0;
}

.draw-button {
  z-index: 1;
}

.header-vote-like {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: none;
  margin-left: -2px;
  z-index: 0;
}

.header-vote-tab:hover {
  background: var(--surface-light);
  transform: translateY(-2px);
}

.header-vote-tab:hover svg {
  fill: var(--text);
}

.header-vote-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Active states - keep behind main button */
.header-vote-tab.active {
  z-index: 0;
}

.header-vote-like.active {
  background: var(--success);
  border-color: var(--success);
}

.header-vote-like.active svg {
  fill: white;
  animation: bounce 0.5s ease;
}

.header-vote-dislike.active {
  background: var(--danger);
  border-color: var(--danger);
}

.header-vote-dislike.active svg {
  fill: white;
  animation: bounce 0.5s ease;
}

/* Header Gem Title */
.header-gem-title {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
  padding: 0;
  min-height: 20px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

/* Button Help Text - appears inside the button below main text */
.button-help-text {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.65rem;
  font-weight: 500;
  text-align: center;
  opacity: 0.85;
  display: none;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1;
}

/* Show help text when button has the class */
.draw-button.button-with-help .button-help-text {
  display: block;
}

.header-gem-title.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
}

.header-gem-title.slide-in-right {
  animation: slideInFromRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.logo:hover {
  color: var(--primary-light);
  transform: translateY(-1px);
}

/* Animate the gem icon in the logo */
.logo::before {
  content: '💎';
  display: inline-block;
  margin-right: 0;
  animation: float-gem 3s ease-in-out infinite;
}

.draw-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  animation: pulse-glow 2s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* Main button content - gem icon + text stay horizontal */
.button-main-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* Button with help text - stack main content and help text vertically */
.draw-button.button-with-help {
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.3rem 2rem 0.25rem;
}

.draw-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.8);
  animation: pulse-glow-fast 1s ease-in-out infinite;
}

.draw-button:active {
  transform: translateY(0);
}

.draw-button:disabled {
  cursor: not-allowed;
  opacity: 0.9;
}

/* Loading state for Find Gems button */
.draw-button.loading-gem {
  background: linear-gradient(135deg, var(--success), #059669);
  animation: shimmer 1.5s ease-in-out infinite;
  box-shadow: 0 4px 25px rgba(16, 185, 129, 0.6),
    0 0 30px rgba(16, 185, 129, 0.4);
}

.draw-button.loading-gem:hover {
  transform: translateY(-2px);
  animation: shimmer 1s ease-in-out infinite;
}

/* Spinning gem icon animation */
.gem-icon.spinning {
  display: inline-block;
  animation: spin-gem 1s ease-in-out infinite;
}

@keyframes spin-gem {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.2);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Shimmer effect for loading button */
@keyframes shimmer {
  0% {
    background-position: -200% center;
    box-shadow: 0 4px 25px rgba(16, 185, 129, 0.6),
      0 0 30px rgba(16, 185, 129, 0.4);
  }

  50% {
    box-shadow: 0 4px 30px rgba(16, 185, 129, 0.8),
      0 0 40px rgba(16, 185, 129, 0.6),
      0 0 50px rgba(16, 185, 129, 0.4);
  }

  100% {
    background-position: 200% center;
    box-shadow: 0 4px 25px rgba(16, 185, 129, 0.6),
      0 0 30px rgba(16, 185, 129, 0.4);
  }
}

/* Animated glow effect for Find Gems button */
@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4),
      0 0 20px rgba(99, 102, 241, 0.3);
  }

  50% {
    box-shadow: 0 4px 25px rgba(99, 102, 241, 0.6),
      0 0 30px rgba(99, 102, 241, 0.5),
      0 0 40px rgba(118, 75, 162, 0.3);
  }
}

@keyframes pulse-glow-fast {

  0%,
  100% {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6),
      0 0 25px rgba(99, 102, 241, 0.4);
  }

  50% {
    box-shadow: 0 6px 40px rgba(99, 102, 241, 0.9),
      0 0 50px rgba(99, 102, 241, 0.7),
      0 0 60px rgba(118, 75, 162, 0.5);
  }
}

/* Floating gem icon animation */
.draw-button .gem-icon {
  display: inline-block;
  font-size: 2em;
  margin-right: 0;
  animation: float-gem 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 16px rgba(129, 140, 248, 0.5));
}

.draw-button:hover .gem-icon {
  animation: float-gem-fast 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 24px rgba(129, 140, 248, 0.7));
}

@keyframes float-gem {

  0%,
  100% {
    transform: translateX(-12px) translateY(0px) rotate(0deg);
  }

  25% {
    transform: translateX(-12px) translateY(-4px) rotate(-8deg);
  }

  50% {
    transform: translateX(-12px) translateY(-2px) rotate(0deg);
  }

  75% {
    transform: translateX(-12px) translateY(-5px) rotate(8deg);
  }
}

@keyframes float-gem-fast {

  0%,
  100% {
    transform: translateX(-12px) translateY(0px) rotate(0deg) scale(1);
  }

  25% {
    transform: translateX(-12px) translateY(-6px) rotate(-12deg) scale(1.1);
  }

  50% {
    transform: translateX(-12px) translateY(-3px) rotate(0deg) scale(1.05);
  }

  75% {
    transform: translateX(-12px) translateY(-7px) rotate(12deg) scale(1.1);
  }
}

.user-actions {
  display: flex;
  gap: 0.75rem;
  justify-self: end;
}

.admin-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-block;
}

.admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.submit-btn,
.signin-btn {
  background: var(--surface-light);
  color: var(--text);
  border: 1px solid var(--surface-light);
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn:hover,
.signin-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Main Feed */
.feed {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.feed h1 {
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

#stats-count {
  color: var(--primary-light);
  font-weight: 700;
}

/* Animated Tagline */
.animated-tagline {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-height: 2.5rem;
}

.tagline-static {
  color: #ffffff;
}

.tagline-rotating {
  position: relative;
  display: inline-block;
  color: var(--primary-light);
  font-weight: 800;
  min-width: 350px;
  text-align: left;
  height: 2.5rem;
  overflow: hidden;
  vertical-align: baseline;
  line-height: 2.5rem;
}

.category-item {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  animation: rotateCategory 24s linear infinite;
  background: linear-gradient(135deg, #FF1493, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  line-height: 2.5rem;
}

/* Stagger each category's animation */
.category-item:nth-child(1) {
  animation-delay: 0s;
}

.category-item:nth-child(2) {
  animation-delay: 2s;
}

.category-item:nth-child(3) {
  animation-delay: 4s;
}

.category-item:nth-child(4) {
  animation-delay: 6s;
}

.category-item:nth-child(5) {
  animation-delay: 8s;
}

.category-item:nth-child(6) {
  animation-delay: 10s;
}

.category-item:nth-child(7) {
  animation-delay: 12s;
}

.category-item:nth-child(8) {
  animation-delay: 14s;
}

.category-item:nth-child(9) {
  animation-delay: 16s;
}

.category-item:nth-child(10) {
  animation-delay: 18s;
}

.category-item:nth-child(11) {
  animation-delay: 20s;
}

.category-item:nth-child(12) {
  animation-delay: 22s;
}

@keyframes rotateCategory {
  0% {
    opacity: 0;
  }

  0.5% {
    opacity: 1;
  }

  7.8% {
    opacity: 1;
  }

  8.33% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .animated-tagline {
    font-size: 1.3rem;
    min-height: 2rem;
  }

  .tagline-rotating {
    min-width: 200px;
    height: 2rem;
  }
}

@media (max-width: 480px) {
  .animated-tagline {
    font-size: 1.1rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  .tagline-rotating {
    min-width: 180px;
    text-align: center;
  }
}

/* Categories */
.categories-wrapper {
  margin-bottom: 3rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.categories {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.cat-btn {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--surface-light);
  padding: 0.6rem 1.25rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.cat-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.cat-btn.following {
  border-color: var(--success);
}

.cat-follow-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--text);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 0;
  line-height: 1;
  pointer-events: none;
}

.cat-btn.following .cat-follow-btn {
  background: var(--success);
  color: white;
}

.cat-btn.active .cat-follow-btn {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.cat-btn.active .cat-follow-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Gem Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Gem Card */
.gem-card {
  background: var(--surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--surface-light);
  display: flex;
  flex-direction: column;
}

.gem-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
  border-color: var(--primary);
}

.gem-card.saved {
  border-color: var(--success);
  border-width: 2px;
}

.gem-card.saved:hover {
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
}

.screenshot-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--surface-light);
  position: relative;
}

.screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gem-card:hover .screenshot {
  transform: scale(1.05);
}

.info {
  padding: 1.5rem;
  flex-grow: 1;
}

.title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.pitch {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.url {
  font-size: 0.85rem;
  color: var(--primary-light);
  word-break: break-all;
  display: block;
}

.actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--surface-light);
  align-items: center;
}

/* Vote Container for Cards */
.vote-container-card {
  --col-gray: #334155;
  --col-white: #fff;
  --col-like: #10B981;
  --col-dislike: #EF4444;
  background-color: var(--col-gray);
  border-radius: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  user-select: none;
  flex-shrink: 0;
}

.vote-container-card .icon {
  cursor: pointer;
  fill: var(--col-white);
  height: 20px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.vote-container-card .icon svg {
  width: 20px;
  height: 20px;
}

.vote-container-card .icon.like {
  margin-left: 6px;
}

.vote-container-card .icon.dislike {
  margin-right: 6px;
}

.vote-container-card label input {
  display: none;
}

.vote-container-card .icon:hover svg {
  transform: scale(1.1);
}

.vote-container-card .vote-like-input:checked+svg {
  fill: var(--col-like);
  animation: bounce 0.35s ease-in-out;
}

.vote-container-card .vote-dislike-input:checked+svg {
  fill: var(--col-dislike);
  animation: bounce 0.35s ease-in-out;
}

.vote-container-card .count {
  flex: 1;
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  padding: 0 8px;
  min-width: 35px;
}

@keyframes bounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.upvote-btn,
.save-btn,
.visit-btn {
  flex: 1;
  background: var(--surface-light);
  color: var(--text);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.upvote-btn:hover {
  background: var(--danger);
  transform: scale(1.05);
}

.save-btn:hover {
  background: var(--warning);
  transform: scale(1.05);
}

.visit-btn {
  background: var(--primary);
}

.visit-btn:hover {
  background: var(--primary-dark);
  transform: translateX(3px);
}

.tags {
  padding: 0 1.5rem 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--surface-light);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: var(--transition);
}

/* Enhanced hover for clickable tags in gem cards */
.tags .tag-clickable {
  cursor: pointer;
  background: var(--surface-light);
  border: 1px solid var(--surface-light);
}

.tags .tag-clickable:hover {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--text);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tags .tag-clickable.tag-following {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--success);
  color: var(--text);
  font-weight: 600;
}

.tags .tag-clickable.tag-following:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--success);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Load More Button */
.load-more {
  display: block;
  margin: 0 auto;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--primary);
  padding: 1rem 3rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.load-more:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  backdrop-filter: blur(5px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  max-width: 600px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--surface-light);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
  transform: rotate(90deg);
}

.modal-content h2 {
  margin-bottom: 1.5rem;
  color: var(--text);
  font-size: 1.8rem;
}

#submit-gem-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#submit-gem-form input,
#submit-gem-form textarea,
#submit-gem-form select {
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--surface-light);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

/* Category Checkboxes */
.category-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  background: var(--background);
  border: 1px solid var(--surface-light);
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.category-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 2px solid var(--surface-light);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.category-checkbox-label:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.category-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.category-checkbox-label input[type="checkbox"]:checked+span {
  font-weight: 700;
  color: var(--primary-light);
}

.category-checkbox-label input[type="checkbox"]:checked {
  background: var(--primary);
}

.category-checkbox-label:has(input[type="checkbox"]:checked) {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
}

.category-checkbox-label:has(input[type="checkbox"]:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

#submit-gem-form input:focus,
#submit-gem-form textarea:focus,
#submit-gem-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

#submit-gem-form textarea {
  resize: vertical;
  min-height: 100px;
  width: 100%;
}

.textarea-wrapper {
  position: relative;
  width: 100%;
}

.textarea-wrapper textarea {
  width: 100%;
  box-sizing: border-box;
}

.char-counter {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.char-counter.warning {
  color: var(--warning);
}

.char-counter.danger {
  color: var(--danger);
}

.submit-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.submit-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.cancel-button {
  background: #374151;
  color: #F1F5F9;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-button:hover {
  background: #4B5563;
  transform: translateY(-2px);
}

.cancel-button:active {
  transform: translateY(0);
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--surface-light);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .toolbar {
    flex-wrap: wrap;
    padding: 1rem;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .draw-button {
    order: 3;
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .feed h1 {
    font-size: 2rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .categories {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 1rem;
  }

  .modal-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .feed {
    padding: 2rem 1rem;
  }

  .user-actions {
    gap: 0.5rem;
  }

  .submit-btn,
  .signin-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Loading Animation */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ============ AUTHENTICATION STYLES ============ */

/* Auth Modal Specific */
.auth-modal {
  max-width: 450px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--surface-light);
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Form Footer */
.form-footer {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

/* Text Link */
.text-link {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
  text-decoration: none;
}

.text-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Auth Button */
.auth-button {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.auth-button:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.auth-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Auth Divider */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--surface-light);
}

.auth-divider span {
  position: relative;
  background: var(--surface);
  padding: 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Auth Switch */
.auth-switch {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Auth Error/Success Messages */
.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-error.hidden {
  display: none;
}

.auth-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-success.hidden {
  display: none;
}

/* Email Verification Banner */
.verification-banner {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1rem 2rem;
  z-index: 1001;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  animation: slideDown 0.3s ease;
}

.verification-banner.hidden {
  display: none;
}

.banner-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.banner-icon {
  font-size: 1.5rem;
}

.banner-text {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.banner-button {
  background: white;
  color: var(--primary);
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.banner-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.banner-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.banner-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: var(--transition);
  opacity: 0.8;
}

.banner-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* Logged-in User Button */
.signin-btn.logged-in {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 700;
}

.signin-btn.logged-in:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

/* Banner Animation */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile Responsive Auth */
@media (max-width: 768px) {
  .auth-modal {
    max-width: 100%;
  }

  .modal-content {
    padding: 2rem 1.5rem;
  }

  .verification-banner {
    top: 60px;
    padding: 0.75rem 1rem;
  }

  .banner-content {
    gap: 0.75rem;
  }

  .banner-text {
    flex: 1 1 100%;
    font-size: 0.85rem;
  }

  .banner-button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* ============ USER DROPDOWN MENU ============ */

.user-menu-container {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--surface-light);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  min-width: 220px;
  z-index: 1000;
  animation: dropdownSlide 0.2s ease;
}

.user-dropdown.hidden {
  display: none;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: none;
  padding: 0.875rem 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

.dropdown-item:hover {
  background: var(--surface-light);
}

.dropdown-item span:first-child {
  font-size: 1.2rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--surface-light);
  margin: 0.25rem 0;
}

/* ============ PROFILE MODAL ============ */

.profile-modal-content {
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
}

.profile-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--surface-light);
  flex-wrap: wrap;
}

.profile-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.profile-tab:hover {
  color: var(--text);
  background: var(--surface-light);
}

.profile-tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}

.profile-content {
  min-height: 400px;
}

.profile-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.profile-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.profile-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.profile-empty-text {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.profile-empty-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-list-item {
  background: var(--background);
  border: 1px solid var(--surface-light);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.profile-list-item:hover {
  border-color: var(--primary);
  transform: translateX(5px);
}

.profile-list-item-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-list-item-icon {
  font-size: 1.5rem;
}

.profile-list-item-text {
  display: flex;
  flex-direction: column;
}

.profile-list-item-name {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.profile-list-item-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.profile-list-item-action {
  background: var(--danger);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.profile-list-item-action:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

/* Following Sections - Organized Layout */
.following-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.following-section {
  background: var(--background);
  border: 1px solid var(--surface-light);
  border-radius: 8px;
  padding: 1.5rem;
}

.following-section-title {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Compact List Styles */
.profile-list-compact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-list-item-compact {
  background: var(--surface);
  border: 1px solid var(--surface-light);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  min-height: 36px;
}

.profile-list-item-compact:hover {
  border-color: var(--primary);
  transform: translateX(3px);
}

.profile-list-item-name-compact {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
}

.profile-list-item-action-compact {
  background: transparent;
  color: var(--text-muted);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.profile-list-item-action-compact:hover {
  background: var(--danger);
  color: white;
  transform: scale(1.15);
}

/* Profile Category Item with Description */
.profile-category-item {
  padding: 0.75rem;
  min-height: auto;
}

.profile-category-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-category-description {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 400;
}

/* Curator Cards in Profile Modal */
.curator-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.curator-card-compact {
  background: var(--surface);
  border: 1px solid var(--surface-light);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.curator-card-compact:hover {
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateX(3px);
}

.curator-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.3);
  flex-shrink: 0;
}

.curator-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.curator-card-username {
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.curator-card-followers {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.curator-card-unfollow {
  background: transparent;
  color: var(--text-muted);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.curator-card-unfollow:hover {
  background: var(--danger);
  color: white;
  transform: scale(1.15);
}

/* Saved Gems Compact List */
.saved-gem-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.saved-gem-thumbnail {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-light);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.saved-gem-thumbnail::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.saved-gem-thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.saved-gem-thumbnail:hover::after {
  opacity: 1;
}

.saved-gem-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saved-gem-info {
  flex: 1;
  min-width: 0;
}

.saved-gem-url {
  color: var(--primary-light);
  font-size: 0.8rem;
  word-break: break-all;
  display: block;
  margin-top: 0.25rem;
}

.saved-gem-pitch {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-gem-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.view-gem-btn {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
}

.view-gem-btn:hover {
  background: var(--primary-dark);
}

.remove-gem-btn {
  background: var(--danger);
}

.remove-gem-btn:hover {
  background: #DC2626;
}

/* ============ ACCOUNT SETTINGS MODAL ============ */

.settings-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--surface-light);
}

.settings-section:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
}

.settings-section h3 {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.avatar-section {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.current-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid var(--primary);
  flex-shrink: 0;
}

.current-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  font-size: 3rem;
}

.avatar-options {
  flex: 1;
}

.tool-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tool-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Mobile Responsive - Profile & Settings */
@media (max-width: 768px) {
  .profile-modal-content {
    max-width: 100%;
    padding: 1.5rem;
  }

  .profile-tabs {
    gap: 0.25rem;
  }

  .profile-tab {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .avatar-section {
    flex-direction: column;
    text-align: center;
  }

  .current-avatar {
    width: 100px;
    height: 100px;
  }
}

/* ============ DETAILED GEM MODAL ============ */

.detailed-gem-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background);
  z-index: 999;
  overflow-y: auto;
  padding-top: 105px;
}

.detailed-gem-modal.hidden {
  display: none;
}

/* Hide main feed when detailed modal is open */
body:has(.detailed-gem-modal:not(.hidden)) .feed {
  display: none;
}

body:has(.detailed-gem-modal:not(.hidden)) .footer {
  display: none;
}

/* Hide animated background when detailed modal is open - clean background for gem pages */
body:has(.detailed-gem-modal:not(.hidden)) .gem-background-layer,
body:has(.detailed-gem-modal:not(.hidden)) .floating-gem {
  display: none;
}

.detailed-gem-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  padding-top: 1rem;
  position: relative;
  z-index: 1;
}

.detailed-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.detail-back-btn {
  display: none;
}

/* Hide all detail page button/vote elements - these are now in the header */
.detail-next-gem-btn,
.detail-vote-tab,
.detail-button-section,
.detail-site-name-container {
  display: none !important;
}

/* Title row container for admin edit button + title */
.detail-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Admin edit button */
.admin-edit-gem-btn {
  background: var(--warning);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.admin-edit-gem-btn:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

.admin-edit-gem-btn svg {
  stroke: white;
}

/* Left-aligned gem title in detail view - on separate line below button */
.detail-gem-title-centered {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  padding: 0;
  text-align: left;
  flex: 1;
  line-height: 1.2;
}

/* Single Column Layout */
.detailed-content-single {
  max-width: 770px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Animated Content Wrapper - Only this animates, not the button */
.detail-animated-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  position: relative;
  z-index: 10;
}

/* Elements below About section need extra spacing */
.detail-actions-container {
  margin-top: 0.75rem;
}

.detail-stats {
  margin-top: 0.75rem;
}

.comments-section {
  margin-top: 1rem;
}

/* Keep old selector for transitions */
.detailed-content {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

/* Screenshot Carousel Container */
.screenshot-carousel {
  position: relative;
  width: 100%;
  margin: 0.3rem 0 0 0;
}

.detailed-screenshot {
  width: 100%;
  border-radius: var(--border-radius);
  border: 2px solid var(--surface-light);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
  display: block;
}

.detailed-screenshot:hover {
  cursor: pointer;
}

/* Carousel Navigation Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  z-index: 10;
  padding: 0;
}

.carousel-arrow-left {
  left: -100px;
}

.carousel-arrow-right {
  right: -100px;
}

.carousel-arrow:hover {
  opacity: 0.7;
}

.carousel-arrow:active {
  opacity: 0.5;
}

.carousel-arrow svg {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.carousel-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Carousel Dots Indicator */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.carousel-dot.active {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.detail-visit-btn {
  background: var(--primary);
  color: white;
  padding: 1.25rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: none;
}

.detail-visit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

/* Save Button - Outline Style */
.detail-save-btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid var(--surface-light);
  padding: 1.25rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
}

.detail-save-btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--text);
  transform: translateY(-2px);
}

.detail-save-btn-outline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Saved state - filled with green */
.detail-save-btn-outline.saved {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.detail-save-btn-outline.saved:hover:not(:disabled) {
  background: #059669;
  border-color: #059669;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

/* Info Section */
.detailed-info-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.detail-url {
  color: var(--primary-light);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
  transition: var(--transition);
}

.detail-url:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* URL as smaller text (no hyperlink) */
.detail-url-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  word-break: break-all;
  line-height: 1.4;
}

.detail-pitch {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.7;
  font-weight: 500;
}

/* Vote Container Wrapper for centering - HIDDEN, votes now in header and stats */
.vote-container-wrapper {
  display: none !important;
}

/* Thumbs Up/Down Vote Container */
.vote-container {
  --col-gray: #334155;
  --col-white: #fff;
  --col-like: #10B981;
  --col-dislike: #EF4444;
  --transition: 350ms;
  background-color: var(--col-gray);
  width: 180px;
  border-radius: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  user-select: none;
  --zero: translateY(calc(50% - 11px));
  --one: translateY(calc(40% - 11px));
  --two: translateY(calc(30% - 11px));
  --three: translateY(calc(20% - 11px));
  --four: translateY(calc(10% - 11px));
  --five: translateY(calc(0% - 11px));
  --six: translateY(calc(-10% - 11px));
  --seven: translateY(calc(-20% - 11px));
  --eight: translateY(calc(-30% - 11px));
  --nine: translateY(calc(-40% - 11px));
  --ten: translateY(calc(-50% - 11px));
}

.vote-container:has(#vote-like:checked) .count {
  border-left-color: var(--col-like);
  border-right-color: transparent;
}

.vote-container:has(#vote-like:checked) .count .number:first-child {
  transform: var(--nine);
}

.vote-container:has(#vote-like:checked) .count .number:nth-child(2) {
  transform: var(--five);
}

.vote-container:has(#vote-like:checked) .count .number:last-child {
  transform: var(--three);
}

.vote-container:has(#vote-dislike:checked)>.count {
  border-right-color: var(--col-dislike);
  border-left-color: transparent;
}

.vote-container:has(#vote-dislike:checked)>.count .number:first-child {
  transform: var(--zero);
}

.vote-container:has(#vote-dislike:checked)>.count .number:nth-child(2) {
  transform: var(--zero);
}

.vote-container:has(#vote-dislike:checked)>.count .number:last-child {
  transform: var(--nine);
}

.vote-container label input {
  display: none;
}

.vote-container #vote-like:checked+svg {
  animation: evaluation-animation var(--transition) ease-in-out 0s 1 normal both;
  fill: var(--col-like);
}

.vote-container #vote-dislike:checked+svg {
  animation: evaluation-animation var(--transition) ease-in-out 0s 1 normal both;
  fill: var(--col-dislike);
}

.vote-container .icon {
  cursor: pointer;
  fill: var(--col-white);
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-container .icon.like {
  margin-left: 12px;
}

.vote-container .icon.dislike {
  margin-right: 12px;
}

.vote-container .count {
  transition: var(--transition);
  flex: 1;
  border-left: 1px solid var(--col-white);
  border-right: 1px solid var(--col-white);
  position: relative;
  height: 32px;
  overflow: hidden;
  margin: auto;
  color: white;
  font-size: 20px;
  font-family: sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5px;
  flex-direction: row;
}

.vote-container .count .number {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(50% - 8px));
  transition: 1000ms cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.vote-container .count .number:first-child {
  transition-delay: 200ms;
}

.vote-container .count .number:nth-child(2) {
  transition-delay: 150ms;
}

.vote-container .count .number:last-child {
  transition-delay: 50ms;
}

@keyframes evaluation-animation {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.1) rotate(-10deg);
  }
}

/* Statistics - Now 5 columns with Likes/Dislikes */
.detail-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.stat-item {
  background: var(--surface);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--surface-light);
  transition: var(--transition);
}

.stat-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-light);
  margin-bottom: 0.25rem;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Description Section */
/* Curator Profile Section */
.curator-profile-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-light);
}

.curator-profile-card {
  display: flex;
  align-items: stretch;
  gap: 2rem;
}

.curator-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.curator-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
  flex-shrink: 0;
}

.curator-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.curator-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.curator-username-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.curator-username {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.curator-followers {
  font-size: 0.75rem;
  color: #94A3B8;
  margin: 0;
  line-height: 1;
}

.curator-divider {
  width: 1px;
  background: var(--surface-light);
  align-self: stretch;
  flex-shrink: 0;
}

.curator-right {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.follow-curator-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.follow-curator-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.4);
}

.follow-curator-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(99, 102, 241, 0.3);
}

.follow-curator-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.follow-curator-btn.following {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  box-shadow: none;
  padding: 0.2rem 0.7rem;
}

.follow-curator-btn.following:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
}

@media (max-width: 640px) {
  .curator-profile-card {
    flex-wrap: wrap;
  }

  .curator-info {
    flex: 1 1 100%;
    order: 2;
  }

  .curator-avatar {
    order: 1;
  }

  .follow-curator-btn {
    order: 3;
    margin-left: auto;
  }
}

.detail-description-section {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--surface-light);
}

.detail-description-section h3 {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.detail-description {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Categories Container within About Section */
.detail-categories-container {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-light);
}

.detail-categories-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* Tags */
.detail-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail-tags .tag {
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--surface-light);
}

/* Clickable tags with follow functionality */
.tag-clickable {
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tag-clickable:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.tag-clickable.tag-following {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.tag-follow-indicator {
  background: rgba(255, 255, 255, 0.2);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
}

.tag-clickable.tag-following .tag-follow-indicator {
  background: var(--success);
  color: white;
}

/* Comments Section */
.comments-section {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--surface-light);
}

.comments-section h3 {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.comment-count {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
}

.add-comment-form {
  margin-bottom: 2rem;
}

#comment-input {
  width: 100%;
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--surface-light);
  padding: 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  transition: var(--transition);
}

#comment-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.comment-char-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.comment-submit-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.comment-submit-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.comment-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-item {
  background: var(--background);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--surface-light);
}

/* Enhanced Comment Header with Avatar */
.comment-header-enhanced {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.3);
  flex-shrink: 0;
}

.comment-header-info {
  flex: 1;
  min-width: 0;
}

.comment-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.comment-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.comment-followers {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-follow-btn {
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.comment-follow-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.4);
}

.comment-follow-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.comment-follow-btn.following {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  box-shadow: none;
  padding: 0.2rem 0.7rem;
}

.comment-follow-btn.following:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
}

.comment-author-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Legacy comment header (for old comments) */
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.comment-author {
  color: var(--primary-light);
  font-weight: 700;
  font-size: 1rem;
}

.comment-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.comment-text {
  color: var(--text);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Slide animations for gem transitions */
.detailed-content {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.detailed-content.slide-out-left,
.detailed-content-single.slide-out-left,
.detail-animated-content.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
}

.detailed-content.slide-in-right,
.detailed-content-single.slide-in-right,
.detail-animated-content.slide-in-right {
  animation: slideInFromRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading state for Find Next Gem button */
.detail-next-gem-btn.loading-gem {
  background: linear-gradient(135deg, #6366F1, #4F46E5);
  animation: pulse-button 1.5s ease-in-out infinite;
}

@keyframes pulse-button {

  0%,
  100% {
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
  }

  50% {
    box-shadow: 0 6px 35px rgba(16, 185, 129, 0.8),
      0 0 40px rgba(16, 185, 129, 0.4);
  }
}

/* Mobile Responsive - Detailed Gem */
@media (max-width: 1024px) {
  .detailed-content {
    grid-template-columns: 1fr;
  }

  .detailed-screenshot-section {
    order: 2;
  }

  .detailed-info-section {
    order: 1;
  }
}

@media (max-width: 768px) {
  .detailed-gem-container {
    padding: 1rem;
  }

  #detail-gem-title {
    font-size: 1.5rem;
  }

  .detailed-content {
    gap: 2rem;
  }

  .detail-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .stat-item {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .vote-container {
    width: 150px;
  }
}

/* ============ NEW HOMEPAGE SECTIONS STYLES ============ */

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 4rem;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.view-all-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.view-all-link:hover {
  color: var(--primary);
  transform: translateX(5px);
}

/* Sponsored Gems Section */
.sponsored-section {
  margin-bottom: 5rem;
}

.sponsored-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.sponsored-gem-card {
  background: var(--surface);
  border-radius: var(--border-radius);
  overflow: visible;
  border: 2px solid var(--primary);
  transition: var(--transition);
  position: relative;
}

.sponsored-gem-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 50px rgba(99, 102, 241, 0.4);
  border-color: var(--primary-light);
}

.sponsored-screenshot-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--surface-light);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.sponsored-screenshot {
  width: 100%;
  transition: opacity 0.2s ease-in-out;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.sponsored-gem-card:hover .sponsored-screenshot {
  transform: scale(1.1);
}

.sponsored-badge {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
  z-index: 10;
}

.sponsored-info {
  padding: 1.5rem;
  padding-bottom: 2.5rem;
  /* Extra padding to accommodate badge hanging off bottom */
}

.sponsored-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.sponsored-pitch {
  font-size: 0.95rem;
  color: var(--text-muted);

  margin-bottom: 1rem;
  line-height: 1.5;
}

.sponsored-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sponsored-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Leaderboards Section */
.leaderboards-section {
  margin-bottom: 5rem;
}

.leaderboards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.leaderboard-column {
  background: var(--surface);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid var(--surface-light);
}

.leaderboard-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaderboard-item {
  background: var(--background);
  border: 1px solid var(--surface-light);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.leaderboard-item:hover {
  border-color: var(--primary);
  transform: translateX(5px);
}

.leaderboard-rank {
  font-size: 1.5rem;
  font-weight: 800;
  min-width: 50px;
  text-align: center;
}

.leaderboard-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
  flex-shrink: 0;
}

.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-gem-thumb {
  width: 60px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.leaderboard-gem-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.leaderboard-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.leaderboard-score {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-light);
}

/* Curator Follow Button in Leaderboard - Inline Version */
.curator-follow-btn-inline {
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.curator-follow-btn-inline:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.4);
}

.curator-follow-btn-inline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.curator-follow-btn-inline.following {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  box-shadow: none;
  padding: 0.2rem 0.7rem;
}

.curator-follow-btn-inline.following:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
}

.leaderboard-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Category Showcase Section */
.category-showcase-section {
  margin-bottom: 5rem;
}

.category-showcase-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.category-showcase {
  background: transparent;
  border-radius: 0;
  padding: 2rem 0;
  border: none;
}

.category-showcase-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.category-gems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.category-gem-card {
  background: var(--background);
  border: 1px solid var(--surface-light);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition);
}

.category-gem-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.category-gem-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.category-gem-info {
  padding: 1rem;
}

.category-gem-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-gem-pitch {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.category-showcase-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Browse All Section */
.browse-all-section {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 2px solid var(--surface-light);
}

/* Mobile Responsive - New Homepage Sections */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .sponsored-grid {
    grid-template-columns: 1fr;
  }

  .leaderboards-container {
    grid-template-columns: 1fr;
  }

  .category-gems-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    margin-bottom: 3rem;
  }

  .sponsored-section,
  .leaderboards-section,
  .category-showcase-section {
    margin-bottom: 3rem;
  }

  .leaderboard-column {
    padding: 1.5rem;
  }

  .category-showcase {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .leaderboard-item {
    padding: 0.75rem;
  }

  .leaderboard-rank {
    font-size: 1.2rem;
    min-width: 40px;
  }

  .leaderboard-avatar {
    width: 40px;
    height: 40px;
  }

  .leaderboard-name {
    font-size: 0.9rem;
  }

  .leaderboard-meta {
    font-size: 0.8rem;
  }
}

/* ============ ONBOARDING MODAL ============ */

.onboarding-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 2rem;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.onboarding-modal.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.onboarding-content {
  background: var(--surface);
  border-radius: var(--border-radius);
  padding: 1rem 2rem 2rem 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  border: 2px solid var(--primary);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.onboarding-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--surface-light);
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-close:hover {
  background: var(--danger);
  color: white;
  transform: rotate(90deg);
}

.onboarding-header {
  text-align: center;
  margin-bottom: 1.5rem;
  margin-top: 0;
}

.onboarding-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.onboarding-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.onboarding-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.onboarding-step {
  background: var(--background);
  border: 1px solid var(--surface-light);
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
}

.step-number {
  position: absolute;
  top: -15px;
  left: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 0.35rem 1rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
}

.onboarding-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.onboarding-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
  max-height: 160px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--background);
  border-radius: 8px;
  border: 1px solid var(--surface-light);
}

/* Onboarding Find Gems Button Container */
#onboarding-find-gems-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.25rem;
}

/* Custom scrollbar for categories */
.onboarding-categories::-webkit-scrollbar {
  width: 8px;
}

.onboarding-categories::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 4px;
}

.onboarding-categories::-webkit-scrollbar-thumb {
  background: var(--surface-light);
  border-radius: 4px;
}

.onboarding-categories::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.onboarding-cat-btn {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--surface-light);
  padding: 0.6rem 1.25rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.onboarding-cat-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.onboarding-cat-btn.following {
  background: var(--success);
  border-color: var(--success);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.cat-follow-indicator {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--text);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.onboarding-cat-btn.following .cat-follow-indicator {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.onboarding-quick-action {
  text-align: center;
  margin-top: 0.75rem;
}

.follow-all-link {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.follow-all-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.onboarding-find-gems-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 1.25rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

.onboarding-find-gems-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.8);
  animation: pulse-glow-fast 1s ease-in-out infinite;
}

.onboarding-find-gems-btn .gem-icon {
  display: inline-block;
  font-size: 1.5em;
  animation: float-gem 3s ease-in-out infinite;
}

.onboarding-find-gems-btn:hover .gem-icon {
  animation: float-gem-fast 1.5s ease-in-out infinite;
}

.onboarding-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface-light);
}

.onboarding-link {
  background: none;
  border: none;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.onboarding-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-divider {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Mobile Responsive - Onboarding */
@media (max-width: 768px) {
  .onboarding-content {
    padding: 2rem 1.5rem;
    max-height: 95vh;
  }

  .onboarding-header h2 {
    font-size: 1.5rem;
  }

  .onboarding-header p {
    font-size: 1rem;
  }

  .onboarding-icon {
    font-size: 3rem;
  }

  .onboarding-steps {
    gap: 2rem;
  }

  .onboarding-step {
    padding: 1.5rem;
  }

  .onboarding-step h3 {
    font-size: 1.1rem;
  }

  .onboarding-cat-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .onboarding-find-gems-btn {
    font-size: 1rem;
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .onboarding-modal {
    padding: 1rem;
  }

  .onboarding-content {
    padding: 1.5rem 1rem;
  }

  .onboarding-close {
    top: 1rem;
    right: 1rem;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }

  .onboarding-categories {
    gap: 0.5rem;
  }
}

/* ============ IMAGE VIEWER OVERLAY ============ */

.image-viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.image-viewer-overlay.visible {
  opacity: 1;
}

.image-viewer-overlay.fade-out {
  opacity: 0;
}

.image-viewer-content {
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zoomIn 0.3s ease;
}

.image-viewer-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============ GEM PREVIEW BACKGROUND (BEHIND MODAL) ============ */

.gem-preview-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gem-preview-background.visible {
  opacity: 1;
}

.preview-header {
  background: var(--surface);
  border-bottom: 2px solid var(--surface-light);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.preview-close-btn {
  background: var(--surface-light);
  color: var(--text);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.preview-close-btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.preview-url {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-external-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.preview-external-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.6);
}

.gem-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  flex: 1;
}

/* ============ MODAL ZOOM-OUT ANIMATION ============ */

.modal-zoom-out {
  animation: zoomOutFade 0.6s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes zoomOutFade {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  50% {
    transform: scale(0.95) translateY(10px);
    opacity: 0.7;
  }

  100% {
    transform: scale(0.7) translateY(50px);
    opacity: 0;
  }
}

/* Mobile Responsive - Preview */
@media (max-width: 768px) {
  .preview-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
  }

  .preview-close-btn,
  .preview-external-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .preview-url {
    flex: 1 1 100%;
    order: 3;
    margin-top: 0.5rem;
    font-size: 0.8rem;
  }
}

/* ============ SCREENSHOT CAROUSEL ============ */

/* Carousel Controls Container */
.screenshot-carousel-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Carousel Arrow Buttons */
.carousel-arrow {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
  flex-shrink: 0;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.carousel-arrow:active {
  transform: scale(0.95);
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
  stroke: white;
}

/* Carousel Counter */
.carousel-counter {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
  user-select: none;
  flex-shrink: 0;
}

/* Screenshot transition effect */
.detailed-screenshot {
  transition: opacity 0.15s ease-in-out;
}

/* Parent container needs relative positioning for absolute carousel controls */
.detailed-screenshot-wrapper {
  position: relative;
  width: 100%;
}

/* Mobile Responsive - Carousel */
@media (max-width: 768px) {
  .screenshot-carousel-controls {
    bottom: 0.75rem;
    gap: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .carousel-arrow {
    width: 32px;
    height: 32px;
  }

  .carousel-arrow svg {
    width: 18px;
    height: 18px;
  }

  .carousel-counter {
    font-size: 0.85rem;
    min-width: 45px;
  }
}

@media (max-width: 480px) {
  .screenshot-carousel-controls {
    bottom: 0.5rem;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
  }

  .carousel-arrow {
    width: 28px;
    height: 28px;
  }

  .carousel-arrow svg {
    width: 16px;
    height: 16px;
  }

  .carousel-counter {
    font-size: 0.8rem;
    min-width: 40px;
  }
}
