/* Calm unmarked tiles, consistent marked tiles across text, media, and free cells. */
:root {
  --dauber-dab-image: none;
  --card-border: 1px;
  --card-padding: 3px;
  --card-gap: 2px;
}

#game-ui h1 {
  font-style: italic;
  font-size: clamp(2.2rem, 11vw, 4.1rem);
  letter-spacing: 0;
  color: #61f6ff;
  text-shadow:
    0 0 7px rgba(97, 246, 255, 0.95),
    0 0 22px rgba(0, 229, 255, 0.58);
}

#game-ui h1 .bingo-title-accent {
  color: #ff63d4;
  text-shadow:
    0 0 7px rgba(255, 99, 212, 0.95),
    0 0 22px rgba(255, 45, 120, 0.62);
}

.info-box {
  border-width: 1px;
  border-color: rgba(97, 246, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(5, 13, 29, 0.78), rgba(0, 0, 0, 0.62)),
    rgba(0, 0, 0, 0.58);
  box-shadow:
    0 0 0 1px rgba(97, 246, 255, 0.12),
    0 0 18px rgba(0, 229, 255, 0.24);
}

.bingo-card {
  border-width: 1px;
  border-color: rgba(0, 255, 255, 0.72);
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, 0.08),
    0 0 16px rgba(0, 229, 255, 0.18);
}

.bingo-letter {
  color: rgba(119, 248, 255, 0.92);
  text-shadow:
    0 0 6px rgba(119, 248, 255, 0.9),
    0 0 16px rgba(0, 229, 255, 0.55);
}

.bingo-tile {
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.bingo-tile:not(.selected),
.bingo-tile.media-tile:not(.selected),
.bingo-tile.free:not(.selected),
.bingo-tile.called:not(.selected) {
  border-color: rgba(255, 255, 255, 0.12);
  border-width: 1px;
  box-shadow: none;
}

.bingo-tile,
.bingo-tile.media-tile {
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--tile-bg);
}

.bingo-tile .tile-label {
  width: 100%;
  margin-top: auto;
  padding: 6px 4px 5px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 1);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.72));
}

.bingo-tile.media-tile .tile-label {
  width: 100%;
  padding: 6px 4px 5px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.82));
}

.bingo-tile.media-tile:not(.selected)::before,
.bingo-tile.media-tile:not(.selected)::after,
.bingo-tile:not(.selected)::before,
.bingo-tile:not(.selected)::after {
  content: none;
}

.bingo-tile.selected,
.bingo-tile.media-tile.selected,
.bingo-tile.free.selected {
  color: var(--tile-text);
  background-color: var(--tile-bg);
  border: 2px solid var(--dauber-color) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 14px var(--dauber-color);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 14px color-mix(in srgb, var(--dauber-color) 62%, transparent);
  overflow: hidden;
}

.bingo-tile.free.selected {
  background-color: var(--tile-free-bg);
  color: var(--tile-free-text);
}

.bingo-tile.free,
.bingo-tile.free.selected {
  align-items: center;
  isolation: isolate;
  background:
    radial-gradient(circle at center, rgba(255, 45, 120, 0.24), transparent 44%),
    radial-gradient(circle at center, rgba(0, 229, 255, 0.2), transparent 58%),
    rgba(5, 5, 18, 0.95);
  color: #fff;
  border-color: rgba(255, 99, 212, 0.7) !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 229, 255, 0.45),
    0 0 16px rgba(255, 45, 120, 0.28);
}

.bingo-tile.free::before {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.85);
  box-shadow:
    0 0 0 3px rgba(255, 45, 120, 0.22),
    0 0 18px rgba(0, 229, 255, 0.62),
    inset 0 0 16px rgba(255, 45, 120, 0.36);
  z-index: 1;
}

.bingo-tile.free .tile-label,
.bingo-tile.free.selected .tile-label {
  width: auto;
  margin: 0;
  padding: 0 4px;
  font-size: clamp(0.82rem, 4cqi, 1.15rem);
  letter-spacing: 0.08em;
  color: #ffeaff;
  background: transparent;
  text-shadow:
    0 0 6px rgba(255, 99, 212, 0.9),
    0 0 14px rgba(0, 229, 255, 0.75);
  z-index: 3;
}

.bingo-tile.free.selected::before {
  content: "";
  position: absolute;
  inset: auto;
  top: 6px;
  right: 6px;
  left: auto;
  width: 22%;
  height: 22%;
  min-width: 18px;
  min-height: 18px;
  max-width: 34px;
  max-height: 34px;
  transform: rotate(-10deg);
  border-radius: 58% 42% 54% 46%;
  border: 0;
  background-color: var(--dauber-color);
  background-image: var(--dauber-dab-image);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.96;
  z-index: 4;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88), 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.bingo-tile.selected::after,
.bingo-tile.media-tile.selected::after,
.bingo-tile.free.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dauber-color);
  opacity: 0.18;
  z-index: 1;
  pointer-events: none;
}

.bingo-tile.selected:not(.free)::before,
.bingo-tile.media-tile.selected::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  left: auto;
  width: 22%;
  height: 22%;
  min-width: 18px;
  min-height: 18px;
  max-width: 34px;
  max-height: 34px;
  transform: rotate(-10deg);
  border-radius: 58% 42% 54% 46%;
  background-color: var(--dauber-color);
  background-image: var(--dauber-dab-image);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.96;
  z-index: 4;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88), 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.bingo-tile.selected .tile-label,
.bingo-tile.media-tile.selected .tile-label {
  position: relative;
  z-index: 5;
}

.bingo-tile.media-tile.selected .tile-label {
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.72));
}

.bingo-tile.media-tile.selected .tile-media {
  z-index: 0;
}
