:root {
  --bg-1: #030303;
  --bg-2: #080808;
  --bg-3: #101010;
  --card: rgba(17, 17, 17, 0.72);
  --card-strong: rgba(9, 9, 9, 0.9);
  --text: #f3f3f3;
  --muted: #a5a5a5;
  --border: rgba(255, 255, 255, 0.18);
  --border-soft: rgba(255, 255, 255, 0.1);
  --accent: #f0f0f0;
  --accent-2: #d7d7d7;
  --danger: #f15f5f;
  --ok: #c6f0d6;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 620px at 0% -20%, #25252544 0%, transparent 60%),
    radial-gradient(800px 440px at 95% 0%, #2020202f 0%, transparent 56%),
    linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 48%, var(--bg-1) 100%);
}

.site-bg-layer {
  position: fixed;
  inset: -40px;
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(14px) brightness(0.42);
  transform: scale(1.08);
  opacity: 0.9;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 3px 3px;
}

.hidden {
  display: none !important;
}

/* Landing */
.landing {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: clamp(20px, 4vw, 44px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 74% 34%, #141414 0%, #0a0a0a 46%, #040404 100%);
}

.landing-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 46%, rgba(0, 0, 0, 0.84) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 36px
    );
}

.landing-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin-left: clamp(4px, 5vw, 48px);
}

.landing-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  color: #c9c9c9;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.landing-title {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(64px, 13vw, 168px);
  line-height: 0.88;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.78);
}

.landing-stamp {
  margin-top: 16px;
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #dbdbdb;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
}

.enter-cloud {
  position: absolute;
  right: -170px;
  top: 20px;
  width: 260px;
  height: 260px;
  pointer-events: none;
}

.enter-cloud span {
  position: absolute;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: 1.2px;
}

.enter-cloud span:nth-child(1) {
  top: 0;
  left: 82px;
  color: #ffffff22;
}

.enter-cloud span:nth-child(2) {
  top: 54px;
  left: 20px;
  color: #e8e8e866;
}

.enter-cloud span:nth-child(3) {
  top: 112px;
  left: 94px;
  color: #dcdcdc8a;
}

.enter-cloud span:nth-child(4) {
  top: 168px;
  left: 46px;
  color: #ffffff3b;
}

.enter-site-btn {
  margin-top: 24px;
  min-width: 190px;
  position: relative;
  z-index: 4;
  pointer-events: auto;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #0a0a0a;
  background: linear-gradient(135deg, #f5f5f5 0%, #d9d9d9 100%);
  box-shadow:
    0 12px 28px rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.enter-site-btn::after {
  content: ">";
  margin-left: 8px;
}

.enter-site-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow:
    0 16px 34px rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.landing-player {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 11;
  width: min(620px, calc(100vw - 36px));
  padding: 4px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.landing-player-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

#landing-track-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #dedede;
  text-align: center;
}

.landing-player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}

.landing-player-controls button {
  width: 40px;
  min-width: 40px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  color: #f4f4f4;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 18px rgba(0, 0, 0, 0.35);
  font-size: 16px;
  cursor: pointer;
  pointer-events: auto;
}

.landing-player-controls button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 20px rgba(0, 0, 0, 0.42);
}

#landing-volume-input {
  width: 110px;
  opacity: 0.95;
}

#landing-progress-input {
  width: 100%;
  margin-bottom: 8px;
  opacity: 0.95;
}

.volume-pop-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.volume-pop {
  position: absolute;
  left: calc(100% - 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(4px);
}

.volume-pop-wrap:hover .volume-pop,
.volume-pop-wrap:focus-within .volume-pop {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

#landing-volume-toggle-btn {
  width: 36px;
  min-width: 36px;
  height: 34px;
  font-size: 15px;
}

#landing-progress-input,
#landing-volume-input,
#bg-blur-input {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.09));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#landing-progress-input::-webkit-slider-thumb,
#landing-volume-input::-webkit-slider-thumb,
#bg-blur-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f3f3f3;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 4px 8px rgba(0, 0, 0, 0.45);
}

