/* VideoGrid - Styles */
:root {
  --primary: #8B5CF6;
  /* Vibrant Purple */
  --primary-dark: #7c3aed;
  --secondary: #06B6D4;
  /* Turquoise */
  --accent: #F97316;
  /* Orange */
  --yellow: #FBBF24;
  /* Yellow - adding for reference */

  /* Light Theme Overhaul - Premium Gallery */
  --bg-dark: #ffffff;
  /* Pure white */
  --bg-darker: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  /* Glassy */
  --bg-card-hover: rgba(255, 255, 255, 0.95);

  --text: #18181b;
  --text-muted: #71717a;

  --border: rgba(0, 0, 0, 0.06);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --success: #10b981;
  --error: #ef4444;
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.grid-animation {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 80px;
  margin: 0 auto 24px;
}

.grid-cell {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 4px;
  animation: pulse 1.5s ease-in-out infinite;
}

.grid-cell:nth-child(1) {
  animation-delay: 0s;
}

.grid-cell:nth-child(2) {
  animation-delay: 0.1s;
}

.grid-cell:nth-child(3) {
  animation-delay: 0.2s;
}

.grid-cell:nth-child(4) {
  animation-delay: 0.3s;
}

.grid-cell:nth-child(5) {
  animation-delay: 0.4s;
}

.grid-cell:nth-child(6) {
  animation-delay: 0.5s;
}

.grid-cell:nth-child(7) {
  animation-delay: 0.6s;
}

.grid-cell:nth-child(8) {
  animation-delay: 0.7s;
}

.grid-cell:nth-child(9) {
  animation-delay: 0.8s;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.loading-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.loading-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Main Canvas */
#grid-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#grid-canvas:active {
  cursor: grabbing;
}

/* Side Navigation Buttons - Modern Glassmorphism UI */
.nav-side {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  /* Smaller */
  height: 60px;
  /* Smaller */
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-muted);
  font-size: 1.2rem;
  /* Smaller icon */
  cursor: pointer;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-prev {
  left: 0;
  border-radius: 0 20px 20px 0;
  padding-left: 4px;
}

.nav-next {
  right: 0;
  border-radius: 20px 0 0 20px;
  padding-right: 4px;
}

.nav-side:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
  color: white;
  width: 68px;
  box-shadow: 0 8px 40px rgba(139, 92, 246, 0.4);
}

.nav-side:active {
  transform: translateY(-50%) scale(0.95);
}

.nav-side.hidden-ui {
  opacity: 0;
  pointer-events: none;
}

.nav-side i {
  transition: transform 0.2s ease;
}

.nav-prev:hover i {
  transform: translateX(-3px);
}

.nav-next:hover i {
  transform: translateX(3px);
}

/* Video Overlay */
.video-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.3s ease;
}

.close-video-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.close-video-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.video-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.video-container {
  width: 100%;
  height: 90vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#youtube-player {
  width: 100%;
  height: 88vh;
  border-radius: 0;
  overflow: hidden;
}


#youtube-player iframe {
  width: 100%;
  height: 100%;
}

.video-info {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 30px;
  color: white;
  z-index: 150;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.video-info.hidden {
  display: none !important;
}

.custom-controls {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  pointer-events: auto;
}

.progress-container {
  flex: 1;
  padding: 0;
}

#video-progress {
  width: 100%;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#video-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
}

.video-overlay-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.video-overlay-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.video-overlay-btn.liked {
  color: #ef4444;
  border-color: #ef4444;
  animation: heartPop 0.3s ease;
}

@keyframes heartPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4);
  }

  100% {
    transform: scale(1);
  }
}

.video-meta {
  text-align: right;
  position: fixed;
  bottom: 80px;
  right: 30px;
  pointer-events: none;
}

.video-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 4px;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.video-artist {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0;
  letter-spacing: 0.5px;
}


.video-genre {
  display: none;
  /* Hidden - user said to hide unnecessary info */
}

.video-stats {
  display: none;
  /* Hidden - user said to hide unnecessary info */
}

.video-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-stats i {
  color: var(--primary);
}

/* Controls Panel */
.controls-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  /* No gradient */
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 200;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.controls-panel.hidden-ui {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.controls-left,
.controls-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.control-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.control-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: scale(1.05);
}

.control-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

.play-btn {
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
  background: var(--primary);
  border-color: var(--primary);
}

.play-btn:hover {
  background: var(--primary-dark);
}

.genre-filter-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 400px;
  padding-bottom: 4px;
  /* Hide scrollbar */
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.genre-filter-container::-webkit-scrollbar {
  display: none;
}

/* Genre Dropdown & Hamburger */
.genre-menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.genre-menu-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
  border-color: var(--primary);
}

.genres-dropdown {
  position: absolute;
  bottom: 80px;
  left: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  width: 200px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 300;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.genres-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.genre-dropdown-item {
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
  text-align: left;
  border: none;
  background: transparent;
}

.genre-dropdown-item:hover {
  background: var(--bg-darker);
  color: var(--primary);
}

.genre-dropdown-item.active {
  background: var(--primary);
  color: white;
}

.genre-pill {
  white-space: nowrap;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.genre-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--text);
}

