/* Tron Sci-Fi theme
   Bright neon sci-fi command UI with cyan, electric blue, and magenta accents.
   Load after /styles.css
*/

:root {
  --ts-bg-1: #050912;
  --ts-bg-2: #0a1322;
  --ts-panel: rgba(7, 16, 28, 0.94);
  --ts-panel-2: rgba(9, 21, 36, 0.96);
  --ts-border: rgba(42, 220, 255, 0.62);
  --ts-border-soft: rgba(96, 133, 255, 0.32);
  --ts-text: #dff8ff;
  --ts-text-dim: #90b8d0;
  --ts-cyan: #39e7ff;
  --ts-blue: #4f83ff;
  --ts-magenta: #ff56d8;
  --ts-green: #67ffcf;
  --ts-warn: #ffd96b;
  --ts-danger: #ff647e;
  --ts-shadow: rgba(0, 0, 0, 0.56);
}

html,
body {
  background:
    radial-gradient(circle at 16% 14%, rgba(57, 231, 255, 0.10), transparent 18%),
    radial-gradient(circle at 84% 10%, rgba(255, 86, 216, 0.08), transparent 16%),
    radial-gradient(circle at 74% 82%, rgba(79, 131, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #07101e 0%, #03060c 100%);
  color: var(--ts-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,0.014) 0px,
      rgba(255,255,255,0.014) 1px,
      transparent 1px,
      transparent 4px
    );
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

h1, h2, h3 {
  color: #ecfdff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(57, 231, 255, 0.16);
}

.muted,
.admin-status-label,
#profileUserInfo,
#joinQrText,
#mapHelp {
  color: var(--ts-text-dim) !important;
}

.card,
.admin-section,
.profile-modal,
.join-qr-card,
.join-player-card,
.admin-status-card,
.admin-panel,
.modal-backdrop .card {
  background:
    linear-gradient(180deg, rgba(8, 18, 31, 0.96), rgba(5, 11, 22, 0.97));
  border: 1px solid var(--ts-border-soft);
  box-shadow:
    0 16px 34px var(--ts-shadow),
    inset 0 0 0 1px rgba(57, 231, 255, 0.06),
    0 0 20px rgba(79, 131, 255, 0.07);
}

.admin-status-card {
  background:
    radial-gradient(circle at top left, rgba(57, 231, 255, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 86, 216, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(8, 20, 34, 0.98), rgba(6, 12, 24, 0.98));
  border-color: rgba(57, 231, 255, 0.42);
}

.admin-status-title {
  text-shadow: 0 0 14px rgba(57, 231, 255, 0.2);
}

.admin-tabs,
.sub-tab-bar {
  gap: 10px;
}

.admin-tab-button,
.sub-tab-button,
.button-link,
button {
  border: 1px solid rgba(57, 231, 255, 0.5);
  color: var(--ts-text);
  background:
    linear-gradient(180deg, rgba(17, 31, 53, 0.98), rgba(10, 19, 34, 0.98));
  box-shadow:
    0 0 0 1px rgba(57, 231, 255, 0.08),
    0 0 14px rgba(57, 231, 255, 0.08);
}

.admin-tab-button:hover,
.sub-tab-button:hover,
.button-link:hover,
button:hover {
  border-color: rgba(99, 245, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(24, 44, 74, 0.99), rgba(12, 23, 42, 0.99));
  box-shadow:
    0 0 0 1px rgba(57, 231, 255, 0.10),
    0 0 20px rgba(57, 231, 255, 0.14);
}

.admin-tab-button.active,
.sub-tab-button.active {
  color: #ffffff;
  border-color: rgba(57, 231, 255, 0.95);
  background:
    linear-gradient(180deg, rgba(18, 67, 112, 0.96), rgba(11, 31, 60, 0.98));
  box-shadow:
    0 0 0 1px rgba(57, 231, 255, 0.14),
    0 0 24px rgba(57, 231, 255, 0.22);
}

.admin-tab-button.disabled-tab,
.admin-tab-button:disabled,
.sub-tab-button:disabled,
button:disabled {
  opacity: 0.45;
  filter: grayscale(0.18);
}

button.secondary,
.secondary-link {
  border-color: rgba(118, 126, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(28, 34, 74, 0.98), rgba(15, 19, 46, 0.98));
}

button.danger-button {
  border-color: rgba(255, 100, 126, 0.8);
  background:
    linear-gradient(180deg, rgba(104, 22, 43, 0.96), rgba(58, 11, 26, 0.98));
  color: #fff0f5;
}

.ready-button {
  background:
    linear-gradient(180deg, rgba(64, 255, 219, 0.98), rgba(26, 179, 215, 0.98)) !important;
  border-color: rgba(159, 255, 240, 0.92) !important;
  color: #04131a !important;
  box-shadow:
    0 0 26px rgba(57, 231, 255, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.24) !important;
}

.ready-button:hover {
  background:
    linear-gradient(180deg, rgba(96, 255, 229, 1), rgba(34, 199, 228, 1)) !important;
  box-shadow:
    0 0 30px rgba(57, 231, 255, 0.32),
    inset 0 1px 0 rgba(255,255,255,0.26) !important;
}

.status-pill {
  color: #e8fbff;
  border-color: rgba(86, 158, 255, 0.55);
  background: rgba(11, 24, 44, 0.82);
}

.status-pill-good {
  color: #e9fff9;
  border-color: rgba(103, 255, 207, 0.9);
  background: rgba(22, 93, 89, 0.34);
}

.status-pill-waiting {
  color: #fff6d8;
  border-color: rgba(255, 217, 107, 0.84);
  background: rgba(96, 76, 14, 0.3);
}

.status-pill-paused {
  color: #efeaff;
  border-color: rgba(129, 126, 255, 0.86);
  background: rgba(43, 38, 96, 0.32);
}

.status-pill-ended {
  color: #ffe7ee;
  border-color: rgba(255, 100, 126, 0.84);
  background: rgba(97, 18, 39, 0.32);
}

input,
select,
textarea {
  color: var(--ts-text);
  background: rgba(4, 11, 22, 0.96);
  border: 1px solid rgba(57, 231, 255, 0.42);
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.38),
    0 0 0 1px rgba(57, 231, 255, 0.03);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(57, 231, 255, 0.96);
  box-shadow:
    0 0 0 3px rgba(57, 231, 255, 0.14),
    0 0 18px rgba(57, 231, 255, 0.14),
    inset 0 1px 2px rgba(0,0,0,0.38);
}

.readonly-input {
  background: rgba(11, 18, 30, 0.88);
  color: #9bbad4;
}

.admin-list > *,
.join-player-row {
  background: rgba(10, 21, 36, 0.84);
  border: 1px solid rgba(57, 231, 255, 0.22);
}

.join-player-avatar,
.profile-avatar-preview,
.profile-icon-button {
  border: 1px solid rgba(57, 231, 255, 0.5);
  box-shadow: 0 0 12px rgba(57, 231, 255, 0.12);
}

.profile-icon-button {
  background: linear-gradient(180deg, rgba(17, 31, 53, 0.98), rgba(10, 19, 34, 0.98));
}

.profile-icon-button:hover {
  background: linear-gradient(180deg, rgba(24, 44, 74, 0.99), rgba(12, 23, 42, 0.99));
}

.profile-icon-fallback,
.fallback-avatar {
  color: #edffff;
}

.fallback-avatar {
  background: rgba(48, 64, 132, 0.46);
  border: 1px solid rgba(126, 141, 255, 0.52);
}

.join-qr-placeholder {
  background:
    linear-gradient(180deg, rgba(9, 19, 33, 0.98), rgba(5, 10, 19, 0.99));
  border: 1px dashed rgba(57, 231, 255, 0.34);
}

.join-qr-image {
  background: #eefcff;
}

#adminMap,
.admin-map,
.map,
.leaflet-container {
  border: 1px solid rgba(57, 231, 255, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(57, 231, 255, 0.06),
    0 10px 28px rgba(0,0,0,0.24),
    0 0 16px rgba(57, 231, 255, 0.08);
}

.map-status {
  color: #e8fbff;
  background: rgba(8, 17, 30, 0.92);
  border: 1px solid rgba(57, 231, 255, 0.34);
}

.map-status.success {
  border-color: rgba(103, 255, 207, 0.7);
  background: rgba(17, 98, 93, 0.24);
}

.map-status.error {
  border-color: rgba(255, 100, 126, 0.74);
  background: rgba(93, 19, 37, 0.24);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #0c1627;
  color: var(--ts-text);
}

a,
a:visited {
  color: #9cf4ff;
}

a:hover {
  color: #ffffff;
}

.status.success {
  background: rgba(17, 98, 93, 0.28);
  border: 1px solid rgba(103, 255, 207, 0.7);
  color: #eafffb;
}

.status.error {
  background: rgba(93, 19, 37, 0.28);
  border: 1px solid rgba(255, 100, 126, 0.72);
  color: #ffeaf0;
}

.login-card {
  background:
    radial-gradient(circle at top right, rgba(57, 231, 255, 0.12), transparent 26%),
    radial-gradient(circle at bottom left, rgba(255, 86, 216, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(8, 20, 34, 0.98), rgba(5, 11, 22, 0.98));
}
