.hog-app {
  max-width: 1180px;
  margin: 20px auto;
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(14, 165, 233, 0.16), transparent 34%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.3);
  font-family: Arial, sans-serif;
}

.hog-game-shell {
  background: transparent;
}

.hog-stage-layout {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.86) 100%),
    #0f172a;
}

.hog-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  justify-content: space-between;
  color: #fff;
}

.hog-hud-left,
.hog-hud-right {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.hog-hud-top {
  margin-bottom: 14px;
}

.hog-stat-pill {
  min-width: 118px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hog-stat-pill-time {
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.hog-stat-label {
  display: block;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hog-stat-value {
  display: block;
  color: #f8fafc;
  font-size: 22px;
  line-height: 1;
}

.hog-control-group {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.hog-btn {
  border: 0;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.hog-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.hog-btn.is-on {
  background: linear-gradient(135deg, #0891b2 0%, #22c55e 100%);
}

.hog-btn.is-on:hover {
  filter: brightness(1.05);
}

.hog-btn.is-off {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
}

.hog-btn.is-off:hover {
  filter: brightness(1.05);
}

.hog-btn-control {
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  font-size: 22px;
}

.hog-btn-sound {
  min-height: 60px;
}

.hog-status {
  font-weight: 700;
}

.hog-stage-frame {
  position: relative;
  padding: 14px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.65) 0%, rgba(2, 6, 23, 0.72) 100%),
    #020617;
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 44px rgba(2, 6, 23, 0.3);
}

.hog-hud-target-hints {
  align-items: flex-start;
  margin-top: 16px;
  padding: 18px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.94) 0%, rgba(15, 23, 42, 0.96) 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hog-tray-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.hog-tray-kicker {
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hog-tray-title {
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.2;
}

.hog-target-hints-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-left: auto;
  flex: 1;
}

.hog-target-hint-item {
  width: 110px;
  min-height: 126px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.88) 0%, rgba(15, 23, 42, 0.96) 100%);
  display: inline-flex;
  flex-direction: column;
  padding: 10px;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hog-target-hint-item.is-found {
  opacity: 0.55;
  transform: scale(0.98);
}

.hog-target-hint-thumb-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hog-target-hint-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hog-target-hint-fallback {
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.hog-target-hint-label {
  display: block;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.hog-stage {
  width: 100%;
  height: 580px;
  border-radius: 18px;
  overflow: hidden;
}

.hog-preview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hog-screen-bg {
  position: relative;
  height: 580px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hog-screen-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.34) 0%, rgba(2, 6, 23, 0.74) 100%),
    rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hog-preview-inner {
  width: min(560px, calc(100% - 32px));
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.92) 100%);
  color: #fff;
  padding: 32px 28px;
  border-radius: 28px;
  text-align: center;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(125, 211, 252, 0.22);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
}

.hog-preview-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hog-preview-title {
  margin: 0;
  color: #f8fafc !important;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 10px 30px rgba(2, 6, 23, 0.55), 0 0 18px rgba(125, 211, 252, 0.12);
}

.hog-preview-subtitle {
  max-width: 42ch;
  margin: 16px auto 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.6;
}

.hog-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 22px 0 16px;
}

.hog-preview-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #f8fafc;
  font-weight: 700;
}

.hog-preview-status {
  margin: 0 auto;
  max-width: 36ch;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

.hog-preview-status.is-ready {
  background: rgba(8, 145, 178, 0.16);
  color: #bae6fd;
}

.hog-btn-big {
  padding: 12px 18px;
  font-size: 16px;
}

.hog-play-icon-btn {
  border: 0;
  color: #fff;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.hog-preview-cta {
  margin-top: 20px;
  min-width: 250px;
  padding: 14px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3) !important;
  text-decoration: none !important;
  appearance: none;
  -webkit-appearance: none;
}

.hog-play-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.hog-play-copy {
  color: inherit !important;
  font-size: 18px;
  font-weight: 700;
}

.hog-final-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hog-final-card {
  position: relative;
  width: min(420px, calc(100% - 32px));
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(17, 24, 39, 0.98) 100%);
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(125, 211, 252, 0.08) inset;
  text-align: center;
  z-index: 1;
}

