/* ============================================================
   NORIS STYLESHEET (V2 — SIDEBAR LAYOUT & FULL SCROLL)
   Indie Projects & Reviews Portal
   Aesthetic: Clean, Solid, Dark Slate & Warm Amber (STRICTLY NO NEON)
   ============================================================ */

:root {
  --bg-primary: #101216;
  --bg-sidebar: #15181f;
  --bg-secondary: #191c24;
  --bg-card: #1f232d;
  --bg-card-hover: #262b37;
  --bg-elevated: #2a303e;

  --border-subtle: #282e3c;
  --border-strong: #373f52;
  --border-active: #d97706;

  --accent-primary: #d97706; /* Warm amber / bronze */
  --accent-hover: #b45309;
  --accent-light: #f59e0b;
  --accent-surface: rgba(217, 119, 6, 0.12);

  --text-main: #f1f3f7;
  --text-muted: #9ba3b4;
  --text-dim: #647087;

  --status-released: #15803d; /* Forest green */
  --status-released-bg: rgba(21, 128, 61, 0.18);
  --status-wip: #b45309; /* Warm ochre */
  --status-wip-bg: rgba(180, 83, 9, 0.2);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* Reset & Basics (Ensures clean native downward scrolling) */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ================= APP LAYOUT ================= */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ================= LEFT SIDEBAR ================= */
.sidebar {
  width: 280px;
  min-width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 2px 0 10px rgba(0,0,0,0.25);
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
  margin-bottom: 14px;
}

.sidebar-logo {
  height: 38px;
  width: auto;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
}

.sidebar-brand-tagline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* User Card Widget */
.user-card-widget {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.user-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.user-subscribers-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.sub-counter {
  font-size: 11px;
  color: var(--text-dim);
}
.sub-counter strong {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.btn-sub {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--accent-light);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-sub:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: #f59e0b;
}
.btn-sub.subscribed {
  background: rgba(21, 128, 61, 0.2);
  color: #4ade80;
  border-color: var(--status-released);
}

.user-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.user-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: #10b981;
  border: 2px solid var(--bg-secondary);
  border-radius: 50%;
}

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

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  color: var(--accent-light);
  font-weight: 600;
}

.user-auth-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}
.user-auth-btn:hover {
  background: var(--bg-elevated);
  color: #ffffff;
  border-color: var(--border-strong);
}

/* Sidebar Navigation Items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 6px 10px;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: all 0.15s ease;
  user-select: none;
}

.nav-item:hover {
  color: #ffffff;
  background-color: var(--bg-card);
  border-color: var(--border-subtle);
}

.nav-item.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: #f59e0b;
}

.nav-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-text {
  flex: 1;
}

.nav-badge {
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.nav-badge.wip-badge {
  background: rgba(180, 83, 9, 0.4);
  color: #fef3c7;
}

.nav-badge.highlight-badge {
  background: rgba(217, 119, 6, 0.4);
  color: #ffffff;
}

.nav-badge.abandoned-badge {
  background: rgba(71, 85, 105, 0.5);
  color: #cbd5e1;
}

/* Sidebar Action Buttons */
.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

/* Sidebar Mini Stats */
.sidebar-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-mini-val {
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
}

.stat-mini-lbl {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ================= RIGHT MAIN WRAPPER ================= */
.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-primary);
}

/* Top Bar */
.top-bar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 12px;
  flex: 1;
  max-width: 520px;
  height: 40px;
  transition: border-color 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--border-active);
}

