/* ===== Software Grid, Cards & Program Modal ===== */

.software-section .headline {
  margin-bottom: 8px;
}

.software-section .lead {
  margin-bottom: 20px;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.software-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 12px 12px;
  padding: 0;
  text-align: left;
  transition: border-color 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.software-card::before {
  display: none;
}

.software-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.software-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.3);
  display: block;
}

.software-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.software-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.software-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 5px;
  flex-shrink: 0;
}

.software-card-tag.game {
  background: rgba(255, 107, 107, 0.12);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.software-card-tag.tool {
  background: rgba(110, 231, 183, 0.1);
  color: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.2);
}

.software-card-tag.media {
  background: rgba(124, 108, 255, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(124, 108, 255, 0.2);
}

.software-card-tag.dev {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.software-card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f0f4f8;
}

.software-card p {
  margin: 0;
  font-size: 13px;
  color: #99aab8;
  line-height: 1.5;
}

/* "More programs" card */
.more-programs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  background: rgba(124, 108, 255, 0.06);
  border-color: rgba(124, 108, 255, 0.15);
  text-align: center;
  min-height: 200px;
}

.more-programs-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  color: #07101a;
  background: var(--accent);
}

/* Program modal */
.program-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  padding: 16px;
}

.program-modal-overlay.show {
  display: flex;
}

.program-modal {
  width: min(680px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0;
  position: relative;
}

.program-modal-content {
  display: flex;
  flex-direction: column;
}

/* Modal close button */
.program-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: #8896a4;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.program-modal-close:hover {
  background: rgba(255, 80, 80, 0.15);
  color: #ff6b6b;
}

/* Modal hero image */
.program-modal-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #060a10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.program-modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Modal body content */
.program-modal-body-inner {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.program-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.program-modal-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #f3f7fb;
}

.program-modal-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 6px;
  flex-shrink: 0;
}

.program-modal-tag.game {
  background: rgba(255, 107, 107, 0.12);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.program-modal-tag.tool {
  background: rgba(110, 231, 183, 0.1);
  color: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.2);
}

.program-modal-tag.media {
  background: rgba(124, 108, 255, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(124, 108, 255, 0.2);
}

.program-modal-tag.dev {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.program-modal-subtitle {
  color: var(--muted);
  font-size: 14px;
}

.program-modal-text {
  margin: 0;
  color: #b0bec9;
  line-height: 1.65;
  font-size: 14px;
  overflow-wrap: break-word;
}

.program-modal-actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}

.program-source-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 180px;
  text-align: center;
}

.program-source-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Mini program grid (in "more programs" modal) */
.mini-program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.mini-program-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease;
}

.mini-program-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.mini-program-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--accent);
}

.mini-program-card p {
  margin: 0;
  font-size: 13px;
  color: #c0ced8;
  line-height: 1.45;
}
