/* Algoritma problem kartları — algorithm-problems.html vb. */
/* Byteomi içerik teması ile uyumlu: cam kart, seviye rozeti, okunabilir gövde */

.problem-box {
  margin: 2rem 0;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(2, 6, 23, 0.94) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.problem-box:hover {
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 22px 56px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.problem-box::before {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.85), rgba(99, 102, 241, 0.75), rgba(168, 85, 247, 0.65));
  opacity: 0.95;
}

.problem-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1.1rem 1.35rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.45) 0%, transparent 100%);
}

.problem-level {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.problem-level.easy {
  color: rgba(167, 243, 208, 0.98);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(5, 150, 105, 0.2));
  border-color: rgba(52, 211, 153, 0.35);
}

.problem-level.medium {
  color: rgba(254, 243, 199, 0.98);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32), rgba(217, 119, 6, 0.22));
  border-color: rgba(251, 191, 36, 0.4);
}

.problem-level.hard {
  color: rgba(254, 226, 226, 0.98);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(185, 28, 28, 0.22));
  border-color: rgba(248, 113, 113, 0.4);
}

.problem-title {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: rgba(248, 250, 252, 0.96);
}

.problem-description {
  padding: 1.15rem 1.35rem 1.35rem;
}

.problem-description p {
  margin: 0 0 0.95rem;
  font-size: 0.98rem;
  line-height: 1.72;
  color: rgba(226, 232, 240, 0.9);
}

.problem-description p:last-child {
  margin-bottom: 0;
}

.problem-description strong {
  color: rgba(253, 224, 71, 0.95);
  font-weight: 650;
}

@media (max-width: 640px) {
  .problem-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .problem-title {
    font-size: 1.05rem;
  }

  .problem-description {
    padding: 1rem 1.1rem 1.2rem;
  }
}