﻿.panel {
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, rgba(30, 74, 185, 0.78), rgba(19, 43, 124, 0.9));
  box-shadow: var(--panel-shadow);
  border-radius: 20px;
}

.title-xl {
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 rgba(8, 25, 82, 0.35);
}

.title-lg {
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.app-greeting {
  cursor: default;
  user-select: none;
}

.subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  letter-spacing: 0.03em;
}

.login-card .title-xl,
.login-card .subtitle {
  cursor: default;
  user-select: none;
}

.login-card #loginButton,
.login-card #loginButton * {
  user-select: none;
}

.login-card #loginButton {
  cursor: pointer;
}

.discord-orb {
  width: 172px;
  height: 172px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #4cc3ff, #2458d6);
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 0 rgba(20, 40, 110, 0.45), 0 18px 35px rgba(2, 6, 18, 0.35);
  cursor: default;
  user-select: none;
}

.discord-orb img {
  cursor: default;
  user-select: none;
  pointer-events: none;
}

.icon-btn,
.primary-btn,
.secondary-btn,
.danger-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.primary-btn {
  background: var(--primary);
  color: #243169;
  font-weight: 600;
  padding: 0.9rem 1.25rem;
  border-color: rgba(0, 26, 102, 0.35);
  box-shadow: 0 6px 0 rgba(163, 128, 0, 0.6);
}

.primary-btn:hover {
  background: var(--primary-hover);
}

.secondary-btn {
  background: rgba(14, 37, 104, 0.75);
  border-color: rgba(198, 225, 255, 0.25);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 6px 0 rgba(9, 24, 70, 0.4);
}

.icon-btn {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(14, 38, 109, 0.82);
  border-color: rgba(202, 230, 255, 0.3);
}

.icon-btn img {
  width: 20px;
  height: 20px;
}

.icon-btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover {
  transform: translateY(-1px);
}

.icon-btn.is-playing {
  border-color: rgba(255, 226, 110, 0.75);
  background: rgba(255, 188, 63, 0.25);
}

.icon-btn:focus-visible,
.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.danger-btn:focus-visible,
.input:focus-visible,
.dropzone:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.audio-card {
  padding: 1rem;
  display: grid;
  gap: 0.95rem;
  min-height: 182px;
  transform: rotate(-0.3deg);
}

.audio-theme-tag {
  justify-self: start;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(218, 240, 255, 0.55);
  background: rgba(8, 31, 92, 0.5);
  color: var(--text-secondary);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.audio-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.audio-info {
  flex: 1;
  min-width: 0;
}

.audio-name {
  font-size: 1.7rem;
  font-weight: 650;
  line-height: 1.15;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-overflow: ellipsis;
}

.audio-duration {
  color: var(--text-secondary);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.danger-btn {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--danger);
  color: #f4f5fb;
  border-color: rgba(255, 201, 201, 0.45);
  display: inline-grid;
  place-items: center;
}

.danger-btn:hover {
  background: var(--danger-hover);
}

.danger-btn img {
  width: 20px;
  height: 20px;
}

.audio-card-footer {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.audio-join-toggle {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
}

.audio-join-toggle.is-on {
  border-color: rgba(162, 241, 167, 0.5);
}

.audio-join-toggle.is-off {
  border-color: rgba(255, 164, 164, 0.45);
  background: rgba(77, 20, 20, 0.45);
}

.fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: var(--primary);
  color: #233263;
  border: 2px solid rgba(8, 31, 106, 0.36);
  box-shadow: 0 8px 0 rgba(163, 128, 0, 0.55), 0 16px 30px rgba(9, 18, 48, 0.38);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 20;
}

.fab img {
  width: 26px;
  height: 26px;
}

.modal {
  width: min(640px, 100%);
  padding: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.close-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 2rem;
}

.field-label {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--text-primary);
  font-weight: 600;
}

.input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(185, 223, 255, 0.4);
  background: rgba(13, 35, 98, 0.55);
  color: var(--text-primary);
  padding: 0.8rem 0.95rem;
}

.dropzone {
  margin-top: 1.1rem;
  border: 2px dashed rgba(219, 240, 255, 0.58);
  border-radius: 12px;
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.2rem;
  background: rgba(13, 32, 89, 0.45);
  cursor: pointer;
}

.dropzone p:first-of-type {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 0.8rem;
}

.dropzone p:last-of-type {
  color: var(--text-secondary);
  margin-top: 0.45rem;
}

