/* Shared base styles for the app */

:root {
  --color-bg: #f4f7f3;
  --color-surface: #ffffff;
  --color-text: #2c3e2f;
  --color-text-muted: #6b7d6e;
  --color-primary: #5f955f;
  --color-primary-light: #8fbf8a;
  --color-border: #e2e8e0;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 25px;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(150deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  box-shadow: 0 4px 15px rgba(90, 138, 90, 0.3);
}

.btn-secondary {
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px 8px;
  font-size: 34px;
  line-height: 1;
  font-weight: 400;
  color: #4a3b2c;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 200ms ease;
  z-index: 10;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 1000;
}

.modal.modal--open {
  display: flex;
}

@keyframes timeModalIn {
  0% { opacity: 0; transform: scale(0.92) translateY(10px); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.modal__card {
  background: linear-gradient(150deg, rgba(235,250,235,0.05) 0%, rgba(195,225,205,0.03) 30%, rgba(150,195,165,0.04) 65%, rgba(110,160,130,0.06) 100%);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.7);
  border-top-color: rgba(255,255,255,0.9);
  border-radius: 20px;
  padding: 36px 40px;
  width: calc(100% - 48px);
  max-width: 380px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 22px 56px rgba(50,100,75,0.3), 0 1px 0 rgba(255,255,255,0.45), inset 0 4px 6px rgba(255,255,255,0.7), inset 0 -6px 10px rgba(40,80,50,0.22), inset 6px 0 7px rgba(255,255,255,0.3), inset -4px 0 6px rgba(40,80,50,0.1);
}

.modal.modal--open .modal__card {
  opacity: 0;
  animation: timeModalIn 2.8s cubic-bezier(.16,1,.3,1) forwards;
}

.modal__step {
  display: none;
}

.modal__step.modal__step--active {
  display: block;
}

.modal__title {
  font-size: 14px;
  font-weight: 400;
  color: #4d6b52;
  margin: 0 0 20px;
}

.modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 16px;
  color: #2c4a33;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 10px;
  outline: none;
  margin-bottom: 26px;
}

.modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal__actions .btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
}

.modal__actions .btn-secondary {
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.35);
  color: #4d6b52;
}

.modal__actions .btn-primary {
  border: none;
  color: #fff;
  background: linear-gradient(150deg, rgba(143,191,138,0.55) 0%, rgba(95,149,95,0.6) 100%);
  box-shadow: 0 4px 15px rgba(90,138,90,0.25);
}

.modal__select {
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b5a48' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding-right: 40px;
  color: #2c4a33;
  font-family: inherit;
  cursor: pointer;
}

.item-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 26px;
}

.item-picker__tile {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.item-picker__tile:hover {
  transform: translateY(-2px);
}

.item-picker__tile--selected {
  background: transparent;
  border-color: rgba(95,149,95,0.8);
  box-shadow: 0 0 0 2px rgba(143,191,138,0.55), 0 4px 12px rgba(90,138,90,0.25);
}

.item-picker__tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.item-picker__drop {
  width: 58%;
  height: 72%;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  transform: rotate(0deg);
  background: radial-gradient(circle at 35% 62%, rgba(255,255,255,0.95) 0 9%, rgba(255,255,255,0) 18%), radial-gradient(circle at 50% 70%, rgba(150,200,230,0.9), rgba(70,140,200,0.85) 70%, rgba(40,100,170,0.9) 100%);
  clip-path: polygon(50% 0%, 64% 22%, 80% 42%, 92% 62%, 90% 82%, 76% 96%, 50% 100%, 24% 96%, 10% 82%, 8% 62%, 20% 42%, 36% 22%);
  box-shadow: inset -3px -4px 6px rgba(30,80,140,0.35);
}
