/* ---------- gobwinify tool page ---------- */

.nav__item--active {
  color: var(--green) !important;
  border-color: var(--green-dd) !important;
  background: rgba(57, 255, 20, 0.08) !important;
  text-shadow: 0 0 6px var(--green) !important;
}

.container--wide { max-width: 1080px; }

/* header */
.g-header {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--border);
}
.g-header__row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.g-header__title {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: var(--green);
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}
.g-header__sub {
  margin: 0;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--pink-2);
  letter-spacing: 0.01em;
}

/* g-card variant */
.g-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 22px;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(57, 255, 20, 0.04), 0 0 24px rgba(57, 255, 20, 0.05);
}
.g-card::before {
  content: "♡";
  position: absolute;
  top: -10px;
  left: 18px;
  background: var(--bg);
  padding: 0 6px;
  color: var(--pink);
  font-size: 14px;
  filter: drop-shadow(0 0 4px var(--pink));
}
.g-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.g-card__title {
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--green);
  letter-spacing: 0.14em;
}
.g-card__hint {
  margin-left: auto;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: var(--pink-2);
  letter-spacing: 0.08em;
}
.dot--pink     { background: var(--pink);     box-shadow: 0 0 8px var(--pink),     0 0 14px var(--pink); }
.dot--candy    { background: var(--candy);    box-shadow: 0 0 8px var(--candy),    0 0 14px var(--candy); }
.dot--lavender { background: var(--lavender); box-shadow: 0 0 8px var(--lavender), 0 0 14px var(--lavender); }

/* drop zone */
.g-drop {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 38px 20px;
  background: rgba(15, 42, 15, 0.3);
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}
.g-drop:hover,
.g-drop:focus-visible {
  border-color: var(--pink);
  background: rgba(255, 141, 199, 0.06);
  outline: none;
  transform: translateY(-1px);
}
.g-drop.is-drag {
  border-color: var(--candy);
  background: rgba(255, 216, 77, 0.08);
  box-shadow: 0 0 30px rgba(255, 216, 77, 0.25);
}
.g-drop.has-image {
  border-style: solid;
  border-color: var(--green-dd);
  background: rgba(57, 255, 20, 0.04);
}
.g-drop__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.g-drop__icon {
  font-size: 34px;
  color: var(--pink);
  filter: drop-shadow(0 0 8px var(--pink));
  margin-bottom: 4px;
  animation: bounce 2.2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.g-drop__main {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--green);
  letter-spacing: 0.02em;
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.4);
}
.g-drop__hint {
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: var(--green-dd);
  letter-spacing: 0.08em;
}
.g-drop__thumb {
  max-width: 140px;
  max-height: 140px;
  border-radius: 12px;
  border: 2px solid var(--pink-d);
  box-shadow: 0 0 20px rgba(255, 141, 199, 0.35);
  margin-bottom: 8px;
}

/* controls grid */
.g-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}
.g-field { display: flex; flex-direction: column; gap: 8px; }
.g-field--full { grid-column: 1 / -1; }

.g-label {
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: var(--green-dd);
  letter-spacing: 0.14em;
}
.g-label span { color: var(--pink-2); }

/* chips */
.g-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.chip {
  padding: 8px 12px;
  background: rgba(15, 42, 15, 0.4);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--green-d);
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 38px;
}
.chip:hover {
  border-color: var(--pink-d);
  color: var(--pink-2);
  transform: translateY(-1px);
}
.chip.is-on {
  background: linear-gradient(180deg, rgba(255, 141, 199, 0.18), rgba(255, 141, 199, 0.06));
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 141, 199, 0.4);
  text-shadow: 0 0 6px rgba(255, 141, 199, 0.7);
}

/* range slider */
.g-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green-dd), var(--pink-d), var(--lavender));
  outline: none;
  cursor: pointer;
}
.g-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid var(--cream);
  box-shadow: 0 0 12px var(--pink), 0 0 22px rgba(255, 141, 199, 0.4);
  cursor: pointer;
  transition: transform 0.15s;
}
.g-range::-webkit-slider-thumb:active { transform: scale(1.15); }
.g-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid var(--cream);
  box-shadow: 0 0 12px var(--pink);
  cursor: pointer;
}

/* inputs */
.g-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(5, 15, 2, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--green);
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  outline: none;
  transition: border 0.18s ease;
  min-height: 44px;
}
.g-input::placeholder { color: var(--green-dd); }
.g-input:focus { border-color: var(--pink); box-shadow: 0 0 12px rgba(255, 141, 199, 0.3); }