.genre-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.buy-btn {
  background: var(--primary);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.buy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

/* Grid Info */
.grid-info {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  z-index: 200;
  transition: opacity 0.4s ease;
}

.grid-info.hidden-ui {
  opacity: 0;
  pointer-events: none;
}

/* Ensure Nav buttons are always on top during video */
.nav-side {
  z-index: 400;
  /* Higher than overlay */
}

.video-overlay {
  z-index: 350;
  /* Lower than nav but high */
}

.close-video-btn {
  z-index: 401;
  /* Highest */
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

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

.modal-content {
  position: relative;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.purchase-modal-content {
  width: 90%;
  max-width: 560px;
}

.analytics-modal-content,
.marketplace-modal-content {
  width: 90%;
  max-width: 800px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-darker);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--error);
  color: white;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title i {
  color: var(--primary);
}

/* Purchase Form */
.form-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--primary);
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-darker);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

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

.video-preview {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-darker);
  border-radius: 10px;
}

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

.video-preview img {
  width: 80px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
}

.video-preview span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Size selection */
.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.size-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.size-option {
  padding: 10px 6px;
  background: var(--bg-darker);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.analytics-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  min-width: 100px;
}

.analytics-likes {
  color: #ef4444;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.size-option:hover {
  border-color: var(--primary);
  transform: scale(1.02);
}

.size-option.selected {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.15);
}

.size-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.size-price {
  font-size: 0.7rem;
  color: var(--success);
  font-weight: 600;
}

.position-options {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.radio-option {
  flex: 1;
  cursor: pointer;
}

.radio-option input {
  display: none;
}

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: var(--bg-darker);
  border: 2px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.radio-option input:checked+.radio-label {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

.coords-input {
  padding: 16px;
  background: var(--bg-darker);
  border-radius: 10px;
}

.coords-input.hidden {
  display: none;
}

.check-btn {
  width: 100%;
  padding: 12px;
  background: var(--secondary);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-family: inherit;
}

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

.availability-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.availability-result.available {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.availability-result.taken {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.purchase-summary {
  background: var(--bg-darker);
  border-radius: 12px;
  padding: 20px !important;
  border: none !important;
}

.price-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.price-row.total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
  font-size: 1.1rem;
}

.price {
  color: var(--success);
}

.submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.submit-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

/* Analytics */
.analytics-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  background: var(--bg-darker);
  border: 2px solid var(--border);
  border-radius: 25px;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.tab-btn:hover {
  border-color: var(--primary);
}

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

.analytics-content {
  max-height: 500px;
  overflow-y: auto;
}

.analytics-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-darker);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.analytics-item:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
  border-left: 3px solid var(--primary);
}

.analytics-rank {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.analytics-rank.gold {
  background: #fbbf24;
  color: #1f2937;
}

.analytics-rank.silver {
  background: #94a3b8;
  color: #1f2937;
}

.analytics-rank.bronze {
  background: #f97316;
  color: white;
}

.analytics-thumb {
  width: 80px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

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

.analytics-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.analytics-stats {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.analytics-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.analytics-stats i {
  color: var(--primary);
}

/* Marketplace */
.marketplace-subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.marketplace-list {
  max-height: 500px;
  overflow-y: auto;
}

.marketplace-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-darker);
  border-radius: 12px;
  margin-bottom: 12px;
}

.marketplace-item img {
  width: 100px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

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

.marketplace-title {
  font-weight: 600;
  margin-bottom: 4px;
}

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

.marketplace-price {
  text-align: right;
  flex-shrink: 0;
}

.marketplace-price .amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
}

.marketplace-price .coords {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.marketplace-buy {
  padding: 10px 20px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.marketplace-buy:hover {
  background: var(--primary-dark);
}

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

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  color: var(--border);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .controls-panel {
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 16px 16px;
  }

  .controls-left,
  .controls-right {
    order: 2;
  }

  .controls-center {
    order: 1;
    width: 100%;
  }

  .genre-select {
    width: 100%;
    margin-top: 5px;
    /* Fix vertical alignment */
  }

  .buy-btn span {
    display: none;
  }

  .video-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    bottom: -120px;
  }

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

  .position-options {
    flex-direction: column;
  }

  .modal-content {
    padding: 24px;
    margin: 16px;
  }

  .analytics-stats {
    flex-direction: column;
    gap: 4px;
  }
}

.scatter-config {
  margin-top: 15px;
  padding: 15px;
  background: var(--bg-darker);
  border-radius: 12px;
  border: 1px dashed var(--primary);
}

.scatter-config.hidden {
  display: none;
}

.campaign-options {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.price-hint {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-top: 8px;
}

#btn-play-genre.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.input-with-hint {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logo {
  position: fixed;
  top: 16px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 500;
  pointer-events: none;
}

.logo span {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  /* Hover effect logic */
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 0;
}

.logo:hover #logo-text {
  max-width: 300px;
  opacity: 1;
  margin-left: 12px;
}

@media (max-width: 768px) {
  #logo-text {
    display: none !important;
  }
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  background: var(--bg-darker);
  padding: 2px;
}

.logo.overlay-mode #logo-text {
  display: none;
}

.auth-btn {
  background: var(--bg-darker);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-content {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 24px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
}

.auth-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}