.material-icons {
  font-size: inherit;
}
body {
  min-height: 100vh;
  touch-action: manipulation; /* Improves touch responsiveness in webview */
}
.fortune-text {
  min-height: 1.5rem;
}
.shake {
  animation: shake 0.5s ease-in-out;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.cookie-open {
  animation: openCookie 0.5s ease-in-out forwards;
}
@keyframes openCookie {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.fade-in {
  animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.profile-modal {
  backdrop-filter: blur(5px);
}
.category-used {
  opacity: 0.6;
  cursor: not-allowed;
}
.section {
  display: none;
}
.section.active {
  display: block;
}
.points-display {
  background: linear-gradient(135deg, #F59E0B, #EAB308);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}
.referral-code {
  font-family: monospace;
  background: rgba(0,0,0,0.1);
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: bold;
}
.category-active {
  background-color: #F59E0B !important;
  color: white !important;
}
.ad-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  overflow: hidden;
}
.countdown-timer {
  font-family: monospace;
  font-weight: bold;
  color: #F59E0B;
}
.progress-bar {
  height: 6px;
  background-color: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B, #EAB308);
  transition: width 1s linear;
}

/* Mobile-specific improvements for webview */
@media (max-width: 480px) {
  .section {
    padding: 0 16px;
  }
  .cookie-img {
    width: 200px !important;
    height: auto;
  }
  .nav-button {
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent; /* Removes tap highlight in webview */
  }
  .category-button {
    font-size: 14px;
    padding: 10px 8px;
  }
  .button-primary {
    font-size: 16px;
    padding: 14px 20px;
    -webkit-appearance: none;
  }
  .modal-content {
    margin: 20px 10px;
    padding: 20px 16px;
  }
  .fortune-text {
    font-size: 18px;
    line-height: 1.4;
    padding: 0 10px;
  }
  .recent-fortune-item {
    padding: 12px 0;
  }
  .ad-option {
    padding: 12px;
  }
  /* Prevent zoom on input focus */
  input:focus {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .cookie-img {
    width: 180px !important;
  }
  .category-button {
    font-size: 12px;
    padding: 8px 6px;
  }
  .button-primary {
    font-size: 14px;
    padding: 12px 16px;
  }
}

/* Additional webview optimizations */
* {
  -webkit-touch-callout: none; /* Disable callout on long press */
  -webkit-user-select: none; /* Disable selection */
}
input, textarea {
  -webkit-user-select: text; /* Allow selection in inputs */
}