.search-icon {
  margin-right: 8px;
  font-size: 14px;
  opacity: 0.7;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.clear-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
}
.clear-btn:hover {
  color: var(--text-main);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.select-control {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
}
.select-control:focus {
  border-color: var(--border-active);
}

/* ================= CONTENT BODY (SCROLLS DOWN SMOOTHLY) ================= */
.content-body {
  flex: 1;
  padding: 24px 28px 48px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Hero Banner */
.hero-banner {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 24px;
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-block;
  background: var(--bg-card);
  color: var(--accent-light);
  border: 1px solid var(--border-strong);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.accent-text {
  color: var(--accent-light);
}

.hero-desc {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 820px;
  line-height: 1.6;
}

/* Tags Filter Row */
.tags-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tags-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.tag-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tag-pill:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}
.tag-pill.active {
  background: var(--bg-elevated);
  color: var(--accent-light);
  border-color: var(--accent-primary);
  font-weight: 600;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}

.results-count {
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ================= PROJECTS GRID ================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

/* Project Card */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-banner {
  height: 140px;
  background: #13161c;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.card-banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-placeholder-icon {
  font-size: 34px;
}

.card-badges-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.released {
  background: var(--status-released);
  color: #ffffff;
}

.status-badge.wip {
  background: var(--status-wip);
  color: #ffffff;
}

.status-badge.abandoned {
  background: #334155;
  color: #cbd5e1;
}

.category-badge {
  background: rgba(17, 19, 23, 0.88);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

/* Card Body */
.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  margin-bottom: 4px;
}
.card-title:hover {
  color: var(--accent-light);
}

.card-author {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.card-author strong {
  color: var(--text-muted);
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.card-localpath {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress bar for WIP */
.wip-progress-container {
  margin-bottom: 12px;
}

.wip-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.wip-progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.wip-progress-fill {
  height: 100%;
  background-color: var(--accent-primary);
  border-radius: 3px;
}

/* Card Tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.card-tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.card-tag:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

/* Card Footer */
.card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-vote-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions-row .btn,
.card-actions-row .btn-sm,
.card-actions-row .btn-download-sm,
.card-actions-row .btn-change-thumb-sm {
  flex: 1 1 auto;
  text-align: center;
  justify-content: center;
  padding: 7px 12px;
  font-size: 12px;
  min-height: 32px;
}

.like-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.like-btn:hover {
  background: var(--bg-elevated);
  color: #ffffff;
}

.like-btn.liked {
  background: rgba(220, 38, 38, 0.15);
  border-color: #dc2626;
  color: #f87171;
}

.dislike-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.dislike-btn:hover {
  background: var(--bg-elevated);
  color: #ffffff;
}

.dislike-btn.disliked {
  background: rgba(147, 51, 234, 0.15);
  border-color: #a855f7;
  color: #c084fc;
}

/* Live Sync Indicator (Server 1s refresh) */
.live-sync-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 10px;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-pulse-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: livePulse 1s ease-in-out infinite;
}

@keyframes livePulse {
  0% { transform: scale(0.9); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.4; }
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: #f59e0b;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-primary);
}

.btn-secondary {
  background-color: var(--bg-elevated);
  color: var(--text-main);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-play-sm {
  background-color: #16a34a;
  border-color: #22c55e;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none !important;
}
.btn-play-sm:hover {
  background-color: #15803d;
  border-color: #16a34a;
  color: #ffffff !important;
  text-decoration: none !important;
}

.btn-play-large {
  background-color: #16a34a;
  border-color: #22c55e;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 22px;
  text-decoration: none !important;
}
.btn-play-large:hover {
  background-color: #15803d;
  border-color: #16a34a;
  color: #ffffff !important;
  text-decoration: none !important;
}

.btn-full {
  width: 100%;
}

/* ================= EXPLORER MODAL & LIST ================= */
.explorer-lead {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.explorer-lead code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-light);
  font-family: var(--font-mono);
}

.explorer-custom-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.explorer-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.folders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.folder-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s ease;
}

.folder-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.folder-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.folder-icon {
  font-size: 20px;
}

.folder-name-row {
  display: flex;
  flex-direction: column;
}

.folder-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.folder-path {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.folder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.added-badge {
  background: var(--status-released-bg);
  color: #4ade80;
  border: 1px solid var(--status-released);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

/* ================= AUTH MODAL ================= */
.auth-tabs-toggle {
  display: flex;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.auth-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-toggle-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
}

.quick-login-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-dim);
}

.quick-user-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.quick-user-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary);
}

/* ================= MODALS ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(9, 10, 13, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-card.modal-lg {
  max-width: 860px;
}

.modal-card.modal-sm {
  max-width: 440px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}
.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body {
  padding: 20px;
}

/* Forms */
.publish-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--border-active);
}

.progress-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-input-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--accent-primary);
}

.progress-val-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--accent-light);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

/* Detail modal elements */
.detail-banner {
  width: 100%;
  height: 240px;
  background: #12141a;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

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

.detail-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.detail-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-dim);
  font-size: 13px;
}

.detail-desc-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 18px;
}

.detail-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

/* Reviews */
.reviews-section {
  border-top: 2px solid var(--border-subtle);
  padding-top: 20px;
}

