@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&display=swap");

:root {
  --primary-bg: #0d0f1a;
  --secondary-bg: #121527;
  --accent-bg: #1a1e35;
  --card-bg: #161929;
  --surface: #1e2340;
  --text-color: #e8eaf6;
  --text-muted: #7b82a8;
  --text-dim: #4a5070;
  --hover-bg: #252b48;
  --border: rgba(255, 255, 255, .06);
  --border-accent: rgba(230, 190, 80, .35);
  --border-radius: 10px;
  --border-radius-lg: 16px;
  --primary-accent: #e6be50;
  --primary-accent-dim: rgba(230, 190, 80, .12);
  --green-accent: #3ddc97;
  --red-accent: #ff5567;
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, .65);
  --font-display: "Comfortaa", sans-serif;
}

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

html,
body {
  height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  margin: 0;
  background: var(--primary-bg);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

#bg-layer-0,
#bg-layer-1 {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .5s ease;
  z-index: 0;
}

#bg-layer-0.show,
#bg-layer-1.show {
  opacity: 1;
}

.main-header {
  width: 100%;
  background: rgba(13, 15, 26, .85);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  z-index: 100;
  position: sticky;
  top: 0;
  padding: 10px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.site-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  filter: drop-shadow(0 0 8px rgba(230, 190, 80, .35));
}

.main-title {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  flex: 1 1 auto;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, var(--primary-accent) 37%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 12px rgba(230, 190, 80, .25));
}

.hamburger-wrap {
  position: relative;
  flex-shrink: 0;
}

.hamburger-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius);
  background: var(--surface);
  border: 1px solid var(--border-accent);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: background .2s, border-color .2s, box-shadow .2s;
}

.hamburger-btn:hover,
.hamburger-btn.open {
  background: var(--hover-bg);
  border-color: rgba(230, 190, 80, .55);
  box-shadow: 0 0 12px rgba(230, 190, 80, .15);
}

.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--primary-accent);
  border-radius: 2px;
  transition: all .22s ease;
  transform-origin: center;
}

.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hamburger-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-accent);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(230, 190, 80, .08);
  z-index: 200;
  overflow: hidden;
  display: none;
  animation: menu-drop .18s cubic-bezier(.25, .8, .25, 1);
}

.hamburger-menu.open {
  display: block;
}

@keyframes menu-drop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(.97);
  }

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

.hamburger-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 2px;
}

.tab {
  display: block;
  width: 100%;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: left;
  transition: color .2s, background .2s, border-color .2s;
}

.tab:hover {
  color: var(--text-color);
  background: var(--hover-bg);
}

.tab.active {
  background: var(--primary-accent-dim);
  color: var(--primary-accent);
  border-color: var(--border-accent);
}

.active-tab-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-accent);
  background: var(--primary-accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  padding: 3px 10px;
  white-space: nowrap;
}

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

.search-input {
  flex: 1 1 220px;
  padding: 8px 14px 8px 36px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  background: var(--secondary-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b82a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center / 15px;
  color: var(--text-color);
  font-size: .88rem;
  outline: none;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
  min-width: 0;
}

.search-input:focus {
  background-color: var(--accent-bg);
  border-color: rgba(230, 190, 80, .4);
  box-shadow: 0 0 0 3px rgba(230, 190, 80, .08);
}

.search-input::placeholder {
  color: var(--text-dim);
  font-size: .85rem;
}

.sort-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
  font-weight: 600;
}

.sort-select {
  padding: 7px 30px 7px 12px;
  border-radius: var(--border-radius);
  background: var(--secondary-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b82a8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text-color);
  border: 1px solid var(--border);
  font-size: .82rem;
  cursor: pointer;
  font-weight: 600;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}

.sort-select:focus {
  outline: none;
  border-color: rgba(230, 190, 80, .4);
  box-shadow: 0 0 0 3px rgba(230, 190, 80, .08);
}

