/* Tactical Camo theme
   Military tactical style with olive drab, tan, dark charcoal, and subtle camo panel textures.
   Load after /styles.css
*/

:root {
  --tc-bg-1: #101511;
  --tc-bg-2: #1a2018;
  --tc-panel: rgba(25, 31, 25, 0.94);
  --tc-panel-2: rgba(34, 40, 32, 0.95);
  --tc-border: rgba(101, 112, 72, 0.68);
  --tc-border-soft: rgba(126, 118, 89, 0.36);
  --tc-text: #e4e0d1;
  --tc-text-dim: #a7a390;
  --tc-olive: #6c7c4e;
  --tc-olive-dark: #47553a;
  --tc-khaki: #a49670;
  --tc-sand: #d0c3a0;
  --tc-accent: #b8c98c;
  --tc-danger: #8d3d36;
  --tc-shadow: rgba(0, 0, 0, 0.5);
}

html,
body {
  background:
    radial-gradient(circle at 20% 15%, rgba(132, 141, 91, 0.08), transparent 22%),
    radial-gradient(circle at 78% 8%, rgba(172, 142, 88, 0.05), transparent 16%),
    linear-gradient(180deg, #161a15 0%, #0d0f0d 100%);
  color: var(--tc-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background:
    radial-gradient(circle at 12% 22%, rgba(73, 84, 59, 0.24) 0 4%, transparent 4.2%),
    radial-gradient(circle at 28% 18%, rgba(52, 62, 45, 0.18) 0 5%, transparent 5.2%),
    radial-gradient(circle at 42% 29%, rgba(142, 128, 95, 0.14) 0 4%, transparent 4.2%),
    radial-gradient(circle at 66% 20%, rgba(87, 97, 64, 0.22) 0 5%, transparent 5.2%),
    radial-gradient(circle at 82% 32%, rgba(122, 108, 79, 0.14) 0 4.5%, transparent 4.7%),
    radial-gradient(circle at 18% 72%, rgba(62, 72, 48, 0.20) 0 5%, transparent 5.2%),
    radial-gradient(circle at 36% 82%, rgba(122, 108, 79, 0.14) 0 4%, transparent 4.2%),
    radial-gradient(circle at 62% 74%, rgba(68, 78, 50, 0.22) 0 5%, transparent 5.2%),
    radial-gradient(circle at 84% 78%, rgba(52, 62, 45, 0.16) 0 4.5%, transparent 4.7%);
  z-index: 0;
}

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

h1, h2, h3 {
  color: #eee7d1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.muted,
.admin-status-label,
#profileUserInfo,
#joinQrText,
#mapHelp {
  color: var(--tc-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(41, 47, 38, 0.95), rgba(25, 30, 24, 0.97));
  border: 1px solid var(--tc-border-soft);
  box-shadow:
    0 12px 28px var(--tc-shadow),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.admin-status-card {
  background:
    radial-gradient(circle at top left, rgba(168, 152, 105, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(47, 55, 42, 0.98), rgba(27, 33, 26, 0.98));
  border-color: rgba(122, 127, 81, 0.58);
}

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

.admin-tab-button,
.sub-tab-button,
.button-link,
button {
  border: 1px solid rgba(103, 110, 75, 0.7);
  color: var(--tc-text);
  background:
    linear-gradient(180deg, rgba(62, 69, 53, 0.97), rgba(37, 43, 34, 0.97));
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
}

.admin-tab-button:hover,
.sub-tab-button:hover,
.button-link:hover,
button:hover {
  border-color: rgba(184, 201, 140, 0.82);
  background:
    linear-gradient(180deg, rgba(76, 84, 64, 0.98), rgba(43, 50, 38, 0.98));
}

.admin-tab-button.active,
.sub-tab-button.active {
  color: #fff5dc;
  border-color: rgba(188, 177, 130, 0.92);
  background:
    linear-gradient(180deg, rgba(104, 114, 75, 0.98), rgba(62, 69, 53, 0.99));
  box-shadow:
    0 0 0 1px rgba(184, 201, 140, 0.15),
    0 0 18px rgba(184, 201, 140, 0.08);
}

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

button.secondary,
.secondary-link {
  background:
    linear-gradient(180deg, rgba(78, 72, 57, 0.96), rgba(47, 42, 35, 0.96));
  border-color: rgba(136, 123, 88, 0.62);
}

button.danger-button {
  background:
    linear-gradient(180deg, rgba(121, 61, 53, 0.96), rgba(85, 45, 40, 0.98));
  border-color: rgba(166, 92, 82, 0.78);
  color: #fff1ee;
}

.ready-button {
  background:
    linear-gradient(180deg, rgba(138, 153, 97, 0.98), rgba(86, 98, 61, 0.98)) !important;
  border-color: rgba(193, 208, 143, 0.86) !important;
  color: #162012 !important;
  box-shadow:
    0 0 18px rgba(184, 201, 140, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

.ready-button:hover {
  background:
    linear-gradient(180deg, rgba(156, 171, 113, 1), rgba(96, 110, 68, 1)) !important;
}

.status-pill {
  color: #efe8d2;
  border-color: rgba(126, 118, 89, 0.7);
  background: rgba(62, 58, 46, 0.8);
}

.status-pill-good {
  color: #f6f8ea;
  border-color: rgba(184, 201, 140, 0.86);
  background: rgba(104, 114, 75, 0.35);
}

.status-pill-waiting {
  color: #f0e7d1;
  border-color: rgba(171, 147, 98, 0.82);
  background: rgba(112, 92, 54, 0.28);
}

.status-pill-paused {
  color: #f2ead7;
  border-color: rgba(140, 128, 96, 0.84);
  background: rgba(82, 73, 55, 0.3);
}

.status-pill-ended {
  color: #fce8e5;
  border-color: rgba(166, 92, 82, 0.82);
  background: rgba(108, 54, 48, 0.32);
}

input,
select,
textarea {
  color: var(--tc-text);
  background: rgba(19, 22, 18, 0.96);
  border: 1px solid rgba(107, 110, 78, 0.72);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.32);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(184, 201, 140, 0.95);
  box-shadow:
    0 0 0 3px rgba(184, 201, 140, 0.14),
    inset 0 1px 2px rgba(0,0,0,0.32);
}

.readonly-input {
  background: rgba(35, 38, 32, 0.9);
  color: #bbb3a0;
}

.admin-list > *,
.join-player-row {
  background: rgba(43, 49, 39, 0.82);
  border: 1px solid rgba(103, 110, 75, 0.42);
}

.join-player-avatar,
.profile-avatar-preview,
.profile-icon-button {
  border: 1px solid rgba(184, 201, 140, 0.36);
  box-shadow: 0 0 10px rgba(0,0,0,0.22);
}

.profile-icon-button {
  background: linear-gradient(180deg, rgba(62, 69, 53, 0.98), rgba(35, 40, 31, 0.98));
}

.profile-icon-button:hover {
  background: linear-gradient(180deg, rgba(78, 84, 64, 0.98), rgba(42, 48, 36, 0.98));
}

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

.fallback-avatar {
  background: rgba(91, 84, 58, 0.52);
  border: 1px solid rgba(171, 147, 98, 0.6);
}

.join-qr-placeholder {
  background:
    linear-gradient(180deg, rgba(30, 35, 28, 0.96), rgba(17, 20, 16, 0.98));
  border: 1px dashed rgba(149, 136, 97, 0.4);
}

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

#adminMap,
.admin-map,
.map,
.leaflet-container {
  border: 1px solid rgba(106, 114, 80, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(184, 201, 140, 0.08),
    0 10px 24px rgba(0,0,0,0.24);
}

.map-status {
  color: #f0e8d2;
  background: rgba(33, 39, 30, 0.92);
  border: 1px solid rgba(108, 112, 79, 0.58);
}

.map-status.success {
  border-color: rgba(184, 201, 140, 0.7);
  background: rgba(104, 114, 75, 0.24);
}

.map-status.error {
  border-color: rgba(166, 92, 82, 0.78);
  background: rgba(108, 54, 48, 0.24);
}

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

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

a:hover {
  color: #f7efcc;
}

.status.success {
  background: rgba(104, 114, 75, 0.28);
  border: 1px solid rgba(184, 201, 140, 0.68);
  color: #eff4e0;
}

.status.error {
  background: rgba(108, 54, 48, 0.28);
  border: 1px solid rgba(166, 92, 82, 0.7);
  color: #ffedea;
}

.login-card {
  background:
    radial-gradient(circle at top right, rgba(181, 164, 118, 0.10), transparent 24%),
    linear-gradient(180deg, rgba(43, 49, 39, 0.98), rgba(23, 27, 22, 0.98));
}
