@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700&display=swap');

:root {
  /* Colors */
  --bg-blue-top: #0077c8;
  --bg-blue-mid: #005a9c;
  --bg-blue-dark: #003666;

  --paper-white: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;

  /* Sticky colors */
  --sticky-yellow: #fef08a;
  --sticky-mint: #a7f3d0;
  --sticky-peach: #fed7aa;
  --sticky-blue: #bae6fd;
  --sticky-lavender: #e9d5ff;

  --font-bold: 'Archivo Black', -apple-system, sans-serif;
  --font-ui: 'Outfit', sans-serif;
  --font-note: 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  width: 100vw;
  font-family: var(--font-ui);
  background: 
    radial-gradient(circle at 50% 10%, rgba(56, 189, 248, 0.25) 0%, transparent 60%),
    linear-gradient(175deg, var(--bg-blue-top) 0%, var(--bg-blue-mid) 45%, var(--bg-blue-dark) 100%);
  background-attachment: fixed;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem 3rem 1rem;
}

/* Halftone print lines overlay */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.035) 0px,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 1;
}

.mobile-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

/* Top Branding */
.mobile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.25rem;
}

.mobile-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.mobile-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Question Banner Card */
.question-banner {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 
    0 0 0 4px rgba(255, 255, 255, 0.6),
    0 10px 25px -5px rgba(0, 16, 40, 0.3);
  text-align: center;
  transform: rotate(-0.5deg);
}

.question-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.active-question {
  font-family: var(--font-bold);
  font-size: 1.45rem;
  line-height: 1.2;
  color: #09090b;
  letter-spacing: -0.5px;
}

/* The Interactive Sticky Form Card */
.sticky-form-card {
  position: relative;
  background-color: var(--sticky-yellow);
  border-radius: 12px;
  padding: 1.4rem 1.25rem 1.5rem 1.25rem;
  box-shadow: 
    0 15px 35px -5px rgba(0, 0, 0, 0.28),
    0 4px 12px rgba(0, 0, 0, 0.12);
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

/* Tape at top of sticky note */
.sticky-form-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-left: 2px dashed rgba(0, 0, 0, 0.1);
  border-right: 2px dashed rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

/* Color Palette Selector */
.color-picker-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.45rem;
}

.color-palette {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.color-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.color-dot.active {
  transform: scale(1.18);
  border: 2px solid #000000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.color-dot.active::after {
  content: "✓";
  font-size: 0.9rem;
  font-weight: 800;
  color: #000000;
}

.color-dot[data-color="yellow"] { background: var(--sticky-yellow); }
.color-dot[data-color="mint"] { background: var(--sticky-mint); }
.color-dot[data-color="peach"] { background: var(--sticky-peach); }
.color-dot[data-color="blue"] { background: var(--sticky-blue); }
.color-dot[data-color="lavender"] { background: var(--sticky-lavender); }

/* Text Area */
.note-textarea {
  width: 100%;
  min-height: 140px;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-note);
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 600;
  color: #18181b;
  resize: none;
  padding: 0.2rem;
}

.note-textarea::placeholder {
  color: rgba(0, 0, 0, 0.35);
  font-weight: 500;
}

/* Character Counter & Clear */
.textarea-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 1.1rem;
}

.char-count.warning {
  color: #ea580c;
  font-weight: 700;
}

/* Reactions Bar */
.reaction-section {
  margin-bottom: 1.25rem;
}

.reaction-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.45rem;
}

.reactions-list {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.reaction-chip {
  flex: 1;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.6);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reaction-chip:active {
  transform: scale(0.92);
}

.reaction-chip.active {
  background: #ffffff;
  border: 2px solid #000000;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Big Sticky Submit Button */
.btn-submit-note {
  width: 100%;
  background: #09090b;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 1.05rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-submit-note:active {
  transform: scale(0.97);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-submit-note:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Privacy Notice */
.privacy-badge {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
}

/* Success Card View */
.success-card {
  display: none;
  background: #ffffff;
  border-radius: 16px;
  padding: 2.5rem 1.8rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-card.visible {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon {
  font-size: 3.5rem;
  margin-bottom: 0.8rem;
  animation: gentleBounce 2s infinite;
}

.success-title {
  font-family: var(--font-bold);
  font-size: 1.6rem;
  color: #0f172a;
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.success-text {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.8rem;
}

.btn-new-note {
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 0.9rem 1.8rem;
  border-radius: 40px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-new-note:active {
  transform: scale(0.96);
}

/* Confetti Canvas */
#confettiCanvas {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 999;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
