@import "/theme.css";

:root {
  --green: light-dark(#1e7a52, #5ad69f);
  --kick: light-dark(#5a4a30, #b9a47e);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  overscroll-behavior: none;
  background: var(--peg) radial-gradient(circle, var(--hole) 2.4px, transparent 3px) 16px 16px / 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
}

:focus-visible {
  outline: 3px dashed var(--pen);
  outline-offset: 5px;
}

.app {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: calc(env(safe-area-inset-top, 0px) + 24px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  padding-left: calc(env(safe-area-inset-left, 0px) + 20px);
  padding-right: calc(env(safe-area-inset-right, 0px) + 20px);
}

/* Header bar */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--board);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 3px 3px 0 rgba(21, 23, 28, .18);
  pointer-events: auto;
  transition: background .15s ease, color .15s ease;
}

.back:hover {
  background: var(--ink);
  color: var(--bg);
}

.badge {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--kick);
}

.stamp-secildi {
  display: inline-block;
  padding: 6px 10px;
  border: 2px solid var(--red);
  border-radius: 4px;
  background: var(--board);
  color: var(--red);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .12em;
  transform: rotate(-4deg);
}

/* Titles Area */
.header-titles {
  position: relative;
  z-index: 5;
  pointer-events: none;
  text-align: center;
}

.title-bos {
  margin-top: clamp(32px, 8vh, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.title-bos h1 {
  margin: 0;
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(52px, 16vw, 76px);
  line-height: .85;
  letter-spacing: -.04em;
  transform: rotate(-2deg);
  color: var(--ink);
}

.title-bos h1 span {
  color: var(--pen);
}

.title-bos .desc-text {
  margin: 0;
  max-width: 280px;
  font-size: 19px;
  line-height: 1.45;
  color: var(--body);
}

.title-bekle {
  margin-top: clamp(20px, 4vh, 28px);
}

.lead-bekle {
  margin: 0;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 44px;
  line-height: .9;
  transform: rotate(-2deg);
  color: var(--ink);
}

.desc-bekle {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
}

.title-hazir {
  margin-top: clamp(20px, 4vh, 28px);
  display: flex;
  justify-content: center;
}

.pill-hazir {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--hi);
  border-radius: 6px;
  transform: rotate(2deg);
  font-family: var(--hand);
  font-weight: 700;
  font-size: 38px;
  line-height: 1;
}

/* Interactive touch area */
.touch-surface {
  flex-grow: 1;
  position: relative;
  width: 100%;
  pointer-events: none;
}

/* Hint on empty screen */
.hint-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hint-ring {
  box-sizing: content-box;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 3px dashed var(--ink);
  border-radius: 50%;
}

.hint-dot {
  box-sizing: content-box;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--board);
}

.hint-label {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 76px 0 0 -10px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
  color: var(--pen);
  transform: rotate(-2deg);
  white-space: nowrap;
}

/* Rings Container */
.rings-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}

.ring-point {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.ring-outer {
  box-sizing: content-box;
  position: absolute;
  left: -56px;
  top: -56px;
  width: 106px;
  height: 106px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--pastel);
  box-shadow: 4px 6px 0 rgba(21, 23, 28, .2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-inner {
  box-sizing: content-box;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--vivid);
}

.ring-ripple {
  box-sizing: content-box;
  position: absolute;
  left: -76px;
  top: -76px;
  width: 146px;
  height: 146px;
  border: 3px solid var(--vivid);
  border-radius: 50%;
  animation: ripple 1.8s ease-out infinite;
}

/* Color palettes */
.color-0 {
  --vivid: var(--green);
  --pastel: var(--mint);
}

.color-1 {
  --vivid: var(--red);
  --pastel: var(--pink);
}

.color-2 {
  --vivid: var(--pen);
  --pastel: var(--blue);
}

.color-3 {
  --vivid: var(--hi);
  --pastel: var(--yellow);
}

/* Bottom Area */
.bottom-area {
  position: relative;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bottom-tag {
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--kick);
}

.ticks {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.tick {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  animation: tick .9s ease-in-out infinite;
}

/* Sticky Note in Secildi */
.sticky-note {
  position: relative;
  width: min(300px, 90vw);
  box-sizing: border-box;
  padding: 26px 22px 20px;
  background: #ffe98a;
  color: #15171c;
  box-shadow: 4px 6px 0 rgba(21, 23, 28, .15);
  transform: rotate(-3deg);
  margin: 0 auto;
}

.sticky-tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 96px;
  height: 24px;
  margin-left: -48px;
  background: rgba(35, 72, 214, .28);
  transform: rotate(-4deg);
}

.sticky-kicker {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .14em;
  color: #6b5a1e;
}

.sticky-text {
  margin: 0;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: #15171c;
}

.restart-note {
  margin: 22px 0 0;
  text-align: center;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 22px;
  color: var(--pen);
}

/* Accessibility sr-only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animations */
@keyframes hint {
  0%, 100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(1.08); opacity: .9; }
}

@keyframes ripple {
  0% { transform: scale(.85); opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes shiver {
  0%, 100% { translate: 0 0; }
  25% { translate: -1.5px 1px; }
  50% { translate: 1.5px -1px; }
  75% { translate: -1px -1.5px; }
}

@keyframes tick {
  0%, 100% { opacity: .25; }
  50% { opacity: 1; }
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.9); }
  65% { transform: scale(1.62); }
  100% { transform: scale(1.7); }
}

@keyframes fade {
  to { opacity: .22; transform: scale(.8); }
}

@keyframes land {
  0% { opacity: 0; transform: translateY(16px) rotate(0); }
  100% { opacity: 1; transform: translateY(0) rotate(-3deg); }
}

.hint {
  animation: hint 2.4s ease-in-out infinite;
}

.shiver {
  animation: shiver .12s linear infinite;
}

.breathe {
  animation: breathe .9s ease-in-out infinite;
}

.pop {
  animation: pop .7s cubic-bezier(.3, 1.6, .5, 1) both;
  box-shadow: 3px 4px 0 var(--ink) !important;
}

.fade {
  animation: fade .9s ease-out both;
}

.land {
  animation: land .5s ease-out .35s both;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .hint, .breathe, .shiver, .tick {
    animation: none !important;
  }
  .ring-ripple {
    animation: none !important;
    opacity: .5 !important;
  }
  .pop {
    animation: none !important;
    transform: scale(1.7) !important;
  }
  .fade {
    animation: none !important;
    opacity: .22 !important;
    transform: scale(.8) !important;
  }
  .land {
    animation: none !important;
    transform: translateY(0) rotate(-3deg) !important;
    opacity: 1 !important;
  }
}
