/* ==== Base ==== */

:root {
  --bg: #050509;
  --bg-elevated: #101018;
  --fg: #f5f5f7;
  --muted: #b3b3c0;
  --o1: #ff8a3d;
  --o2: #ff4d8a;
  --radius-lg: 20px;
  --radius-md: 14px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --glass-bg: rgba(12, 12, 20, 0.92);
  --glass-border: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0.02)
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #000000 0%, #0a0a0a 50%, #050505 100%);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
}

/* Simple “bg” holders – optional, but harmless */

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -6;
}

#bgPhoto,
#bgVideo {
  background: transparent;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -5;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 77, 138, 0.28), transparent 60%),
    radial-gradient(circle at 80% 10%, rgba(76, 154, 255, 0.25), transparent 55%),
    radial-gradient(circle at 70% 90%, rgba(255, 138, 61, 0.28), transparent 60%);
}

/* Blurred map background */

#bgImageLayer {
  position: fixed;
  inset: 0;
  z-index: -4;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(26px) brightness(0.45);
  transform: scale(1.06);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

#bgImageLayer.show {
  opacity: 1;
}

/* ==== Layout & header ==== */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 12, 0.95),
    rgba(5, 5, 12, 0.6),
    transparent
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  text-decoration: none;
  color: var(--fg);
}

/* Reused badge style */

.badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

/* Main layout */

.app-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.title {
  font-size: 32px;
  margin: 0 0 10px;
}

.hint {
  margin: 0 0 32px;
  font-size: 14px;
  color: var(--muted);
}

/* ==== Cards / panels ==== */

.upload-card {
  margin: 0 auto 32px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg) padding-box, var(--glass-border) border-box;
  border: 1px solid transparent;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(160%);
  padding: 24px 24px 20px;
}

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

.upload-title {
  font-size: 18px;
  font-weight: 600;
}

.upload-sub {
  opacity: 0.7;
  font-size: 13px;
}

.upload-body {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.6fr);
  gap: 20px;
  align-items: stretch;
}

/* Dropzone */

.upload-dropzone {
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.75), transparent 55%),
    rgba(0, 0, 0, 0.35);
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 18px;
  cursor: pointer;
  transition: all 0.35s var(--ease);
}

.upload-dropzone.dragover {
  border-color: var(--o1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 18px 44px rgba(0, 0, 0, 0.7);
  transform: translateY(-3px);
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.09), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.85), transparent 55%),
    rgba(0, 0, 0, 0.45);
}

.upload-dropzone h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.upload-dropzone p {
  margin: 0;
  opacity: 0.78;
  font-size: 13px;
}

.upload-dropzone small {
  margin-top: 6px;
  opacity: 0.55;
  font-size: 11px;
}

/* Right side in upload card */

.upload-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  opacity: 0.9;
}

.map-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.map-artist {
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 10px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pill-soft {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.85;
}

.status-line {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

/* Main grid */

.grid-main {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
}

.panel {
  border-radius: var(--radius-lg);
  background: var(--glass-bg) padding-box, var(--glass-border) border-box;
  border: 1px solid transparent;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(160%);
  padding: 20px 18px 18px;
  min-height: 220px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

/* Difficulty list */

.diff-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.diff-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.15s var(--ease);
}

.diff-item:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.diff-item.active {
  background:
    radial-gradient(circle at 0 0, rgba(255, 138, 61, 0.24), transparent 60%),
    rgba(0, 0, 0, 0.75);
  border-color: var(--o1);
}

.diff-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.diff-name {
  font-weight: 600;
  font-size: 12px;
}

.diff-meta {
  opacity: 0.7;
  font-size: 11px;
}

.tag {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.55);
  opacity: 0.85;
}

/* Settings panel */

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.field label {
  font-size: 13px;
  opacity: 0.9;
}

.field small {
  font-size: 11px;
  opacity: 0.6;
}

/* Inputs */

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--o1), var(--o2));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.35);
  cursor: pointer;
}

input[type="checkbox"] {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.6);
  appearance: none;
  display: inline-block;
  position: relative;
  cursor: pointer;
  outline: none;
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--o1), var(--o2));
  border-color: transparent;
}

input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: -1px 0 0 0;
  font-size: 11px;
  text-align: center;
  color: #111;
  font-weight: 700;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

/* Footer controls */

.settings-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.status-text {
  font-size: 11px;
  opacity: 0.65;
}

/* Button */

.btn-primary {
  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--o1), var(--o2));
  color: #111;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* Responsiveness */

@media (max-width: 860px) {
  .upload-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .title {
    font-size: 26px;
  }
}
/* Rate buttons */

.rate-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.btn-rate {
  min-width: 56px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.7);
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s var(--ease),
              border-color 0.18s var(--ease),
              transform 0.12s var(--ease),
              box-shadow 0.18s var(--ease);
}

.btn-rate:hover {
  background: radial-gradient(circle at 0 0, rgba(255, 138, 61, 0.18), transparent 60%),
              rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
}

.btn-rate:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

/* Dark scrollbar for diff list */

.diff-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 130, 150, 0.9) transparent;
}

.diff-list::-webkit-scrollbar {
  width: 7px;
}

.diff-list::-webkit-scrollbar-track {
  background: transparent;
}

.diff-list::-webkit-scrollbar-thumb {
  background: rgba(140, 140, 165, 0.9);
  border-radius: 999px;
}

.diff-list::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 180, 205, 0.95);
}

.rate-meta {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}

.rate-meta-line {
  white-space: nowrap;
}

/* Fixed footer watermark */
.fixed {
  position: fixed;
}

.right-4 {
  right: 1rem;
}

.bottom-4 {
  bottom: 1rem;
}

.z-50 {
  z-index: 50;
}

.glass {
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-slate-300 {
  color: #cbd5e1;
}

.shadow-glass {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.gap-1 {
  gap: 0.25rem;
}

/* Floating particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent);
  border-radius: 50%;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(var(--drift, 0));
    opacity: 0;
  }
}

/* Cursor glow effect */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}