#landing-progress-input::-moz-range-track,
#landing-volume-input::-moz-range-track,
#bg-blur-input::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.09));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#landing-progress-input::-moz-range-thumb,
#landing-volume-input::-moz-range-thumb,
#bg-blur-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f3f3f3;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 4px 8px rgba(0, 0, 0, 0.45);
}

.eyes {
  position: absolute;
  right: min(18vw, 200px);
  top: 18%;
  z-index: 1;
  display: flex;
  gap: 36px;
}

.eye {
  width: 38px;
  height: 18px;
  background: #f6f8ff;
  border-radius: 80% 20% 80% 20%;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.16);
  transform: rotate(-12deg);
}

.eye:last-child {
  transform: rotate(10deg) scaleX(-1);
}

.stealth-admin-btn {
  position: fixed;
  bottom: 9px;
  right: 10px;
  z-index: 6;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.1);
  font-size: 9px;
  line-height: 16px;
  padding: 0;
  cursor: pointer;
}

.stealth-admin-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.24);
}

/* App */
.app {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) clamp(14px, 3vw, 24px) 72px;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 280px at 15% 0%, rgba(255, 255, 255, 0.06), transparent 70%),
    radial-gradient(460px 260px at 95% 10%, rgba(255, 255, 255, 0.04), transparent 70%);
  z-index: -1;
}

h1 {
  margin: 0 0 6px;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 0.95;
  letter-spacing: 1px;
  letter-spacing: 0.3px;
  font-weight: 400;
}

.subtitle {
  margin: 0 0 26px;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.55;
}

.add-panel,
.list-panel,
.admin-panel,
.modal-card,
.options-panel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(18, 18, 18, 0.88), rgba(10, 10, 10, 0.94));
  box-shadow:
    0 24px 46px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
}

.add-panel {
  padding: 16px;
}

.options-panel {
  margin-bottom: 16px;
  padding: 12px;
}

#post-enter-menu {
  display: grid;
  gap: 14px;
  width: min(760px, 100%);
  margin-inline: auto;
}

.panel-note {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.options-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.options-list li {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.option-name {
  font-weight: 700;
  color: #f0f0f0;
}

.option-desc {
  color: var(--muted);
  font-size: 13px;
}

.menu-grid {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.menu-option-btn {
  text-align: left;
  display: grid;
  gap: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(150deg, rgba(245, 245, 245, 0.14), rgba(245, 245, 245, 0.07));
  color: var(--text);
  box-shadow: none;
  padding: 9px 11px;
}

.menu-option-btn:hover {
  border-color: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.page-section {
  display: grid;
  gap: 0;
}

.page-toolbar {
  margin: 0 0 12px;
}

#back-to-menu-btn {
  width: auto;
  min-width: 140px;
}

label {
  color: #c8c8c8;
  font-size: 13px;
  font-weight: 600;
}

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

input,
button {
  font: inherit;
}

#wish-input,
#wish-link-input,
#link-label-input,
#link-url-input,
#link-logo-input,
#link-logo-file-input,
#link-edit-label-input,
#link-edit-url-input,
#link-edit-logo-input,
#link-edit-logo-file-input,
#edit-text-input,
#edit-link-input,
#suggest-text-input,
#music-name-input,
#music-url-input,
#music-file-input,
#bg-image-input,
#bg-file-input {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(5, 8, 18, 0.74);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

#wish-link-input {
  margin-top: 10px;
}

#wish-input:focus,
#wish-link-input:focus,
#link-label-input:focus,
#link-url-input:focus,
#link-logo-input:focus,
#link-edit-label-input:focus,
#link-edit-url-input:focus,
#link-edit-logo-input:focus,
#edit-text-input:focus,
#edit-link-input:focus,
#suggest-text-input:focus,
#music-name-input:focus,
#music-url-input:focus,
#bg-image-input:focus {
  border-color: rgba(137, 166, 255, 0.74);
  box-shadow: 0 0 0 3px rgba(106, 130, 255, 0.2);
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: #101010;
  font-weight: 700;
  background: linear-gradient(130deg, #f5f5f5 0%, #dfdfdf 60%, #cfcfcf 100%);
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
  box-shadow:
    0 10px 22px rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.09);
  box-shadow:
    0 14px 26px rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.42) inset;
}

