/* Clean Inter Minimalist CSS Theme */
:root {
  --pixel-bg: #f5f6fa;
  --pixel-card-bg: #ffffff;
  --pixel-black: #1e272e;
  --pixel-pink: #ff7597;
  --pixel-green: #4cd137;
  --pixel-purple: #9c88ff;
  --pixel-yellow: #fbc531;
  --pixel-blue: #00a8ff;
  --pixel-sky-blue: #90d5ff;
  --pixel-border: 3px solid #1e272e;
  --pixel-shadow: 4px 4px 0px #1e272e;
  --pixel-shadow-lg: 6px 6px 0px #1e272e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  touch-action: manipulation;
  image-rendering: pixelated;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  background-color: var(--pixel-sky-blue);
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.5) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 2px, transparent 2px);
  background-size: 28px 28px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  color: var(--pixel-black);
  overflow-x: hidden;
}

/* Password Gate Overlay */
.password-gate-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 39, 46, 0.95);
  backdrop-filter: blur(12px);
  z-index: 10002;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.password-gate-overlay.active {
  display: flex;
}

.password-gate-card {
  max-width: 400px;
  text-align: center;
  min-height: auto;
  border-radius: 16px;
  box-shadow: 8px 8px 0px rgba(0,0,0,0.5);
  animation: pixelPop 0.25s steps(3, end);
}

.password-gate-sub {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pixel-purple);
  margin-bottom: 10px;
}

.password-error-msg {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ff0055;
  margin-top: 10px;
  min-height: 22px;
}

/* Custom Pixel Alert Overlay (Nebūk DRY!) */
.pixel-alert-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 39, 46, 0.82);
  backdrop-filter: blur(6px);
  z-index: 10001;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.pixel-alert-overlay.active {
  display: flex;
}

.pixel-alert-card {
  max-width: 380px;
  text-align: center;
  min-height: auto;
  border-radius: 16px;
  box-shadow: 8px 8px 0px rgba(0,0,0,0.5);
  animation: pixelPop 0.25s steps(3, end);
}

.pixel-alert-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pixel-black);
  line-height: 1.4;
}

/* Unique 8-Bit Pixel Art Containers */
.pixel-art-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  width: 100%;
}

.pixel-svg-icon {
  width: 100px;
  height: 100px;
  filter: drop-shadow(3px 3px 0px var(--pixel-black));
}

/* 8-Bit Pixel Micro Animations */
.pulse-anim {
  animation: pixelPulse 1.2s steps(2, end) infinite alternate;
}

@keyframes pixelPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

.bounce-anim {
  animation: pixelBounce 1.4s steps(4, end) infinite alternate;
}

@keyframes pixelBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

.float-anim {
  animation: pixelFloatAnim 2s steps(3, end) infinite alternate;
}

@keyframes pixelFloatAnim {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-8px) rotate(6deg); }
}

.spin-anim {
  animation: pixelSpin 3s steps(8, end) infinite;
}

@keyframes pixelSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Permanent Mobile Notice Overlay with Pure 8-Bit Pixel Rainbow Background */
.mobile-notice-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: repeating-linear-gradient(
    135deg,
    #ff0055 0px, #ff0055 24px,
    #ff5000 24px, #ff5000 48px,
    #fbc531 48px, #fbc531 72px,
    #4cd137 72px, #4cd137 96px,
    #00a8ff 96px, #00a8ff 120px,
    #9c88ff 120px, #9c88ff 144px,
    #ff7597 144px, #ff7597 168px
  );
  background-size: 300% 300%;
  animation: movingPixelRainbow 6s steps(12, end) infinite alternate;
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 16px;
  pointer-events: auto;
}

@keyframes movingPixelRainbow {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

.mobile-notice-overlay.active {
  display: flex;
}

.mobile-notice-card {
  max-width: 380px;
  text-align: center;
  min-height: auto;
  border-radius: 16px;
  box-shadow: 8px 8px 0px rgba(0,0,0,0.5);
}

.mobile-notice-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--pixel-black);
  margin-top: 10px;
  line-height: 1.4;
}

/* 8-Bit Pixelated Right-to-Left Rainbow Movie Wipe Overlay */
.rainbow-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  overflow: hidden;
}

.rainbow-overlay.active {
  pointer-events: auto;
  opacity: 1;
}

.rainbow-pixel-bar {
  width: 130vw;
  height: 14.28vh;
  position: absolute;
  right: -130vw;
  box-shadow: 0 4px 0px rgba(0,0,0,0.4);
  border-bottom: 4px solid #1e272e;
}

