/* ============================================================================
   portal-ugc.css — UGC Create + Community styles
   Matches portal.html glass morphism dark theme exactly.
   Custom properties inherited from portal.html:
     --glass, --glass-border, --glass-hover, --glow-purple, --glow-gold
     --t-fast, --t-med, --t-spring
     --radius-sm, --radius-md, --radius-lg
   ============================================================================ */

/* ── UGC Create: Editor Grid ─────────────────────────────────────────────── */

.ugc-create-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 0;
}

.ugc-editor-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 28px 20px 24px;
  text-align: center;
  cursor: pointer;
  transition:
    transform var(--t-med),
    background var(--t-fast),
    box-shadow var(--t-med);
  overflow: hidden;
  min-height: 44px;
}

.ugc-editor-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.04) 0%, rgba(168, 85, 247, 0.04) 100%);
  opacity: 0;
  transition: opacity var(--t-med);
  pointer-events: none;
}

.ugc-editor-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: var(--glass-hover);
  box-shadow:
    0 8px 32px rgba(168, 85, 247, 0.18),
    0 0 0 1px rgba(168, 85, 247, 0.15);
}

.ugc-editor-card:hover::before {
  opacity: 1;
}

.ugc-editor-card:active {
  transform: translateY(-1px) scale(0.98);
}

.ugc-editor-card .editor-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
  border: 1px solid rgba(255, 215, 0, 0.15);
}

.ugc-editor-card .editor-icon svg {
  width: 28px;
  height: 28px;
  fill: #ffd600;
  opacity: 0.9;
}

.ugc-editor-card .editor-title {
  font-size: 15px;
  font-weight: 600;
  color: #f2edfa;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.ugc-editor-card .editor-desc {
  font-size: 12px;
  color: rgba(242, 237, 250, 0.5);
  line-height: 1.4;
}

.ugc-editor-card .editor-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ffd600, #ff9500);
  color: #0a0a0f;
}

/* ── UGC Create: Draft List ──────────────────────────────────────────────── */

.ugc-draft-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
}

.ugc-draft-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition:
    background var(--t-fast),
    transform var(--t-med);
  min-height: 44px;
}

.ugc-draft-item:hover {
  background: var(--glass-hover);
  transform: translateX(4px);
}

.ugc-draft-item .draft-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ugc-draft-item .draft-thumb svg {
  width: 24px;
  height: 24px;
  fill: rgba(255, 255, 255, 0.25);
}

.ugc-draft-item .draft-info {
  flex: 1;
  min-width: 0;
}

.ugc-draft-item .draft-title {
  font-size: 14px;
  font-weight: 600;
  color: #f2edfa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ugc-draft-item .draft-meta {
  font-size: 11px;
  color: rgba(242, 237, 250, 0.4);
  margin-top: 3px;
}

.ugc-draft-item .draft-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.ugc-draft-item .draft-status.draft {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(242, 237, 250, 0.5);
}

.ugc-draft-item .draft-status.published {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.ugc-draft-item .draft-status.review {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

/* ── UGC Create: AI Assist ───────────────────────────────────────────────── */

.ugc-ai-prompt {
  position: relative;
  margin: 20px 0;
  border-radius: var(--radius-md);
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.3) 0%,
    rgba(168, 85, 247, 0.3) 50%,
    rgba(77, 225, 255, 0.3) 100%
  );
}

.ugc-ai-prompt-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0a0a0f;
  border-radius: calc(var(--radius-md) - 2px);
  padding: 12px 16px;
}

.ugc-ai-prompt-inner svg {
  width: 22px;
  height: 22px;
  fill: #ffd600;
  flex-shrink: 0;
  opacity: 0.8;
}

.ugc-ai-prompt-inner input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f2edfa;
  font-size: 14px;
  font-family: inherit;
  min-height: 44px;
}

.ugc-ai-prompt-inner input::placeholder {
  color: rgba(242, 237, 250, 0.3);
}

