@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Отключаем зум на iOS при двойном тапе */
  touch-action: manipulation;
}

body {
  background: #000;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
}

.app {
  min-height: 100vh;
  height: 100vh;
  padding: 16px 16px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page {
  display: none;
  width: 100%;
  max-width: 420px;
}

.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 120px);
  padding-bottom: 20px;
}

.header {
  text-align: center;
}

.header h1 {
  font-size: 28px;
  font-weight: 800;
}

.header p {
  color: #aaa;
  margin-top: 6px;
}

.card {
  width: 100%;
  background: #111;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  border: 1px solid #222;
}

.card-label {
  color: #888;
  letter-spacing: 0.1em;
  font-size: 12px;
}

.card-value {
  font-size: 48px;
  font-weight: 800;
  color: #2f6bff;
  margin-top: 8px;
}

/* TAP CHARACTER CONTAINER */
.tap-character-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 360px;
}

/* AUTOCLICKER OFFER */
.autoclicker-offer {
  width: 100%;
  max-width: 360px;
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.1) 0%, rgba(80, 136, 255, 0.05) 100%);
  border: 2px solid #2f6bff;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.autoclicker-offer-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.autoclicker-offer-description {
  font-size: 13px;
  color: #aaa;
  line-height: 1.4;
  margin-bottom: 16px;
}

.autoclicker-offer-button {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f6bff 0%, #5088ff 100%);
  color: white;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(47, 107, 255, 0.4);
  transition: all 0.2s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.autoclicker-offer-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(47, 107, 255, 0.3);
}

.autoclicker-offer-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tap-character {
  width: 220px;
  height: auto;
  cursor: pointer;
  transition: transform 0.1s ease;
  filter: drop-shadow(0 8px 32px rgba(47, 107, 255, 0.4));
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  /* Дополнительно отключаем зум на iOS */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tap-character:active {
  transform: scale(0.95);
  filter: drop-shadow(0 4px 16px rgba(47, 107, 255, 0.6));
}

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

.tap-character.bounce {
  animation: bounce 0.4s ease;
}

.tap-text {
  font-size: 18px;
  font-weight: 700;
  color: #2f6bff;
  text-align: center;
  min-height: 28px;
}

.timer-container {
  display: none;
  width: 100%;
  max-width: 360px;
  margin-top: 12px;
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.1) 0%, rgba(80, 136, 255, 0.05) 100%);
  border: 1px solid rgba(47, 107, 255, 0.3);
  border-radius: 16px;
  padding: 12px 20px;
  text-align: center;
}

.timer-container.active {
  display: block;
}

.timer-label {
  font-size: 12px;
  color: #888;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.timer-value {
  font-size: 28px;
  font-weight: 800;
  color: #2f6bff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.claim-button {
  width: 100%;
  max-width: 360px;
  margin-top: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #2f6bff 0%, #5088ff 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(47, 107, 255, 0.4);
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.claim-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(47, 107, 255, 0.3);
}

.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 80px;
  background: #000;
  padding: 16px 0;
  z-index: 100;
}

.nav-btn {
  background: none;
  border: none;
  color: #777;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.nav-btn.active {
  color: #2f6bff;
}

.disclaimer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: #777;
  padding: 8px;
  background: #000;
  border-top: 1px solid #222;
}

.tasks-empty {
  color: #666;
  margin-top: 40px;
}

/* TASK CARD STYLES */
.task-card {
  width: 100%;
  background: #111;
  border: 2px solid #2f6bff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(47, 107, 255, 0.15);
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.task-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.task-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.task-status.incomplete {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
}

.task-status.complete {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

.status-icon {
  font-size: 14px;
}

.task-description {
  color: #aaa;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 16px;
}

.task-action-button {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f6bff 0%, #5088ff 100%);
  color: white;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(47, 107, 255, 0.4);
  transition: all 0.2s;
}

.task-action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.5);
}

.task-action-button:active {
  transform: translateY(0);
}

.task-action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.task-action-button.purchased {
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

/* REFERRAL LINK STYLES */
.referral-link-container {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

.referral-input {
  flex: 1;
  padding: 12px 16px;
  background: #000;
  border: 1px solid #333;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.referral-input:focus {
  border-color: #2f6bff;
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #2f6bff 0%, #5088ff 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.copy-button:active {
  transform: scale(0.98);
}

.copy-button svg {
  width: 18px;
  height: 18px;
}

/* TASK MODAL */
.task-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.task-modal.active {
  display: flex;
}

.task-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.task-modal-content {
  position: relative;
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid #333;
  border-radius: 24px;
  padding: 40px 32px 32px;
  max-width: 400px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.task-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #222;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.task-modal-close:hover {
  background: #333;
}

.task-modal-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 24px;
  border: 3px solid #2f6bff;
  box-shadow: 0 4px 16px rgba(47, 107, 255, 0.3);
}

.task-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.task-modal-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 12px;
}

.task-modal-description {
  font-size: 14px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 24px;
}

.task-modal-reward {
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.15) 0%, rgba(80, 136, 255, 0.1) 100%);
  border: 1px solid rgba(47, 107, 255, 0.3);
  border-radius: 16px;
  padding: 16px 24px;
  margin-bottom: 24px;
  width: 100%;
}

.reward-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.reward-value {
  font-size: 28px;
  font-weight: 800;
  color: #2f6bff;
}

.task-modal-button {
  width: 100%;
  padding: 16px 32px;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.task-modal-button.primary {
  background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
  color: #000;
  box-shadow: 0 4px 16px rgba(0, 255, 0, 0.3);
}

.task-modal-button.primary:active {
  transform: scale(0.98);
}

.task-modal-button.secondary {
  background: #333;
  color: #fff;
  margin-top: 8px;
}

.task-modal-button.secondary:active {
  transform: scale(0.98);
  background: #444;
}