.sort-dir-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius);
  background: var(--surface);
  color: var(--primary-accent);
  border: 1px solid var(--border-accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sort-dir-btn:hover {
  background: var(--hover-bg);
  border-color: rgba(230, 190, 80, .55);
  box-shadow: 0 0 10px rgba(230, 190, 80, .15);
  transform: translateY(-1px);
}

.sort-dir-btn:active {
  transform: translateY(0) scale(.95);
}

.pill-toggle {
  --pill-height: 30px;
  --thumb-size: 24px;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  user-select: none;
}

.pill-toggle input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pill-toggle .track {
  height: var(--pill-height);
  background: var(--surface);
  border-radius: 999px;
  border: 1px solid var(--border-accent);
  padding: 2px 6px;
  position: relative;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto var(--thumb-size) auto;
  align-items: center;
  line-height: 1;
  transition: background 200ms, border-color 200ms;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3);
}

.pill-toggle .thumb {
  width: var(--thumb-size);
  height: var(--thumb-size);
  background: var(--primary-accent);
  border-radius: 50%;
  grid-column: 2/3;
  justify-self: center;
  align-self: center;
  box-shadow: 0 0 8px rgba(230, 190, 80, .4), 0 2px 6px rgba(0, 0, 0, .5);
  z-index: 3;
  transition: background 200ms, box-shadow 200ms;
}

.pill-toggle input[type="checkbox"]:checked+.track {
  background: rgba(230, 190, 80, .18);
  border-color: rgba(230, 190, 80, .35);
}

.pill-toggle .inner-label {
  pointer-events: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  margin: 0 5px;
  z-index: 1;
}

.pill-toggle .label-left {
  grid-column: 1/2;
  justify-self: start;
  padding-left: 6px;
}

.pill-toggle .label-right {
  grid-column: 3/4;
  justify-self: end;
  padding-right: 6px;
}

.pill-toggle .inner-label,
.pill-toggle .label-left,
.pill-toggle input[type="checkbox"]+.track .label-right,
.pill-toggle input[type="checkbox"]:checked+.track .label-left {
  display: none !important;
}

.pill-toggle input[type="checkbox"]+.track .label-left,
.pill-toggle input[type="checkbox"]:checked+.track .label-right {
  display: inline-block !important;
}

.tag-filter-area {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(230, 190, 80, .1);
}

.tag-filter-label {
  font-size: 9px;
  color: var(--primary-accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  opacity: .7;
}

.tag-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all .18s;
  user-select: none;
  letter-spacing: .02em;
}

.tag-pill:hover {
  border-color: rgba(230, 190, 80, .4);
  color: var(--primary-accent);
  background: var(--primary-accent-dim);
}

.tag-pill.included {
  background: rgba(61, 220, 151, .15);
  border-color: rgba(61, 220, 151, .5);
  color: var(--green-accent);
}

.tag-pill.excluded {
  background: rgba(255, 85, 103, .1);
  border-color: rgba(255, 85, 103, .4);
  color: var(--red-accent);
  opacity: .7;
}

.clear-filters-btn {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(230, 190, 80, .35);
  background: transparent;
  color: var(--primary-accent);
  transition: all .18s;
  letter-spacing: .03em;
}

.clear-filters-btn:hover {
  background: var(--primary-accent-dim);
  border-color: var(--primary-accent);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

.results-meta {
  font-size: .72rem;
  color: #fff;
  font-weight: 600;
  opacity: .6;
  margin-bottom: 14px;
  letter-spacing: .05em;
  text-transform: capitalize;
}

.achievement-item {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .04);
  transition: transform .28s cubic-bezier(.25, .8, .25, 1), box-shadow .28s cubic-bezier(.25, .8, .25, 1), border-color .2s;
  min-height: 130px;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  margin-bottom: 10px;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .56);
  width: 960px;
}

.achievement-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .65);
}

.achievement-item.no-thumb {
  background-color: rgba(78, 78, 104, .12);
}

.thumbnail-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.thumbnail-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(22, 25, 41) 0%, rgba(22, 25, 41, .6) 20%, rgba(22, 25, 41, 0) 60%);
  z-index: 2;
}

.thumbnail-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.achievement-item:hover .thumbnail-container img {
  transform: scale(1.04);
}

