/* ---------- Zip Oyun Ekranı ---------- */
.zip-game-screen {
  padding: 8px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
}

.zip-topbar {
  display: grid;
  grid-template-columns: 44px 1fr 96px;
  align-items: center;
  padding: 8px 0 4px;
}

.zip-topbar-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-ui);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.zip-title-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--card-bg);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.zip-topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.zip-meta-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 18px 2px 22px;
}

.zip-timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 24px;
  font-weight: 750;
  color: var(--ink);
}

.zip-difficulty {
  justify-self: start;
  background: var(--line-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 20px;
  font-weight: 500;
}

.zip-reset-btn {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  min-width: 110px;
  min-height: 48px;
  border-radius: 999px;
  border: 2px solid var(--btn-border);
  background: transparent;
  color: var(--btn-ink);
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  padding: 8px 22px;
}

.zip-reset-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--line-2);
  border-color: transparent;
}

.zip-grid-wrap {
  background: transparent;
  border: none;
  padding: 0;
}

.zip-grid {
  --zip-wall-size: clamp(4px, 0.9vw, 8px);
  position: relative;
  display: grid;
  width: 100%;
  overflow: hidden;
  border: 2px solid var(--zip-grid-line-color, var(--line));
  border-radius: 26px;
  background: var(--zip-grid-bg, var(--app-bg));
  user-select: none;
  touch-action: none;
}

.zip-grid-cell {
  border-right: 2px solid var(--zip-grid-line-color, var(--line));
  border-bottom: 2px solid var(--zip-grid-line-color, var(--line));
  pointer-events: none;
  z-index: 0;
}

.zip-path-fill-cell,
.zip-hint-cell {
  pointer-events: none;
  z-index: 1;
}

.zip-path-fill-cell {
  background:
    color-mix(
      in srgb,
      var(--zip-path-fill, var(--zip-puzzle-path-fill, #b7cbf4)) 58%,
      transparent
    );
}

.zip-hint-cell {
  margin: 6%;
  border-radius: 12px;
  background:
    color-mix(
      in srgb,
      var(--zip-path-primary, var(--zip-puzzle-path-primary, #1550d4)) 22%,
      transparent
    );
  outline: 3px solid var(--zip-path-primary, var(--zip-puzzle-path-primary, #1550d4));
  animation: zipHintPulse 0.9s ease-in-out infinite;
}

.zip-path-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.zip-path-stroke {
  fill: none;
  stroke-width: 0.42;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zip-number-dot {
  align-self: center;
  justify-self: center;
  z-index: 7;
  width: min(58%, 54px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--zip-dot-bg, #000);
  color: var(--zip-dot-ink, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(19px, 5.4vw, 39px);
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
  pointer-events: none;
}

.zip-wall-segment {
  position: absolute;
  z-index: 6;
  background: var(--zip-wall-bg, #050505);
  border-radius: 999px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--zip-wall-bg, #050505) 35%, transparent);
  pointer-events: none;
}

.zip-wall-horizontal,
.zip-wall-vertical {
  border-radius: 999px;
}

.zip-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.zip-control-btn {
  min-height: 54px;
  border-radius: 999px;
  border: 2px solid var(--btn-border);
  background: transparent;
  color: var(--btn-ink);
  font-size: 20px;
  font-weight: 700;
  font-family: inherit;
  box-shadow: none;
}

.zip-control-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--line-2);
  border-color: transparent;
}

.zip-error-message,
.zip-hint-panel,
.zip-help-panel {
  background: var(--zip-panel-bg, var(--card-bg));
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
}

.zip-error-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-color: #ff1f2d;
  background: #fff1f2;
  color: #2b1a1d;
  padding: 18px 20px;
  font-size: 19px;
  line-height: 1.35;
}

.zip-error-message button {
  border: none;
  background: transparent;
  color: currentColor;
  font-size: 26px;
  line-height: 1;
  padding: 0;
}

.zip-hint-panel {
  padding: 20px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
}

.zip-help-panel {
  overflow: hidden;
}

.zip-help-header {
  width: 100%;
  min-height: 72px;
  border: none;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  font-size: 22px;
  font-weight: 750;
  text-align: left;
}

.zip-help-header svg {
  flex: 0 0 auto;
  transition: transform 0.16s ease;
}

.zip-help-header svg:not(.is-open) {
  transform: rotate(180deg);
}

.zip-help-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 18px 26px 30px;
}

.zip-help-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: var(--ink);
  font-size: 21px;
  font-weight: 750;
  line-height: 1.13;
}

.zip-help-icon {
  display: block;
  height: auto;
}

.zip-help-icon-order {
  width: 100%;
  max-width: 124px;
  height: 36px;
}

.zip-help-icon-fill {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}

.zip-results-btn {
  width: 100%;
  min-height: 72px;
  margin-top: 14px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--card-bg);
  font-family: inherit;
  font-size: 24px;
  font-weight: 750;
}

@keyframes zipHintPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(0.9); }
}

.viewport-desktop .zip-game-screen {
  padding: 0;
}

.viewport-desktop .zip-topbar {
  display: none;
}

.viewport-desktop .zip-meta-row {
  border-bottom: 1px solid var(--line-2);
  padding: 0 0 16px;
  margin-bottom: 14px;
}

.viewport-desktop .zip-timer {
  font-size: 20px;
}

.viewport-desktop .zip-difficulty {
  font-size: 14px;
  padding: 7px 13px;
}

.viewport-desktop .zip-reset-btn {
  min-height: 42px;
  min-width: 92px;
  font-size: 15px;
  border-width: 1px;
}

.viewport-desktop .zip-grid {
  border-radius: 24px;
}

.viewport-desktop .zip-control-btn {
  min-height: 48px;
  font-size: 16px;
  border-width: 1px;
}

.viewport-desktop .zip-hint-panel {
  font-size: 16px;
  padding: 16px 18px;
}

.viewport-desktop .zip-help-header {
  min-height: 58px;
  font-size: 18px;
  padding: 14px 22px;
}

.viewport-desktop .zip-help-content {
  padding: 14px 22px 24px;
}

.viewport-desktop .zip-help-item {
  font-size: 17px;
}

@media (max-width: 599px) {
  .zip-game-screen {
    padding: 12px 16px 60px;
    gap: 12px;
  }

  .zip-topbar {
    grid-template-columns: 42px 1fr 90px;
  }

  .zip-topbar-title {
    font-size: 26px;
  }

  .zip-meta-row {
    padding: 14px 2px 18px;
  }

  .zip-timer {
    font-size: 22px;
  }

  .zip-difficulty {
    font-size: 16px;
    padding: 8px 14px;
  }

  .zip-reset-btn,
  .zip-control-btn {
    font-size: 18px;
  }

  .zip-hint-panel,
  .zip-error-message {
    font-size: 17px;
  }

  .zip-help-header {
    font-size: 20px;
    padding: 16px 22px;
  }

  .zip-help-content {
    gap: 14px;
    padding: 14px 18px 26px;
  }

  .zip-help-item {
    font-size: 18px;
  }
}

@media (max-width: 360px) {
  .zip-grid {
    border-radius: 20px;
  }

  .zip-help-content {
    gap: 10px;
  }

  .zip-help-item {
    font-size: 16px;
  }

  .zip-help-fill-icon {
    width: 62px;
    height: 62px;
  }
}
