/* Zombie Tag theme
   Post-apocalyptic horror theme: blood, rust, grime, and sickly green highlights.
   Load after /styles.css
*/

:root {
  --zt-bg-1: #0c0d0b;
  --zt-bg-2: #17130f;
  --zt-panel: rgba(20, 17, 14, 0.92);
  --zt-panel-2: rgba(31, 23, 20, 0.92);
  --zt-border: rgba(116, 23, 23, 0.7);
  --zt-border-soft: rgba(123, 47, 34, 0.42);
  --zt-text: #e4ddd0;
  --zt-text-dim: #a99f91;
  --zt-blood: #8f1418;
  --zt-blood-bright: #c1282d;
  --zt-rust: #7b4a24;
  --zt-bone: #d0c2a8;
  --zt-infection: #7fa24f;
  --zt-infection-glow: rgba(158, 215, 79, 0.28);
  --zt-shadow: rgba(0, 0, 0, 0.55);
}

html,
body {
  background:
    radial-gradient(circle at 20% 10%, rgba(120, 16, 16, 0.14), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(128, 156, 61, 0.10), transparent 24%),
    linear-gradient(180deg, #100f0d 0%, #090909 100%);
  color: var(--zt-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(circle at 12% 26%, rgba(121, 17, 17, 0.10), transparent 20%),
    radial-gradient(circle at 82% 74%, rgba(100, 131, 46, 0.08), transparent 18%);
  opacity: 0.75;
  z-index: 0;
}

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

h1, h2, h3 {
  color: #f0e6d3;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

.muted,
.admin-status-label,
#joinQrText,
#profileUserInfo {
  color: var(--zt-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(36, 26, 22, 0.94), rgba(18, 14, 12, 0.96));
  border: 1px solid var(--zt-border-soft);
  box-shadow:
    0 14px 32px var(--zt-shadow),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.admin-status-card {
  background:
    radial-gradient(circle at top left, rgba(140, 18, 22, 0.20), transparent 36%),
    radial-gradient(circle at bottom right, rgba(126, 153, 63, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(34, 26, 22, 0.96), rgba(18, 14, 12, 0.98));
  border-color: rgba(122, 34, 34, 0.75);
}

.admin-status-title {
  letter-spacing: 0.03em;
}

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

.admin-tab-button,
.sub-tab-button,
.button-link,
button,
select,
input,
textarea {
  font-family: inherit;
}

.admin-tab-button,
.sub-tab-button,
.button-link,
button {
  border: 1px solid rgba(118, 42, 32, 0.66);
  color: var(--zt-text);
  background:
    linear-gradient(180deg, rgba(52, 37, 31, 0.96), rgba(29, 20, 18, 0.96));
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.admin-tab-button:hover,
.sub-tab-button:hover,
.button-link:hover,
button:hover {
  border-color: rgba(164, 52, 52, 0.9);
  background:
    linear-gradient(180deg, rgba(71, 44, 39, 0.98), rgba(37, 22, 20, 0.98));
}

.admin-tab-button.active,
.sub-tab-button.active {
  color: #fff5e6;
  border-color: rgba(180, 49, 49, 0.95);
  background:
    linear-gradient(180deg, rgba(102, 22, 27, 0.95), rgba(66, 16, 20, 0.98));
  box-shadow:
    0 0 0 1px rgba(193, 40, 45, 0.25),
    0 0 18px rgba(145, 20, 24, 0.18);
}

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

button.secondary,
.secondary-link {
  background:
    linear-gradient(180deg, rgba(47, 43, 34, 0.96), rgba(26, 23, 20, 0.96));
  border-color: rgba(118, 95, 62, 0.6);
}

button.danger-button {
  background:
    linear-gradient(180deg, rgba(136, 18, 23, 0.96), rgba(92, 14, 18, 0.98));
  border-color: rgba(199, 47, 47, 0.95);
  color: #fff0f0;
}

.ready-button {
  background:
    linear-gradient(180deg, rgba(106, 136, 54, 0.98), rgba(65, 87, 28, 0.98)) !important;
  border-color: rgba(159, 205, 86, 0.88) !important;
  color: #101607 !important;
  box-shadow:
    0 0 24px rgba(127, 162, 79, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

.ready-button:hover {
  background:
    linear-gradient(180deg, rgba(127, 164, 67, 1), rgba(76, 104, 34, 1)) !important;
  box-shadow:
    0 0 30px rgba(127, 162, 79, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

.status-pill {
  color: var(--zt-bone);
  border-color: rgba(109, 77, 49, 0.7);
  background: rgba(48, 34, 28, 0.82);
}

.status-pill-good {
  color: #eff9dd;
  border-color: rgba(159, 205, 86, 0.9);
  background: rgba(88, 115, 39, 0.38);
}

.status-pill-waiting {
  color: #f0dbbc;
  border-color: rgba(160, 90, 39, 0.88);
  background: rgba(104, 56, 21, 0.34);
}

.status-pill-paused {
  color: #f4e8c8;
  border-color: rgba(132, 108, 70, 0.85);
  background: rgba(84, 66, 42, 0.36);
}

.status-pill-ended {
  color: #ffe3e3;
  border-color: rgba(193, 40, 45, 0.92);
  background: rgba(105, 15, 20, 0.36);
}

label,
strong,
.admin-list,
.admin-card {
  color: var(--zt-text);
}

input,
select,
textarea {
  color: var(--zt-text);
  background: rgba(16, 13, 11, 0.95);
  border: 1px solid rgba(110, 67, 47, 0.7);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(170, 202, 89, 0.95);
  box-shadow:
    0 0 0 3px rgba(127, 162, 79, 0.15),
    inset 0 1px 2px rgba(0,0,0,0.35);
}

.readonly-input {
  background: rgba(28, 23, 21, 0.9);
  color: #b6aa9a;
}

.checkbox-row span {
  color: var(--zt-text);
}

.admin-list > *,
.join-player-row {
  background: rgba(37, 29, 25, 0.82);
  border: 1px solid rgba(95, 58, 43, 0.45);
}

.join-player-avatar,
.profile-avatar-preview,
.profile-icon-button {
  border: 1px solid rgba(127, 162, 79, 0.48);
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

.profile-icon-button {
  background: linear-gradient(180deg, rgba(42, 32, 26, 0.98), rgba(23, 18, 15, 0.98));
}

.profile-icon-button:hover {
  background: linear-gradient(180deg, rgba(58, 37, 31, 0.98), rgba(30, 20, 17, 0.98));
}

.profile-icon-fallback {
  color: #e9dfcc;
}

.fallback-avatar {
  background: rgba(88, 24, 24, 0.55);
  border: 1px solid rgba(164, 47, 47, 0.65);
  color: #fff3f3;
}

.join-qr-placeholder {
  background:
    linear-gradient(180deg, rgba(28, 24, 22, 0.96), rgba(15, 13, 12, 0.98));
  border: 1px dashed rgba(136, 102, 72, 0.45);
}

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

#adminMap,
.admin-map,
.map,
.leaflet-container {
  border: 1px solid rgba(110, 42, 42, 0.6);
  box-shadow:
    inset 0 0 0 1px rgba(123, 52, 33, 0.18),
    0 10px 24px rgba(0,0,0,0.28);
}

.map-status {
  color: #f0e6d6;
  background: rgba(27, 21, 19, 0.92);
  border: 1px solid rgba(108, 58, 45, 0.6);
}

.map-status.success {
  border-color: rgba(127, 162, 79, 0.7);
  background: rgba(56, 72, 29, 0.25);
}

.map-status.error {
  border-color: rgba(193, 40, 45, 0.82);
  background: rgba(111, 18, 22, 0.24);
}

#mapHelp {
  color: var(--zt-text-dim);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #201814;
  color: var(--zt-text);
}

a,
a:visited {
  color: #d8d29d;
}

a:hover {
  color: #f8edc6;
}

.status.success {
  background: rgba(87, 115, 40, 0.28);
  border: 1px solid rgba(127, 162, 79, 0.7);
  color: #edf5dd;
}

.status.error {
  background: rgba(111, 18, 22, 0.30);
  border: 1px solid rgba(193, 40, 45, 0.78);
  color: #ffe0e0;
}

.login-card {
  background:
    radial-gradient(circle at top right, rgba(146, 19, 25, 0.18), transparent 26%),
    radial-gradient(circle at bottom left, rgba(111, 145, 54, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(33, 25, 22, 0.96), rgba(18, 14, 12, 0.98));
}