.achievement-text {
  position: relative;
  z-index: 5;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.achievement-text h2 {
  margin: 0 0 5px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.25;
}

.achievement-text p {
  font-size: .85rem;
  margin: 2px 0;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.6;
}

.achievement-text p strong {
  font-weight: 700;
  color: rgba(232, 234, 246, .75);
  font-size: .7rem;
  letter-spacing: .02em;
  opacity: .75;
}

.rank-date-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: .3rem;
  color: var(--text-color);
  width: 100%;
}

.rank-date-container .meta-row {
  font-size: .78rem;
  color: rgba(232, 234, 246, .7);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.rank-date-container .meta-row strong {
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary-accent);
  opacity: .7;
  margin-right: .2rem;
}

.rank-badge {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-accent);
  text-shadow: 0 0 16px rgba(230, 190, 80, .5), 0 2px 6px rgba(0, 0, 0, .6);
}

.achievement-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .5rem;
}

.achievement-info span {
  background: rgba(230, 190, 80, .08);
  border: 1px solid rgba(230, 190, 80, .15);
  padding: .2rem .55rem;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  color: rgba(230, 190, 80, .75);
  transition: background .2s, border-color .2s;
  cursor: default;
  backdrop-filter: blur(4px);
  letter-spacing: .02em;
}

.achievement-info span:hover {
  background: rgba(230, 190, 80, .14);
  border-color: rgba(230, 190, 80, .3);
}

.achievement-links {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.achievement-links a {
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(230, 190, 80, .12);
  color: var(--primary-accent);
  text-decoration: none;
  border: 1px solid rgba(230, 190, 80, .22);
  transition: background .2s, border-color .2s, color .2s;
  letter-spacing: .02em;
}

.achievement-links a:hover {
  background: rgba(230, 190, 80, .18);
  border-color: rgba(230, 190, 80, .35);
  color: #fff;
}

.achievement-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: .5rem;
  padding: .9rem 1rem .9rem 0;
  text-align: right;
  z-index: 5;
  flex-shrink: 0;
}

.achievement-item .tag-container {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
}

.tag {
  background: rgba(230, 190, 80, .1);
  color: rgba(230, 190, 80, .85);
  border: 1px solid rgba(230, 190, 80, .2);
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .18s;
}

.tag:hover {
  background: rgba(230, 190, 80, .2);
  border-color: rgba(230, 190, 80, .45);
  color: var(--primary-accent);
}