.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.reviews-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.add-review-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
}

.star-rating-picker {
  display: flex;
  gap: 6px;
  margin: 6px 0 12px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.star-btn.active,
.star-btn:hover {
  color: #f59e0b;
}

.review-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.review-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.review-author {
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
}

.review-date {
  font-size: 11px;
  color: var(--text-dim);
}

.review-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  border-left: 4px solid var(--status-released);
}
.toast.info {
  border-left: 4px solid var(--accent-light);
}
.toast.error {
  border-left: 4px solid #ef4444;
}

/* Footer */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 20px 28px;
  margin-top: auto;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  margin-right: 6px;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 13px;
}

.creator-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

/* Media Grid */
.media-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.media-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
}

.media-intro {
  font-size: 14px;
  color: var(--text-muted);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.media-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.media-preview-wrap {
  width: 100%;
  height: 200px;
  background: #111317;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-preview-wrap img,
.media-preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-info {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.media-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.media-author {
  font-size: 11px;
  color: var(--text-dim);
}

/* Loading & Empty States */
.loading-state,
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

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

/* Responsiveness */
@media (max-width: 900px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    box-shadow: none;
  }
}

/* ================= ONLINE INTERNET TUNNEL BADGE ================= */
.online-tunnel-badge {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #151922;
  border: 1px solid #2d3748;
  border-left: 4px solid #10b981;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13px;
}

.tunnel-link {
  color: #38bdf8;
  font-family: var(--font-mono);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tunnel-link:hover {
  color: #7dd3fc;
}

.btn-xs {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
}

.btn-copy-tunnel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--accent-light);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-copy-tunnel:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

.tunnel-pass-hint {
  color: var(--text-dim);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.tunnel-pass-hint strong {
  color: #f59e0b;
  font-family: var(--font-mono);
}

/* ================= DOWNLOAD & ACTION BUTTONS ================= */
.btn-download-sm {
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-download-sm:hover {
  background: #334155;
  color: #f1f5f9;
  border-color: #475569;
}

.btn-download-primary {
  background: #1e293b;
  border: 1px solid #475569;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-download-primary:hover {
  background: #334155;
  color: #ffffff;
  border-color: #64748b;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-change-thumb-sm {
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid rgba(217, 119, 6, 0.4);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-change-thumb-sm:hover {
  background: #d97706;
  color: #ffffff;
}

/* ================= CHANGE THUMBNAIL MODAL ================= */
.current-thumb-preview-box {
  width: 100%;
  max-width: 420px;
  height: 220px;
  background: #0a0c10;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}
.current-thumb-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.community-thumbs-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  background: #0d0f14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-top: 6px;
}

.community-thumb-item {
  position: relative;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #181b22;
}
.community-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.community-thumb-item:hover {
  border-color: #64748b;
  transform: scale(1.02);
}
.community-thumb-item.selected {
  border-color: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.4);
}
.community-thumb-item .thumb-author-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  font-size: 9px;
  color: #cbd5e1;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================= MINI POSTS FEED (UNDER PROFILE) ================= */
.mini-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease;
}
.mini-post-card:hover {
  border-color: var(--border-strong);
}
.mini-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.mini-post-user {
  font-weight: 700;
  color: #a5b4fc;
  font-size: 11px;
}
.mini-post-date {
  color: var(--text-dim);
  font-size: 10px;
}
.mini-post-text {
  color: var(--text-main);
  line-height: 1.4;
  word-break: break-word;
}
.mini-post-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 4px;
  margin-top: 4px;
  border: 1px solid var(--border-subtle);
}
.mini-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.mini-post-like-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.15s;
}
.mini-post-like-btn:hover, .mini-post-like-btn.liked {
  color: #f43f5e;
}
.mini-post-del-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.mini-post-del-btn:hover {
  opacity: 1;
}

/* ================= PROJECT EDIT & DELETE BUTTONS ================= */
.btn-edit-sm {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-edit-sm:hover {
  background: #6366f1;
  color: #ffffff;
}

.btn-delete-sm {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-delete-sm:hover {
  background: #ef4444;
  color: #ffffff;
}

/* ================= RECOMMENDATIONS BADGE & BUTTONS ================= */
.recommend-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 800;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-recommend-sm {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-recommend-sm:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
}

.btn-recommend-sm.recommended {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 800;
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.btn-recommend-large {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-recommend-large.recommended {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}