.hog-final-card-glow {
  position: absolute;
  inset: -30% 18% auto;
  height: 180px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.34) 0%, rgba(34, 211, 238, 0) 72%);
  pointer-events: none;
}

.hog-final-card-inner {
  position: relative;
  z-index: 1;
  padding: 28px 24px 24px;
}

.hog-final-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(8, 47, 73, 0.55);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hog-final-title {
  margin: 0;
  color: #f8fafc !important;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.2);
}

.hog-final-score-wrap {
  margin: 20px auto 14px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.96) 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.hog-final-score-label {
  display: block;
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hog-final-score-value {
  display: block;
  color: #facc15;
  font-size: clamp(40px, 8vw, 56px);
  line-height: 1;
  text-shadow: 0 0 18px rgba(250, 204, 21, 0.28);
}

.hog-final-summary {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.5;
}

.hog-final-promo {
  margin: 0 0 22px;
  color: #f8fafc;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  text-wrap: balance;
}

.hog-final-promo-question,
.hog-final-promo-body {
  display: block;
}

.hog-final-promo-question {
  margin-bottom: 4px;
}

.hog-final-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hog-final-cta {
  min-width: 220px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hog-final-cta-secondary {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.3) !important;
}

.hog-final-cta:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%);
}

.hog-final-cta-secondary:hover {
  background: linear-gradient(135deg, #334155 0%, #475569 100%) !important;
}

.hog-final-cta:focus-visible {
  outline: 2px solid #f8fafc;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .hog-app {
    margin: 12px auto;
    border-radius: 22px;
  }

  .hog-stage-layout {
    padding: 12px;
  }

  .hog-screen-bg,
  .hog-stage {
    height: 460px;
  }

  .hog-preview-inner {
    width: min(100%, calc(100% - 20px));
    padding: 20px 16px;
    border-radius: 22px;
  }

  .hog-preview-title {
    font-size: clamp(20px, 8vw, 32px);
    line-height: 1.02;
  }

  .hog-preview-subtitle {
    max-width: 26ch;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.45;
  }

  .hog-preview-meta {
    margin: 18px 0 14px;
    gap: 8px;
  }

  .hog-preview-chip {
    padding: 8px 12px;
    font-size: 14px;
  }

  .hog-preview-status {
    padding: 10px 12px;
    font-size: 14px;
  }

  .hog-preview-cta {
    width: 100%;
    min-width: 0;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
  }

  .hog-play-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .hog-play-copy {
    font-size: 16px;
  }

  .hog-hud-left,
  .hog-hud-right,
  .hog-target-hints-strip {
    width: 100%;
  }

  .hog-stat-pill,
  .hog-btn-sound {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .hog-control-group {
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .hog-stage-frame {
    padding: 10px;
    border-radius: 22px;
  }

  .hog-hud-target-hints {
    padding: 14px;
    border-radius: 22px;
  }

  .hog-tray-copy {
    min-width: 0;
    width: 100%;
  }

  .hog-target-hint-item {
    width: calc(25% - 9px);
    min-width: 0;
    min-height: auto;
    border-radius: 16px;
    padding: 6px;
    gap: 6px;
  }

  .hog-target-hint-thumb-wrap {
    border-radius: 12px;
  }

  .hog-target-hint-label {
    font-size: 11px;
    line-height: 1.2;
  }

  .hog-final-card-inner {
    padding: 24px 18px 20px;
  }

  .hog-final-promo {
    font-size: 18px;
    line-height: 1.4;
  }

  .hog-final-score-wrap {
    padding: 14px;
  }

  .hog-final-actions {
    flex-direction: column;
  }

  .hog-final-cta {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .hog-screen-bg,
  .hog-stage {
    height: 462px;
  }

  .hog-stat-pill,
  .hog-btn-sound,
  .hog-target-hint-item {
    width: 100%;
  }

  .hog-target-hints-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .hog-target-hint-item {
    width: auto;
  }

  .hog-preview-inner {
    padding: 18px 14px;
  }

  .hog-preview-title {
    font-size: 18px;
  }

  .hog-preview-subtitle {
    font-size: 13px;
  }

  .hog-final-promo {
    font-size: 17px;
  }
}