/* personalize row */
.g-personalize {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.g-personalize .g-input { flex: 1 1 220px; }
.g-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(15, 42, 15, 0.4);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--green-d);
  cursor: pointer;
  user-select: none;
  min-height: 38px;
  transition: all 0.18s ease;
}
.g-toggle:hover { border-color: var(--pink-d); }
.g-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--pink);
  cursor: pointer;
}
.g-toggle input:checked + span { color: #fff; text-shadow: 0 0 6px var(--pink); }

/* output */
.g-output {
  position: relative;
  background: #020602;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 12px;
  overflow: auto;
  max-height: 70vh;
  min-height: 280px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
}
.g-ascii {
  margin: 0 auto;
  display: inline-block;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 8px;
  line-height: 1.0;
  letter-spacing: 0;
  white-space: pre;
  text-align: left;
  color: var(--green);
  text-shadow: 0 0 4px currentColor, 0 0 8px rgba(57, 255, 20, 0.35);
  transition: color 0.25s ease, font-size 0.15s ease;
}

/* floating cute toast popup */
.g-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translate(-50%, -20px);
  z-index: 900;
  width: min(540px, calc(100% - 24px));
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, rgba(255, 141, 199, 0.18), rgba(197, 163, 255, 0.12));
  border: 1px solid var(--pink);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 141, 199, 0.18),
    0 12px 36px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(255, 141, 199, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: toastIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.g-toast[hidden] { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -30px) scale(0.94); }
  to   { opacity: 1; transform: translate(-50%, 0)     scale(1); }
}
.g-toast__ico {
  font-size: 26px;
  color: var(--pink);
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--pink));
  animation: heartBeat 1.4s ease-in-out infinite;
  line-height: 1;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1);   }
  50%      { transform: scale(1.18); }
}
.g-toast__body { flex: 1; min-width: 0; }
.g-toast__title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  text-shadow: 0 0 8px rgba(255, 141, 199, 0.65);
}
.g-toast__text {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
  color: #f5dfeb;
  letter-spacing: 0.005em;
}
.g-toast__text b {
  color: var(--candy);
  font-weight: 700;
  text-shadow: 0 0 6px rgba(255, 216, 77, 0.5);
}
.g-toast__close {
  background: transparent;
  border: 1px solid rgba(255, 141, 199, 0.3);
  border-radius: 50%;
  color: var(--pink-2);
  width: 28px;
  height: 28px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}
.g-toast__close:hover { color: #fff; border-color: var(--pink); background: rgba(255, 141, 199, 0.1); }

/* control glow pulse — fires once after first image */
.g-controls.is-glow {
  animation: ctrlPulse 1.8s ease-in-out 4;
  border-radius: var(--r-md);
}
@keyframes ctrlPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 141, 199, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 141, 199, 0.18), 0 0 32px rgba(255, 141, 199, 0.25); }
}
.g-range.is-glow,
.chip.is-on.is-glow-target {
  animation: rangePulse 1.4s ease-in-out 4;
}
@keyframes rangePulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50%      { filter: drop-shadow(0 0 12px var(--pink)); }
}

/* slider hint banner (kept as a secondary hint, less attention now) */
.g-hint {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 141, 199, 0.14), rgba(255, 216, 77, 0.08));
  border: 1px solid var(--pink-d);
  border-radius: var(--r-md);
  position: relative;
  animation: hintIn 0.35s ease;
  box-shadow: 0 0 18px rgba(255, 141, 199, 0.18);
}
@keyframes hintIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.g-hint__icon {
  font-size: 22px;
  color: var(--pink);
  filter: drop-shadow(0 0 6px var(--pink));
  flex-shrink: 0;
  animation: bounce 2s ease-in-out infinite;
}
.g-hint__text {
  flex: 1;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.55;
  color: #f0d4e2;
  letter-spacing: 0.01em;
}
.g-hint__text b { color: var(--pink); font-weight: 700; text-shadow: 0 0 6px rgba(255, 141, 199, 0.5); }
.g-hint__text i { color: var(--candy); font-style: normal; font-weight: 600; }
.g-hint__close {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--pink-2);
  width: 28px;
  height: 28px;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}