.rainbow-bar-1 { top: 0vh; background: #ff0055; }
.rainbow-bar-2 { top: 14.28vh; background: #ff5000; }
.rainbow-bar-3 { top: 28.56vh; background: #fbc531; }
.rainbow-bar-4 { top: 42.84vh; background: #4cd137; }
.rainbow-bar-5 { top: 57.12vh; background: #00a8ff; }
.rainbow-bar-6 { top: 71.4vh; background: #9c88ff; }
.rainbow-bar-7 { top: 85.68vh; background: #ff7597; }

/* 8-Bit Pixel Staggered Step Animation Right to Left */
.rainbow-overlay.active .rainbow-pixel-bar {
  animation: stepPixelRainbowRightToLeft 1.1s steps(10, end) forwards;
}

.rainbow-overlay.active .rainbow-bar-1 { animation-delay: 0.00s; }
.rainbow-overlay.active .rainbow-bar-2 { animation-delay: 0.04s; }
.rainbow-overlay.active .rainbow-bar-3 { animation-delay: 0.08s; }
.rainbow-overlay.active .rainbow-bar-4 { animation-delay: 0.12s; }
.rainbow-overlay.active .rainbow-bar-5 { animation-delay: 0.16s; }
.rainbow-overlay.active .rainbow-bar-6 { animation-delay: 0.20s; }
.rainbow-overlay.active .rainbow-bar-7 { animation-delay: 0.24s; }

@keyframes stepPixelRainbowRightToLeft {
  0% {
    right: -130vw;
  }
  50% {
    right: 0vw;
  }
  100% {
    right: 130vw;
  }
}

/* Floating Pixel Items */
.floating-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.pixel-item {
  position: absolute;
  font-size: 1.8rem;
  animation: pixelFloat 3.5s steps(4, end) infinite alternate;
  user-select: none;
}

@keyframes pixelFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(6px); }
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 520px;
  z-index: 10;
}

.app-header {
  text-align: center;
  margin-bottom: 14px;
}

.pixel-title {
  font-family: 'Inter', sans-serif !important;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--pixel-black);
  text-shadow: 2px 2px 0px #ffffff, 4px 4px 0px var(--pixel-pink);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  word-break: break-word;
}

.pixel-subtitle {
  font-family: 'Inter', sans-serif !important;
  font-size: 1.05rem;
  font-weight: 700;
  color: #4a69bd;
  letter-spacing: 0px;
}

/* Pixel Progress Bar */
.pixel-progress-container {
  width: 100%;
  height: 16px;
  background: #ffffff;
  border: var(--pixel-border);
  box-shadow: var(--pixel-shadow);
  margin: 12px 0 6px 0;
  padding: 2px;
  border-radius: 6px;
}

.pixel-progress-bar {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--pixel-pink), var(--pixel-yellow), var(--pixel-green));
  transition: width 0.3s ease;
  border-radius: 4px;
}

.pixel-step-indicator {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--pixel-black);
  margin-top: 4px;
}

/* Main Pixel Card */
.pixel-card {
  background: var(--pixel-card-bg);
  border: var(--pixel-border);
  box-shadow: var(--pixel-shadow-lg);
  padding: 24px 18px;
  position: relative;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
}

/* Step Animations */
.step {
  display: none;
  width: 100%;
}

.step.active {
  display: block;
  animation: pixelPop 0.2s steps(3, end);
}

@keyframes pixelPop {
  0% { transform: scale(0.97); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Question Title */
.question-title {
  font-family: 'Inter', sans-serif !important;
  font-size: 1.35rem;
  text-align: center;
  color: var(--pixel-black);
  margin-bottom: 16px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.pixel-rainbow-text {
  font-family: 'Inter', sans-serif !important;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--pixel-pink);
  text-shadow: 2px 2px 0px var(--pixel-black);
}

/* Multi-Date Calendar Widget */
.calendar-widget {
  background: #ffffff;
  border: var(--pixel-border);
  box-shadow: var(--pixel-shadow);
  border-radius: 12px;
  padding: 12px;
  margin-top: 6px;
  user-select: none;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cal-month-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pixel-black);
}

.cal-nav-btn {
  background: #f1f2f6;
  border: 2px solid #1e272e;
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: 800;
  cursor: pointer;
}

.cal-nav-btn:hover {
  background: var(--pixel-pink);
  color: #fff;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #718093;
  margin-bottom: 8px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  border: 2px solid #dcdde1;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--pixel-black);
}

.cal-day-btn:hover:not(.disabled) {
  border-color: var(--pixel-purple);
  background: #eef2f7;
  transform: scale(1.05);
}

.cal-day-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
  background: #eee;
  border-color: #eee;
}

.cal-day-btn.selected {
  background: var(--pixel-green) !important;
  color: #ffffff !important;
  border: 2px solid #1e272e !important;
  box-shadow: 2px 2px 0px #1e272e;
  font-weight: 800;
  transform: scale(1.05);
}

.selected-dates-badge {
  font-size: 0.95rem;
  font-weight: 700;
  color: #4a69bd;
  margin-top: 8px;
}

/* Structured Button Zone */
.button-zone {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  position: relative;
  min-height: 100px;
  width: 100%;
  padding: 10px 5px;
}

.pixel-btn {
  font-family: 'Inter', sans-serif !important;
  padding: 12px 24px;
  font-size: 1.15rem;
  font-weight: 800;
  border: var(--pixel-border);
  box-shadow: var(--pixel-shadow);
  cursor: pointer;
  background: #ffffff;
  color: var(--pixel-black);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  text-align: center;
  border-radius: 10px;
}

.pixel-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #1e272e;
}