.ugc-ai-prompt-inner .ai-gen-btn {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ffd600, #ff9500);
  color: #0a0a0f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition:
    transform var(--t-fast),
    box-shadow var(--t-med);
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
}

.ugc-ai-prompt-inner .ai-gen-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 20px rgba(255, 214, 0, 0.3);
}

.ugc-ai-prompt-inner .ai-gen-btn:active {
  transform: scale(0.97);
}

/* ── UGC Community: Content Grid ─────────────────────────────────────────── */

.ugc-community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

.ugc-content-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform var(--t-med),
    box-shadow var(--t-med);
}

.ugc-content-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(168, 85, 247, 0.08));
  opacity: 0;
  transition: opacity var(--t-med);
  pointer-events: none;
  z-index: 0;
}

.ugc-content-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(168, 85, 247, 0.12);
}

.ugc-content-card:hover::before {
  opacity: 1;
}

.ugc-content-card:active {
  transform: translateY(-2px) scale(0.99);
}

.ugc-content-card .card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.ugc-content-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ugc-content-card .card-thumb .card-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #f2edfa;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ugc-content-card .card-thumb .card-play-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: rgba(242, 237, 250, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ugc-content-card .card-body {
  padding: 14px;
  position: relative;
  z-index: 1;
}

.ugc-content-card .card-title {
  font-size: 14px;
  font-weight: 600;
  color: #f2edfa;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ugc-content-card .card-creator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ugc-content-card .card-creator-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b389e, #4de1ff);
  flex-shrink: 0;
  overflow: hidden;
}

.ugc-content-card .card-creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ugc-content-card .card-creator-name {
  font-size: 11px;
  color: rgba(242, 237, 250, 0.5);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ugc-content-card .card-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── UGC Stat Pill ───────────────────────────────────────────────────────── */

.ugc-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(242, 237, 250, 0.45);
}

.ugc-stat-pill svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  opacity: 0.7;
}

.ugc-stat-pill.gold {
  color: #ffd600;
}

.ugc-stat-pill.gold svg {
  fill: #ffd600;
}

/* ── UGC Trending Row ────────────────────────────────────────────────────── */

.ugc-trending-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 0 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ugc-trending-row::-webkit-scrollbar {
  display: none;
}

.ugc-trending-row .ugc-content-card {
  min-width: 200px;
  max-width: 240px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* ── UGC Creator Spotlight ───────────────────────────────────────────────── */

.ugc-creator-spotlight {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}

.ugc-creator-spotlight::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.ugc-creator-spotlight .spotlight-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.4);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6b389e, #ffd600);
}

.ugc-creator-spotlight .spotlight-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ugc-creator-spotlight .spotlight-info {
  flex: 1;
  min-width: 0;
}

.ugc-creator-spotlight .spotlight-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffd600;
  margin-bottom: 4px;
}

.ugc-creator-spotlight .spotlight-name {
  font-size: 18px;
  font-weight: 700;
  color: #f2edfa;
  margin-bottom: 4px;
}

.ugc-creator-spotlight .spotlight-bio {
  font-size: 12px;
  color: rgba(242, 237, 250, 0.5);
  line-height: 1.4;
  margin-bottom: 8px;
}

.ugc-creator-spotlight .spotlight-stats {
  display: flex;
  gap: 16px;
}

/* ── UGC Creator Badge ───────────────────────────────────────────────────── */

.ugc-creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 10px;
}

.ugc-creator-badge.tier-bronze {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.08));
  color: #cd7f32;
  border: 1px solid rgba(205, 127, 50, 0.25);
}

.ugc-creator-badge.tier-silver {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.08));
  color: #c0c0c0;
  border: 1px solid rgba(192, 192, 192, 0.25);
}

.ugc-creator-badge.tier-gold {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.08));
  color: #ffd600;
  border: 1px solid rgba(255, 215, 0, 0.25);
}