.modal-footer {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.toast {
  position: fixed;
  top: 1.15rem;
  right: 1.15rem;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(236, 247, 255, 0.5);
  background: rgba(18, 44, 120, 0.95);
  color: var(--text-primary);
  z-index: 50;
}

.toast.error {
  border-color: rgba(255, 145, 145, 0.6);
}

.empty-state {
  margin-top: 2rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

@media (max-width: 700px) {
  .audio-name {
    font-size: 1.4rem;
  }

  .audio-duration {
    font-size: 1.1rem;
  }

  .modal {
    padding: 1rem;
  }
}

body.theme-league .panel {
  background: linear-gradient(160deg, rgba(30, 43, 65, 0.86), rgba(16, 24, 39, 0.96));
  border-radius: 14px;
}

body.theme-league .title-xl,
body.theme-league .title-lg {
  text-transform: none;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

body.theme-league .discord-orb {
  background: radial-gradient(circle at 50% 40%, #2d456a, #1a2539);
  border-color: rgba(203, 179, 129, 0.55);
}

body.theme-league .audio-card {
  transform: none;
}

body.theme-league .primary-btn {
  color: #1f2124;
}

body.theme-minecraft .panel {
  background: linear-gradient(160deg, rgba(58, 103, 52, 0.86), rgba(39, 67, 36, 0.96));
  border-radius: 4px;
}

body.theme-minecraft .title-xl,
body.theme-minecraft .title-lg {
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: none;
}

body.theme-minecraft .discord-orb {
  border-radius: 8px;
  background: linear-gradient(180deg, #7db75f, #4d7f3d);
  border-color: rgba(232, 255, 216, 0.65);
  box-shadow: 0 8px 0 rgba(30, 60, 26, 0.45), 0 14px 28px rgba(12, 24, 8, 0.35);
}

body.theme-minecraft .audio-card {
  transform: none;
}

body.theme-minecraft .icon-btn,
body.theme-minecraft .danger-btn,
body.theme-minecraft .fab {
  border-radius: 6px;
}

body.theme-minecraft .dropzone {
  border-style: solid;
}

body.theme-league .topbar {
  border-color: rgba(203, 179, 129, 0.38);
  background: rgba(27, 38, 57, 0.56);
}

body.theme-minecraft .topbar {
  border-color: rgba(213, 239, 190, 0.45);
  background: rgba(58, 96, 53, 0.56);
  border-radius: 6px;
}

.topbar-heading {
  min-width: 0;
}

.theme-tagline {
  color: var(--text-secondary);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.theme-mode-chip {
  border: 1px solid rgba(220, 242, 255, 0.45);
  background: rgba(10, 34, 97, 0.65);
  color: var(--text-secondary);
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}

.sfx-toggle {
  min-width: 135px;
  text-align: center;
}

.sfx-toggle.is-on {
  border-color: rgba(162, 241, 167, 0.5);
}

.sfx-toggle.is-off {
  opacity: 0.82;
}

.volume-control {
  display: grid;
  grid-template-columns: auto 132px auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0.2rem;
}

.volume-label,
.volume-value {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  user-select: none;
}

.volume-value {
  min-width: 38px;
  text-align: right;
}

.volume-slider {
  width: 132px;
  accent-color: var(--primary);
  cursor: pointer;
}

.theme-showcase {
  margin: 0;
  width: min(220px, 62vw);
  border: 2px solid rgba(217, 237, 255, 0.42);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(7, 18, 56, 0.45);
}

.theme-showcase img {
  display: block;
  width: 100%;
  height: auto;
}

.theme-showcase-dashboard {
  margin: 1.25rem auto 1rem;
}

@media (max-width: 700px) {
  .theme-showcase-dashboard {
    margin: 1rem auto 0.9rem;
  }
}


.upload-editor {
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(198, 225, 255, 0.25);
  border-radius: 12px;
  background: rgba(11, 29, 78, 0.5);
  display: grid;
  gap: 0.7rem;
}

.upload-editor-row {
  display: grid;
  gap: 0.35rem;
}

.upload-editor-row label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.upload-editor-row input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.upload-editor-meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.upload-editor-actions {
  display: flex;
  gap: 0.6rem;
}

#uploadPreviewAudio {
  display: none;
}


.audio-card-footer-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.js-edit-btn {
  white-space: nowrap;
  min-width: 96px;
}

.impersonation-banner {
  border: 1px solid rgba(255, 201, 105, 0.65);
  background: rgba(88, 55, 17, 0.62);
  color: #ffe9c2;
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}

.dashboard-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.dashboard-tab-btn.is-active {
  border-color: rgba(255, 232, 135, 0.7);
  background: rgba(255, 193, 69, 0.26);
}

.admin-panel {
  padding: 1rem;
}

.leaderboard-panel {
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.leaderboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.leaderboard-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  background: rgba(11, 28, 80, 0.35);
  display: grid;
  gap: 0.2rem;
}

.leaderboard-metric-value {
  font-size: 1.4rem;
  font-weight: 700;
}

.leaderboard-metric-label {
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: rgba(12, 32, 90, 0.35);
}

.leaderboard-rank {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 650;
}

.leaderboard-label {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.leaderboard-value {
  font-weight: 700;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(0, 1.2fr);
  gap: 0.9rem;
}

.admin-users,
.admin-audios {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(11, 28, 80, 0.35);
}

.admin-users {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  max-height: 60vh;
  overflow: auto;
}

.admin-user-row {
  text-align: left;
  border: 1px solid rgba(208, 229, 255, 0.28);
  background: rgba(20, 45, 112, 0.45);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  display: grid;
  gap: 0.15rem;
}

.admin-user-row.is-selected {
  border-color: rgba(255, 224, 102, 0.75);
  background: rgba(255, 194, 76, 0.15);
}

.admin-user-name {
  font-weight: 650;
}

.admin-user-meta {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.admin-audios {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.admin-logs {
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(9, 26, 74, 0.35);
  display: grid;
  gap: 0.5rem;
}

.admin-logs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.admin-log-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  background: rgba(12, 32, 90, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-log-time {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.admin-log-text {
  font-size: 0.88rem;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .admin-log-row {
    grid-template-columns: 1fr;
  }
}

.admin-audios-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.admin-audio-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: rgba(9, 26, 74, 0.45);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
}

.admin-audio-name {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.admin-audio-meta {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-users {
    max-height: 34vh;
  }

  .leaderboard-metrics {
    grid-template-columns: 1fr;
  }
}

body.theme-fortnite .theme-mode-chip {
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(255, 214, 94, 0.35);
}

body.theme-fortnite .audio-theme-tag {
  border-radius: 999px;
  background: rgba(12, 47, 132, 0.58);
}

body.theme-league .theme-mode-chip {
  border-color: rgba(203, 179, 129, 0.6);
  background: linear-gradient(180deg, rgba(76, 62, 38, 0.7), rgba(41, 33, 22, 0.78));
  color: #efd9ad;
  border-radius: 4px;
}

body.theme-league .audio-theme-tag {
  border-color: rgba(203, 179, 129, 0.58);
  background: rgba(53, 45, 31, 0.66);
  color: #e8d2a5;
  border-radius: 4px;
}

body.theme-minecraft .theme-mode-chip {
  border-radius: 4px;
  border-color: rgba(212, 240, 190, 0.65);
  background: linear-gradient(180deg, rgba(92, 140, 76, 0.76), rgba(52, 91, 43, 0.86));
  color: #ebf8de;
  box-shadow: inset 0 -2px 0 rgba(34, 57, 27, 0.45);
}

body.theme-minecraft .audio-theme-tag {
  border-radius: 4px;
  border-color: rgba(212, 240, 190, 0.62);
  background: rgba(57, 93, 48, 0.76);
  color: #e7f7d8;
}

body.theme-csgo .panel {
  background: linear-gradient(160deg, rgba(57, 63, 72, 0.9), rgba(31, 36, 43, 0.96));
  border-radius: 10px;
}

body.theme-csgo .title-xl,
body.theme-csgo .title-lg {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
}

body.theme-csgo .audio-card {
  transform: none;
}

body.theme-csgo .topbar {
  border-color: rgba(240, 179, 111, 0.4);
  background: rgba(44, 49, 56, 0.62);
}

body.theme-csgo .theme-mode-chip {
  border-color: rgba(240, 179, 111, 0.62);
  background: linear-gradient(180deg, rgba(104, 81, 56, 0.7), rgba(63, 48, 33, 0.8));
  color: #f7d7ad;
  border-radius: 8px;
}

body.theme-csgo .audio-theme-tag {
  border-color: rgba(240, 179, 111, 0.58);
  background: rgba(89, 66, 43, 0.7);
  color: #f1d3ac;
  border-radius: 8px;
}

body.theme-csgo .discord-orb {
  background: radial-gradient(circle at 50% 40%, #6f7378, #3b3f45);
  border-color: rgba(245, 189, 124, 0.6);
}

body.theme-valorant .panel {
  background: linear-gradient(160deg, rgba(44, 30, 40, 0.9), rgba(21, 17, 24, 0.97));
  border-radius: 12px;
}

body.theme-valorant .title-xl,
body.theme-valorant .title-lg {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-shadow: 0 3px 0 rgba(56, 18, 34, 0.65);
}

body.theme-valorant .audio-card {
  transform: rotate(0.2deg);
}

body.theme-valorant .topbar {
  border-color: rgba(255, 118, 148, 0.42);
  background: rgba(45, 22, 33, 0.55);
}

body.theme-valorant .theme-mode-chip {
  border-color: rgba(255, 118, 148, 0.65);
  background: linear-gradient(180deg, rgba(102, 29, 49, 0.72), rgba(64, 21, 34, 0.82));
  color: #ffd3de;
  border-radius: 3px;
}

body.theme-valorant .audio-theme-tag {
  border-color: rgba(255, 118, 148, 0.6);
  background: rgba(81, 28, 43, 0.72);
  color: #ffd1dc;
  border-radius: 3px;
}

body.theme-valorant .discord-orb {
  background: radial-gradient(circle at 50% 40%, #5c2b3d, #2d1721);
  border-color: rgba(255, 128, 156, 0.62);
}