.g-hint__close:hover { color: #fff; border-color: var(--pink); background: rgba(255, 141, 199, 0.1); }

/* mobile save-to-photos tip */
.g-savetip {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  padding: 12px 18px;
  background: rgba(5, 15, 2, 0.95);
  border: 1px solid var(--pink);
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: 0 0 24px rgba(255, 141, 199, 0.45);
  text-shadow: 0 0 6px rgba(255, 141, 199, 0.5);
  pointer-events: none;
  animation: tipIn 0.3s ease;
  white-space: nowrap;
  max-width: calc(100vw - 24px);
}
.g-savetip b { color: var(--candy); font-weight: 700; }
.g-savetip.is-out { animation: tipOut 0.6s ease forwards; }
@keyframes tipIn  { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes tipOut { to   { opacity: 0; transform: translate(-50%, 14px); } }

/* theme variants on .g-ascii */
.g-ascii.theme-pink {
  color: var(--pink);
  text-shadow: 0 0 4px var(--pink), 0 0 10px rgba(255, 141, 199, 0.5);
}
.g-ascii.theme-lavender {
  color: var(--lavender);
  text-shadow: 0 0 4px var(--lavender), 0 0 10px rgba(197, 163, 255, 0.5);
}
.g-ascii.theme-cream {
  color: var(--cream);
  text-shadow: 0 0 4px var(--cream), 0 0 10px rgba(255, 245, 230, 0.4);
}
.g-ascii.theme-candy {
  background: linear-gradient(90deg, #ff8dc7, #ffd84d, #86e8a6, #c5a3ff, #ff8dc7);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  animation: rainbowShift 6s linear infinite;
  filter: drop-shadow(0 0 8px rgba(255, 141, 199, 0.4));
}
@keyframes rainbowShift {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* actions */
.g-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.btn {
  flex: 1 1 auto;
  min-width: 130px;
  min-height: 46px;
  padding: 12px 18px;
  background: rgba(15, 42, 15, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--green-d);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn:hover:not(:disabled) {
  color: #fff;
  border-color: var(--pink);
  background: rgba(255, 141, 199, 0.1);
  box-shadow: 0 0 14px rgba(255, 141, 199, 0.3);
}
.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.btn--primary {
  background: linear-gradient(180deg, rgba(255, 141, 199, 0.22), rgba(255, 141, 199, 0.08));
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 141, 199, 0.35);
  text-shadow: 0 0 6px rgba(255, 141, 199, 0.7);
}
.btn--alt {
  background: linear-gradient(180deg, rgba(255, 216, 77, 0.18), rgba(255, 216, 77, 0.06));
  border-color: var(--candy);
  color: var(--candy);
  text-shadow: 0 0 6px rgba(255, 216, 77, 0.5);
}
.btn--alt:hover:not(:disabled) { color: #fff; }
.btn--ghost {
  background: transparent;
  flex: 0 0 auto;
  min-width: 100px;
  color: var(--green-dd);
}

/* rain modal */
.rain-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rain-modal[hidden] { display: none; }
.rain-modal canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.rain-modal__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--pink);
  border-radius: var(--r-sm);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  cursor: pointer;
  min-height: 44px;
  text-shadow: 0 0 6px var(--pink);
  box-shadow: 0 0 16px rgba(255, 141, 199, 0.4);
}
.rain-modal__caption {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--pink-2);
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 14px;
  border-radius: 999px;
  text-shadow: 0 0 6px var(--pink);
  pointer-events: none;
}

/* responsive */
@media (max-width: 880px) {
  .g-controls { grid-template-columns: 1fr; gap: 16px; }
  .g-ascii { font-size: 7px; }
  .g-output { max-height: 60vh; }
  .g-header__title { font-size: 14px; }
  .g-header__sub { font-size: 13px; }
  .g-card { padding: 16px 14px; }
  .g-card__hint { margin-left: 0; width: 100%; }
}

@media (max-width: 480px) {
  .main { padding: 18px 12px 60px; }
  .g-drop { padding: 28px 14px; }
  .g-drop__icon { font-size: 28px; }
  .g-drop__main { font-size: 14px; }
  .chip { font-size: 12px; padding: 7px 10px; min-height: 36px; }
  .g-toggle { font-size: 12px; padding: 7px 11px; }
  .btn { min-width: 0; flex: 1 1 calc(50% - 5px); font-size: 13px; padding: 11px 12px; }
  .btn--ghost { flex: 1 1 100%; }
  .g-ascii { font-size: 6px; }
  .g-output { min-height: 220px; }
}
