@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
  background: #181818;
  color: #e0e0e0;
  font-family: 'Press Start 2P', monospace;
}

.main-title {
  color: #ffd700;
  text-shadow: 2px 2px 0 #000;
}

.card {
  background: #222;
  border: 2px solid #444;
  min-height: 350px;
  box-shadow: 0 2px 8px #000a;
}

.card-text {
  font-size: 0.8rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-description {
  color: #bbb !important;
  font-size: 0.8rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-title {
  color: #ffd700;
  font-size: 1rem;
  text-shadow: 1px 1px 0 #000;
}

/* Clickable title styling */
.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: #ffed4a;
  text-shadow: 2px 2px 0 #000;
}

/* Clickable image hover effect */
.card .position-relative a:hover img,
.card .position-relative a:hover div {
  transform: scale(1.02);
  transition: transform 0.2s ease;
  border-color: #ffd700;
}

.btn-primary {
  background: #3333cc;
  border: none;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
}
.btn-secondary {
  background: #444;
  border: none;
  color: #aaa;
  font-family: 'Press Start 2P', monospace;
}

.form-control {
  background: #222;
  color: #ffd700;
  border: 2px solid #333;
  font-family: 'Press Start 2P', monospace;
}

.form-control::placeholder {
  color: #888;
  opacity: 1;
}

.card-img-top {
  object-fit: cover;
  height: 180px;
  background: #111;
  border-bottom: 2px solid #444;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  width: 100%;
}

/* Only apply dot matrix to actual images when toggle is enabled */
body.dot-matrix-enabled .card-img-top[src]:not([src=""]) {
  -webkit-mask-image: url('https://raw.githubusercontent.com/tronbyt/server/refs/heads/main/tronbyt_server/static/images/dots.svg');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  mask-image: url('https://raw.githubusercontent.com/tronbyt/server/refs/heads/main/tronbyt_server/static/images/dots.svg');
  mask-repeat: no-repeat;
  mask-size: cover;
  width: 100%;
}

#app-content img {
  max-width: 100%;
  height: 200px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  border: 2px solid #333;
  background: #111;
}

/* Only apply dot matrix to images when toggle is enabled */
body.dot-matrix-enabled #app-content img {
  -webkit-mask-image: url('https://raw.githubusercontent.com/tronbyt/server/refs/heads/main/tronbyt_server/static/images/dots.svg');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  mask-image: url('https://raw.githubusercontent.com/tronbyt/server/refs/heads/main/tronbyt_server/static/images/dots.svg');
  mask-repeat: no-repeat;
  mask-size: cover;
}

#app-content {
  background: #222;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px #000a;
}

.broken-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 193, 7, 0.9);
  color: #000;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  z-index: 10;
}

.btn-warning {
  background: #ffc107;
  border: none;
  color: #000;
  font-family: 'Press Start 2P', monospace;
}

.btn-warning:hover {
  background: #e0a800;
}

.legend {
  border: 2px solid #444;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-icon {
  font-size: 1.2rem;
}

.tooltip-custom {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
}

.report-button {
  font-family: 'Press Start 2P', monospace;
}

.form-check-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  color: #e0e0e0;
}

.form-check-input {
  background-color: #222;
  border: 2px solid #444;
}

.form-check-input:checked {
  background-color: #ffd700;
  border-color: #ffd700;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.25);
}