.tag-level {
  background: linear-gradient(135deg, #43e97b, #25a4b4);
}

.tag-challenge {
  background: linear-gradient(135deg, #ffb347, #ff5fa2);
}

.tag-low-hertz {
  background: linear-gradient(135deg, #d724e7, #6232d1);
}

.tag-speedrun {
  background: linear-gradient(135deg, #e7e7e7, #ffd891);
}

.tag-mobile {
  background: linear-gradient(135deg, #2398ff, #4ffff7);
}

.tag-speedhack {
  background: linear-gradient(135deg, #e92eaa, #93225c);
}

.tag-noclip {
  background: linear-gradient(135deg, #e52d27, #5e004f);
}

.tag-miscellaneous {
  background: linear-gradient(135deg, #545466, #29272f);
}

.tag-progress {
  background: linear-gradient(135deg, #87ebbc, #2f9bc6);
}

.tag-consistency {
  background: linear-gradient(135deg, #4f58e4, #1b007e);
}

.tag-2p {
  background: linear-gradient(135deg, #ff7800, #3e89ff);
}

.tag-cbf {
  background: linear-gradient(135deg, #ff758c, #db303f);
}

.tag-rated {
  background: linear-gradient(135deg, #ffcd58, #db6f46);
}

.tag-formerly-rated {
  background: linear-gradient(135deg, #ff9966, #833325);
}

.tag-outdated-version {
  background: linear-gradient(135deg, #8a8673, #ce9b2f);
}

.tag-verified {
  background: linear-gradient(135deg, #9ef04d, #00b896);
}

.tag-coin-route {
  background: linear-gradient(135deg, #a8acb3, #35383a);
}

.tag-tentative {
  background: linear-gradient(135deg, #a68b62, #44392f);
}

.tag-platformer {
  background: linear-gradient(135deg, #4372d8, #ff8262);
}

.tag-deathless {
  background: linear-gradient(135deg, #2b0000, #050000);
}

.loading,
.error,
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--primary-accent);
  opacity: .5;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.error {
  color: var(--red-accent);
  opacity: 1;
}

@media (max-width: 768px) {
  .main-title {
    font-size: 1.1rem;
  }

  .main-header {
    padding: 10px 14px 8px;
  }

  .achievement-item {
    min-height: 110px;
    flex-direction: column;
    align-items: stretch;
    width: auto;
  }

  .thumbnail-container {
    position: relative;
    width: 100%;
    height: 140px;
  }

  .thumbnail-container::after {
    background: linear-gradient(180deg, transparent 40%, rgba(22, 25, 41, .95) 100%);
  }

  .achievement-text h2 {
    font-size: 1rem;
  }

  .achievement-text p {
    font-size: .78rem;
  }

  .achievement-item .tag-container {
    margin-top: .5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .achievement-meta {
    width: 100%;
    align-items: flex-start;
    text-align: left;
    padding: .5rem 0 0;
  }

  .rank-date-container {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: .9rem;
  }

  .achievement-item {
    min-height: 95px;
  }

  .achievement-text {
    padding: .8rem;
  }

  .rank-badge {
    font-size: 1rem;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modal-fade-in .2s ease;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-box {
  background: var(--secondary-bg);
  border: 1px solid rgba(230, 190, 80, .12);
  border-radius: var(--border-radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(230, 190, 80, .1);
  animation: modal-slide-up .25s cubic-bezier(.25, .8, .25, 1);
}

@keyframes modal-slide-up {
  from {
    transform: translateY(16px);
    opacity: 0;
  }

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

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  background: var(--surface);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  color: var(--primary-accent);
  font-size: 1rem;
  cursor: pointer;
  padding: .4rem .65rem;
  z-index: 1;
  transition: all .18s;
  font-weight: 700;
}

.modal-close:hover {
  background: var(--primary-accent-dim);
  border-color: var(--primary-accent);
}

.modal-inner {
  clear: both;
}

.modal-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 .6rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, var(--primary-accent) 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.modal-rank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  background: rgba(230, 190, 80, .12);
  color: var(--primary-accent);
  border: 1px solid rgba(230, 190, 80, .3);
  border-radius: 6px;
  padding: .2rem .75rem;
  margin-bottom: 1rem;
  letter-spacing: .06em;
}

.modal-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem 1.5rem;
  margin-bottom: 1.2rem;
  padding: 1rem;
  background: rgba(230, 190, 80, .04);
  border-radius: 10px;
  border: 1px solid rgba(230, 190, 80, .1);
}

.modal-field {
  font-size: .85rem;
}

.modal-field strong {
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-accent);
  opacity: .6;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.modal-submitter {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(230, 190, 80, .1);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.2rem;
}

.modal-tag {
  background: rgba(230, 190, 80, .08);
  border: 1px solid rgba(230, 190, 80, .2);
  border-radius: 6px;
  padding: .2rem .7rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(230, 190, 80, .8);
  cursor: pointer;
  transition: all .18s;
}

.modal-tag:hover {
  background: rgba(230, 190, 80, .18);
  border-color: rgba(230, 190, 80, .5);
  color: var(--primary-accent);
}

.modal-videos {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: .5rem;
}

.modal-video-label {
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary-accent);
  opacity: .7;
  margin-bottom: .4rem;
  font-weight: 700;
}

.modal-video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(230, 190, 80, .12);
}

.modal-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.modal-video-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .5rem 1.1rem;
  background: rgba(230, 190, 80, .12);
  color: var(--primary-accent);
  border: 1px solid rgba(230, 190, 80, .25);
  border-radius: 8px;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: background .2s, border-color .2s, color .2s;
}

.modal-video-link:hover {
  background: rgba(230, 190, 80, .2);
  border-color: rgba(230, 190, 80, .4);
  color: #fff;
}

@media (max-width: 500px) {
  .modal-fields {
    grid-template-columns: 1fr;
  }

  .modal-box {
    padding: 1.25rem;
  }

  .modal-title {
    font-size: 1.3rem;
  }
}

#background-root {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

#blue-tint-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 26, .6);
  z-index: 1;
}

#dynamic-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(180deg, #08081d 0%, #3d3d5a 100%);
}

.bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .6s ease-in-out;
  filter: blur(6px) brightness(.25);
  transform: scale(1.05);
}

.bg-layer.show {
  opacity: 1;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(230, 190, 80, .2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 190, 80, .35);
}

::selection {
  background: rgba(230, 190, 80, .25);
  color: #fff;
}

.dupe-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: rgba(230, 190, 80, .08);
  color: rgba(230, 190, 80, .7);
  border: 1px solid rgba(230, 190, 80, .18);
  white-space: nowrap;
  cursor: default;
  margin-top: 4px;
  align-self: flex-end;
}

.modal-dupes-section {
  margin-top: 1.2rem;
  border: 1px solid rgba(230, 190, 80, .15);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(230, 190, 80, .03);
}

.modal-dupes-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(230, 190, 80, .7);
  text-align: left;
  transition: background .18s, color .18s;
}

.modal-dupes-toggle:hover {
  background: rgba(230, 190, 80, .07);
  color: var(--primary-accent);
}

.modal-dupes-toggle.open {
  border-bottom: 1px solid rgba(230, 190, 80, .1);
  background: rgba(230, 190, 80, .06);
}

.modal-dupes-icon {
  font-size: 1rem;
  line-height: 1;
}

.modal-dupes-chevron {
  margin-left: auto;
  font-size: .75rem;
  opacity: .7;
}

.modal-dupes-list {
  display: none;
  flex-direction: column;
}

.modal-dupes-list.open {
  display: flex;
}

.modal-dupe-card {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  transition: background .15s;
}

.modal-dupe-card:last-child {
  border-bottom: none;
}

.modal-dupe-card:hover {
  background: rgba(230, 190, 80, .04);
}

.modal-dupe-name {
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-color);
  margin-bottom: 4px;
}

.modal-dupe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.modal-dupe-field {
  font-size: .78rem;
  color: var(--text-muted);
}

.modal-dupe-field strong {
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-accent);
  opacity: .55;
  font-weight: 700;
  margin-right: 3px;
}

.modal-dupe-videos {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  z-index: 1100;
  display: flex;
  align-items: stretch;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: modal-fade-in .18s ease;
}

.editor-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 860px;
  background: var(--secondary-bg);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  height: 100%;
  overflow: hidden;
  animation: editor-slide-in .22s cubic-bezier(.25, .8, .25, 1);
}

@keyframes editor-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--primary-bg);
  border-bottom: 1px solid rgba(230, 190, 80, .12);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.editor-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.editor-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, var(--primary-accent) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.editor-count {
  font-size: .7rem;
  color: var(--primary-accent);
  opacity: .6;
  letter-spacing: .05em;
  background: var(--primary-accent-dim);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-accent);
  white-space: nowrap;
}

.editor-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.editor-action-btn {
  padding: 7px 14px;
  border-radius: var(--border-radius);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all .18s;
  white-space: nowrap;
}

.editor-action-btn:hover {
  background: var(--hover-bg);
  color: var(--text-color);
  border-color: rgba(255, 255, 255, .12);
}

.editor-action-btn.gold {
  border-color: rgba(230, 190, 80, .3);
  color: var(--primary-accent);
  background: rgba(230, 190, 80, .06);
}

.editor-action-btn.gold:hover {
  background: rgba(230, 190, 80, .14);
  border-color: rgba(230, 190, 80, .55);
}

.editor-action-btn.gold.success {
  background: rgba(61, 220, 151, .15);
  border-color: rgba(61, 220, 151, .45);
  color: var(--green-accent);
}

.editor-action-btn.green {
  border-color: rgba(61, 220, 151, .35);
  color: var(--green-accent);
  background: rgba(61, 220, 151, .08);
}

.editor-action-btn.green:hover {
  background: rgba(61, 220, 151, .18);
  border-color: rgba(61, 220, 151, .6);
}

.editor-action-btn.dim {
  color: var(--text-dim);
}

.editor-action-btn.dim:hover {
  color: var(--red-accent);
  border-color: rgba(255, 85, 103, .3);
  background: rgba(255, 85, 103, .07);
}

.editor-hint {
  padding: 7px 20px;
  font-size: .72rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, .2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  letter-spacing: .01em;
}

.editor-hint span {
  color: var(--text-muted);
}

.editor-hint strong {
  color: var(--primary-accent);
  font-weight: 700;
  opacity: .8;
}

.editor-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px 20px;
}

.editor-row {
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  background: var(--card-bg);
  margin-bottom: 6px;
  transition: border-color .18s, box-shadow .18s, opacity .15s;
  user-select: none;
}

.editor-row:hover {
  border-color: rgba(230, 190, 80, .15);
}

.editor-row.dragging {
  opacity: .4;
}

.editor-row.drag-over {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 1px rgba(230, 190, 80, .3), 0 4px 16px rgba(0, 0, 0, .4);
  background: rgba(230, 190, 80, .04);
}

.editor-row-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: grab;
  min-height: 46px;
}

.editor-row-header:active {
  cursor: grabbing;
}

.editor-drag-handle {
  font-size: 1.1rem;
  color: var(--text-dim);
  cursor: grab;
  flex-shrink: 0;
  line-height: 1;
  transition: color .15s;
  pointer-events: none;
}

.editor-row:hover .editor-drag-handle {
  color: var(--primary-accent);
  opacity: .5;
}

.editor-row-num {
  font-size: .65rem;
  color: var(--primary-accent);
  opacity: .4;
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
  pointer-events: none;
}

.editor-row-name {
  flex: 1;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--text-color);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.editor-row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.editor-btn {
  padding: 4px 11px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all .15s;
  line-height: 1.6;
}

.editor-btn:hover {
  background: var(--hover-bg);
  color: var(--text-color);
  border-color: rgba(255, 255, 255, .12);
}

.editor-btn.active {
  background: rgba(230, 190, 80, .1);
  border-color: rgba(230, 190, 80, .35);
  color: var(--primary-accent);
}

.editor-btn.active:hover {
  background: rgba(230, 190, 80, .18);
}

.editor-btn-del {
  color: var(--text-dim);
}

.editor-btn-del:hover {
  background: rgba(255, 85, 103, .12);
  border-color: rgba(255, 85, 103, .35);
  color: var(--red-accent);
}

.editor-row-fields {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--border);
}

.editor-row-fields.open {
  display: grid;
}

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

.editor-field-full {
  grid-column: 1 / -1;
}

.editor-field label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--primary-accent);
  opacity: .5;
  padding-top: 4px;
}

.editor-input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--primary-bg);
  color: var(--text-color);
  font-size: .82rem;
  outline: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
  min-width: 0;
}

.editor-input:focus {
  border-color: rgba(230, 190, 80, .4);
  background: var(--accent-bg);
  box-shadow: 0 0 0 2px rgba(230, 190, 80, .07);
}

.editor-input::placeholder {
  color: var(--text-dim);
  font-size: .78rem;
}

.editor-input[type="number"] {
  -moz-appearance: textfield;
}

.editor-input[type="number"]::-webkit-outer-spin-button,
.editor-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

@media (max-width: 600px) {
  .editor-header {
    padding: 10px 12px;
  }

  .editor-action-btn {
    padding: 6px 10px;
    font-size: .7rem;
  }

  .editor-list {
    padding: 8px 10px 16px;
  }

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

  .editor-field-full {
    grid-column: 1;
  }

  .editor-title {
    font-size: .9rem;
  }
}

#content {
  width: 960px;
}