.ugc-creator-badge.tier-diamond {
  background: linear-gradient(135deg, rgba(77, 225, 255, 0.2), rgba(168, 85, 247, 0.15));
  color: #4de1ff;
  border: 1px solid rgba(77, 225, 255, 0.25);
}

.ugc-creator-badge.tier-legend {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 75, 75, 0.15));
  color: #ffd600;
  border: 1px solid rgba(255, 215, 0, 0.3);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* ── UGC Rating Stars ────────────────────────────────────────────────────── */

.ugc-rating-stars {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.ugc-rating-stars .star {
  width: 16px;
  height: 16px;
  cursor: pointer;
  transition: transform var(--t-fast);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ugc-rating-stars .star:hover {
  transform: scale(1.25);
}

.ugc-rating-stars .star svg {
  width: 16px;
  height: 16px;
}

.ugc-rating-stars .star.filled svg {
  fill: #ffd600;
}

.ugc-rating-stars .star.empty svg {
  fill: rgba(255, 255, 255, 0.12);
}

.ugc-rating-stars .star.half svg {
  fill: url(#ugc-star-half-grad);
}

.ugc-rating-stars .rating-value {
  font-size: 12px;
  font-weight: 600;
  color: #ffd600;
  margin-left: 6px;
}

/* ── UGC Detail Overlay ──────────────────────────────────────────────────── */

.ugc-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-med);
}

.ugc-detail-overlay.active {
  pointer-events: auto;
  opacity: 1;
}

.ugc-detail-overlay .detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

.ugc-detail-overlay .detail-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 100%;
  background: #0a0a0f;
  border-left: 1px solid var(--glass-border);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--t-spring);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.ugc-detail-overlay.active .detail-panel {
  transform: translateX(0);
}

.ugc-detail-overlay .detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition:
    background var(--t-fast),
    transform var(--t-fast);
}

.ugc-detail-overlay .detail-close:hover {
  background: var(--glass-hover);
  transform: scale(1.1);
}

.ugc-detail-overlay .detail-close svg {
  width: 18px;
  height: 18px;
  fill: #f2edfa;
}

.ugc-detail-overlay .detail-hero {
  width: 100%;
  aspect-ratio: 16/9;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  position: relative;
}

.ugc-detail-overlay .detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ugc-detail-overlay .detail-hero .hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, #0a0a0f);
  pointer-events: none;
}

.ugc-detail-overlay .detail-content {
  padding: 24px;
}

.ugc-detail-overlay .detail-title {
  font-size: 22px;
  font-weight: 700;
  color: #f2edfa;
  margin-bottom: 8px;
}

.ugc-detail-overlay .detail-creator-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.ugc-detail-overlay .detail-description {
  font-size: 14px;
  color: rgba(242, 237, 250, 0.6);
  line-height: 1.6;
  margin-bottom: 20px;
}

.ugc-detail-overlay .detail-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ugc-detail-overlay .detail-action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.ugc-detail-overlay .detail-action-bar .s-btn {
  flex: 1;
  min-width: 80px;
  min-height: 44px;
  text-align: center;
}

.ugc-detail-overlay .detail-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(242, 237, 250, 0.4);
  margin-bottom: 12px;
}

/* ── UGC Comment List ────────────────────────────────────────────────────── */

.ugc-comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.ugc-comment-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.ugc-comment-item .comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b389e, #4de1ff);
  flex-shrink: 0;
  overflow: hidden;
}

.ugc-comment-item .comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ugc-comment-item .comment-body {
  flex: 1;
  min-width: 0;
}

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

.ugc-comment-item .comment-author {
  font-size: 12px;
  font-weight: 600;
  color: #f2edfa;
}

.ugc-comment-item .comment-time {
  font-size: 10px;
  color: rgba(242, 237, 250, 0.3);
}

.ugc-comment-item .comment-text {
  font-size: 13px;
  color: rgba(242, 237, 250, 0.65);
  line-height: 1.5;
}