.list-panel {
  margin-top: 16px;
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 22px;
}

#progress-text,
.readonly-note,
.suggest-status,
.hint {
  color: var(--muted);
}

.readonly-note {
  margin: 11px 0 0;
  font-size: 13px;
}

#progress-text {
  font-size: 14px;
  font-weight: 600;
}

#wish-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.wish-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  position: relative;
  overflow: hidden;
}

.wish-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(182, 182, 182, 0.72));
  opacity: 0.75;
}

.check-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

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

.wish-check {
  width: 18px;
  height: 18px;
  accent-color: #e8e8e8;
}

.wish-check:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.wish-text.done {
  color: #7580a8;
  text-decoration: line-through;
}

.wish-link {
  font-size: 13px;
  color: #d9d9d9;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wish-link:hover {
  color: #ffffff;
}

.links-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

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

.link-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.link-logo-fallback {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #d6d6d6;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.link-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.link-title {
  color: #f0f0f0;
  font-weight: 700;
}

.link-url {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48vw;
}

.admin-actions {
  display: flex;
  gap: 6px;
}

.admin-actions button {
  padding: 7px 10px;
  font-size: 13px;
}

.edit-btn {
  background: linear-gradient(130deg, #ebebeb, #d3d3d3);
}

.delete-btn {
  background: linear-gradient(130deg, #f0c9c9, #dbb0b0);
}

.suggestion-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.suggest-btn {
  background: linear-gradient(130deg, #f2f2f2, #d8d8d8);
}

.admin-panel {
  margin-top: 14px;
  width: min(980px, 100%);
  padding: 14px;
}

.admin-panel h3 {
  margin: 0 0 8px;
}

.admin-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ok {
  margin: 0;
  font-weight: 700;
  color: var(--ok);
}

#lock-admin-btn {
  background: linear-gradient(130deg, #dbdbdb, #bbbbbb);
}

#clear-done-btn {
  background: linear-gradient(130deg, #ebd5d5, #cfb7b7);
}

.bg-form {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 8px;
}

.admin-sections {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.music-admin-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.music-admin-panel h4 {
  margin: 0 0 8px;
}

.music-admin-panel .bg-form {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.music-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.music-admin-name {
  font-weight: 600;
  color: #efefef;
}

.mini-player-btn {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 12;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
}

#bg-blur-input {
  width: 100%;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 2, 7, 0.78);
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  padding: 16px;
}

.modal-card h3 {
  margin: 0 0 12px;
}

.edit-form {
  display: grid;
  gap: 8px;
}

.modal-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Spam overlay */
.spam-warning {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.spam-warning.hidden {
  display: none;
}

.spam-warning-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.spam-warning-text {
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(76px, 16vw, 220px);
  letter-spacing: 2px;
  color: var(--danger);
  text-shadow:
    0 0 14px rgba(255, 88, 108, 0.85),
    0 0 42px rgba(255, 0, 0, 0.58);
  animation: spamPulse 0.42s ease-in-out infinite alternate;
}

@keyframes spamPulse {
  from {
    transform: scale(1);
    filter: brightness(0.92);
  }
  to {
    transform: scale(1.035);
    filter: brightness(1.14);
  }
}

@media (max-width: 780px) {
  .enter-cloud,
  .eyes {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .add-panel,
  .list-panel,
  .admin-panel {
    animation: panelIn 0.45s ease both;
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .landing {
    padding: 18px;
  }

  .landing-content {
    margin-left: 0;
  }

  .row,
  .suggestion-row,
  .modal-actions,
  .options-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .admin-sections {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .suggest-status {
    text-align: center;
  }

  .landing-player {
    bottom: 18px;
    width: calc(100vw - 28px);
  }
}