.pixel-btn-yes {
  background: var(--pixel-green);
  color: #ffffff;
  text-shadow: 1px 1px 0px var(--pixel-black);
  z-index: 2;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.pixel-btn-yes:hover {
  background: #44bd32;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0px var(--pixel-black);
}

/* Continuously evasive fluid "NE" button */
.pixel-btn-no {
  background: var(--pixel-pink);
  color: #ffffff;
  text-shadow: 1px 1px 0px var(--pixel-black);
  position: relative;
  z-index: 10;
  transition: left 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), top 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: left, top;
}

.pixel-btn-primary {
  background: var(--pixel-purple);
  color: white;
  text-shadow: 1px 1px 0px var(--pixel-black);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.pixel-btn-primary:hover {
  background: #8c7ae6;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0px var(--pixel-black);
}

.pixel-btn-secondary {
  background: #dcdde1;
  color: var(--pixel-black);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.pixel-btn-secondary:hover {
  background: #c8d6e5;
}

.pixel-btn-submit {
  background: var(--pixel-yellow);
  color: var(--pixel-black);
  font-size: 1.15rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.pixel-btn-submit:hover {
  background: #e1b12c;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0px var(--pixel-black);
}

.pixel-btn-large {
  width: 100%;
  margin-bottom: 12px;
  text-align: center;
}

/* Pixel Checkbox Grid (Step 3) */
.pixel-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
}

.pixel-checkbox-grid::-webkit-scrollbar {
  width: 8px;
}
.pixel-checkbox-grid::-webkit-scrollbar-track {
  background: #f1f2f6;
  border: 2px solid #1e272e;
}
.pixel-checkbox-grid::-webkit-scrollbar-thumb {
  background: var(--pixel-purple);
  border: 2px solid #1e272e;
}

.pixel-checkbox-card {
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 10px 14px;
  border: var(--pixel-border);
  box-shadow: 3px 3px 0px #1e272e;
  cursor: pointer;
  transition: all 0.1s ease;
  user-select: none;
  width: 100%;
  border-radius: 10px;
}

.pixel-checkbox-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px #1e272e;
  background: #f5f6fa;
}

.pixel-checkbox-card input[type="checkbox"] {
  display: none;
}

.pixel-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--pixel-black);
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 4px;
}

.pixel-checkbox-card input[type="checkbox"]:checked + .pixel-box {
  background: var(--pixel-green);
}

.pixel-checkbox-card input[type="checkbox"]:checked + .pixel-box::after {
  content: '✓';
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  text-shadow: 1px 1px 0px #000;
}

.pixel-checkbox-card input[type="checkbox"]:checked ~ .activity-text {
  color: var(--pixel-black);
  font-weight: 800;
}

.activity-text {
  font-family: 'Inter', sans-serif !important;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--pixel-black);
  word-break: break-word;
}

/* Custom Text Inputs */
.custom-input-group, .form-group {
  margin-bottom: 14px;
}

.input-label {
  font-family: 'Inter', sans-serif !important;
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pixel-black);
  margin-bottom: 6px;
}

.pixel-input {
  width: 100%;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif !important;
  font-size: 1rem;
  font-weight: 600;
  border: var(--pixel-border);
  box-shadow: inset 2px 2px 0px rgba(0,0,0,0.1);
  background: #ffffff;
  outline: none;
  border-radius: 8px;
}

.pixel-input:focus {
  background: #fff;
  border-color: var(--pixel-pink);
  box-shadow: 3px 3px 0px var(--pixel-black);
}

.textarea-input {
  resize: vertical;
  min-height: 70px;
}

/* Step Nav Footer */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 10px;
}

/* Success Card Summary */
.success-subtitle {
  font-family: 'Inter', sans-serif !important;
  text-align: center;
  font-size: 1.05rem;
  color: var(--pixel-purple);
  margin-bottom: 16px;
  font-weight: 700;
}

/* Mobile Screen Specific Optimizations */
@media (max-width: 768px) {
  .app-container {
    display: none !important;
  }
  .mobile-notice-overlay {
    display: flex !important;
  }
}