.ugc-comment-item .comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.ugc-comment-item .comment-actions button {
  background: none;
  border: none;
  font-size: 11px;
  color: rgba(242, 237, 250, 0.3);
  cursor: pointer;
  padding: 4px 0;
  min-height: 44px;
  transition: color var(--t-fast);
}

.ugc-comment-item .comment-actions button:hover {
  color: #ffd600;
}

/* ── UGC Tab Bar ─────────────────────────────────────────────────────────── */

.ugc-tab-bar {
  display: flex;
  gap: 4px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ugc-tab-bar::-webkit-scrollbar {
  display: none;
}

.ugc-tab-bar .ugc-tab {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(242, 237, 250, 0.5);
  cursor: pointer;
  white-space: nowrap;
  transition:
    color var(--t-fast),
    background var(--t-fast);
  flex-shrink: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ugc-tab-bar .ugc-tab:hover {
  color: #f2edfa;
  background: rgba(255, 255, 255, 0.04);
}

.ugc-tab-bar .ugc-tab.active {
  color: #0a0a0f;
  background: linear-gradient(135deg, #ffd600, #ff9500);
  font-weight: 700;
}

/* ── UGC Search ──────────────────────────────────────────────────────────── */

.ugc-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.ugc-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: rgba(242, 237, 250, 0.3);
  pointer-events: none;
}

.ugc-search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: #f2edfa;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition:
    border-color var(--t-fast),
    box-shadow var(--t-fast);
  min-height: 44px;
  box-sizing: border-box;
}

.ugc-search-wrap input::placeholder {
  color: rgba(242, 237, 250, 0.25);
}

.ugc-search-wrap input:focus {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* ── Section Header ──────────────────────────────────────────────────────── */

.ugc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
}

.ugc-section-header .section-title {
  font-size: 16px;
  font-weight: 700;
  color: #f2edfa;
}

.ugc-section-header .section-link {
  font-size: 12px;
  color: #4de1ff;
  cursor: pointer;
  transition: color var(--t-fast);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.ugc-section-header .section-link:hover {
  color: #ffd600;
}

/* ── Loading / Empty States ──────────────────────────────────────────────── */

.ugc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.ugc-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #ffd600;
  border-radius: 50%;
  animation: ugc-spin 0.8s linear infinite;
}

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

.ugc-loading .loading-text {
  font-size: 13px;
  color: rgba(242, 237, 250, 0.35);
}

.ugc-empty {
  text-align: center;
  padding: 60px 20px;
}

.ugc-empty .empty-icon svg {
  width: 48px;
  height: 48px;
  fill: rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.ugc-empty .empty-text {
  font-size: 14px;
  color: rgba(242, 237, 250, 0.35);
}

/* ── UGC Content Type Badges (16 unique colors) ──────────────────────────── */

.ugc-type-badge-track {
  background: rgba(255, 214, 0, 0.15);
  color: #ffd600;
  border: 1px solid rgba(255, 214, 0, 0.25);
}
.ugc-type-badge-slotTheme {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.ugc-type-badge-puzzle {
  background: rgba(77, 225, 255, 0.15);
  color: #4de1ff;
  border: 1px solid rgba(77, 225, 255, 0.25);
}
.ugc-type-badge-cardDeck {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.25);
}
.ugc-type-badge-livery {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.ugc-type-badge-battleArena {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.ugc-type-badge-villageLayout {
  background: rgba(20, 184, 166, 0.15);
  color: #14b8a6;
  border: 1px solid rgba(20, 184, 166, 0.25);
}
.ugc-type-badge-sticker {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.25);
}
.ugc-type-badge-musicPack {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.ugc-type-badge-photoMode {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.25);
}
.ugc-type-badge-customRules {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.ugc-type-badge-ai {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.ugc-type-badge-replayPack {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.ugc-type-badge-tutorial {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.ugc-type-badge-challenge {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.ugc-type-badge-collection {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

/* ── UGC Creator Profile ─────────────────────────────────────────────────── */

.ugc-creator-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.ugc-creator-profile-header::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -15%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.ugc-creator-profile-header .creator-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 215, 0, 0.4);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6b389e, #ffd600);
}

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

.ugc-creator-profile-header .creator-info {
  flex: 1;
  min-width: 0;
}

.ugc-creator-profile-header .creator-name {
  font-size: 20px;
  font-weight: 700;
  color: #f2edfa;
  margin-bottom: 4px;
}

.ugc-creator-profile-header .creator-bio {
  font-size: 13px;
  color: rgba(242, 237, 250, 0.5);
  line-height: 1.4;
  margin-bottom: 10px;
}

.ugc-creator-profile-header .creator-stats-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.ugc-creator-profile-header .creator-stat {
  text-align: center;
}

.ugc-creator-profile-header .creator-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #ffd600;
}

.ugc-creator-profile-header .creator-stat-label {
  font-size: 10px;
  color: rgba(242, 237, 250, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Skeleton Loading Animation ──────────────────────────────────────────── */

.ugc-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: ugc-skeleton-pulse 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes ugc-skeleton-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.ugc-skeleton-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

.ugc-skeleton-card .skeleton-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: ugc-skeleton-pulse 1.8s ease-in-out infinite;
}

.ugc-skeleton-card .skeleton-body {
  padding: 14px;
}

.ugc-skeleton-card .skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: ugc-skeleton-pulse 1.8s ease-in-out infinite;
}

.ugc-skeleton-card .skeleton-line.short {
  width: 60%;
}

.ugc-skeleton-card .skeleton-line.medium {
  width: 80%;
}

/* ── Quick Action Buttons ────────────────────────────────────────────────── */

.ugc-quick-actions {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.ugc-quick-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: #f2edfa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--t-fast),
    transform var(--t-fast),
    border-color var(--t-fast);
  min-height: 44px;
  min-width: 44px;
}

.ugc-quick-action-btn svg {
  width: 18px;
  height: 18px;
  fill: #ffd600;
  flex-shrink: 0;
}

.ugc-quick-action-btn:hover {
  background: var(--glass-hover);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
}

.ugc-quick-action-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ── UGC Comment Input ───────────────────────────────────────────────────── */

.ugc-comment-input-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 24px;
}

.ugc-comment-input-row input {
  flex: 1;
  padding: 10px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: #f2edfa;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-height: 44px;
  box-sizing: border-box;
}

.ugc-comment-input-row input::placeholder {
  color: rgba(242, 237, 250, 0.25);
}

.ugc-comment-input-row input:focus {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* ── Responsive Breakpoints ──────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .ugc-create-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ugc-community-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
  .ugc-detail-overlay .detail-panel {
    max-width: 480px;
  }
}

@media (max-width: 768px) {
  .ugc-create-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .ugc-community-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  .ugc-creator-spotlight {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .ugc-creator-spotlight .spotlight-stats {
    justify-content: center;
  }
  .ugc-detail-overlay .detail-panel {
    max-width: 100%;
  }
  .ugc-detail-overlay .detail-action-bar {
    flex-wrap: wrap;
  }
  .ugc-creator-profile-header {
    flex-direction: column;
    text-align: center;
  }
  .ugc-creator-profile-header .creator-stats-row {
    justify-content: center;
  }
}

@media (max-width: 500px) {
  .ugc-create-grid {
    grid-template-columns: 1fr;
  }
  .ugc-editor-card {
    padding: 20px 16px;
  }
  .ugc-community-grid {
    grid-template-columns: 1fr;
  }
  .ugc-tab-bar {
    gap: 2px;
  }
  .ugc-tab-bar .ugc-tab {
    padding: 7px 12px;
    font-size: 12px;
  }
  .ugc-trending-row .ugc-content-card {
    min-width: 170px;
  }
  .ugc-detail-overlay .detail-content {
    padding: 16px;
  }
}
