/* style.css - Premium custom styling for いばらきまるごと健康チャレンジ2026 */

:root {
  --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-primary: #f59e0b; /* Amber 500 */
  --color-secondary: #f97316; /* Orange 500 */
  --color-bg: #fffbeb; /* Amber 50 */
}

/* 1. Global Typography & Base Styles */
body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 2. Glassmorphism Card Style */
.premium-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 191, 36, 0.2); /* Soft amber border */
  box-shadow: 0 4px 20px -2px rgba(245, 158, 11, 0.08), 0 2px 8px -1px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
  box-shadow: 0 10px 25px -3px rgba(245, 158, 11, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
  border-color: rgba(251, 191, 36, 0.35);
}

/* 3. Section Fade-in Animation */
.section-fade-in {
  animation: sectionFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sectionFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 4. Stamp Popup Animation */
.stamp-pop {
  animation: stampPopEffect 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stampPopEffect {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 5. Avatar Selection & Transitions */
.avatar-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-btn:hover {
  transform: translateY(-2px);
}

.avatar-btn img {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-btn.selected img {
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
}

/* 6. Premium Button Glow & Interactions */
.glow-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: 0.75s;
  opacity: 0;
}

.glow-btn:hover::after {
  left: 125%;
  opacity: 1;
}

.glow-btn:active {
  transform: scale(0.97);
}

/* 7. Dialog Styling (Native Modal) */
dialog.native-modal {
  padding: 0;
  border: none;
  border-radius: 24px;
  background: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 380px;
  width: calc(100% - 32px);
  max-height: 85vh;
  max-height: 85dvh;
  margin: auto;
  position: fixed;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.25s ease-out, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

dialog.native-modal[open] {
  opacity: 1;
  transform: scale(1);
}

dialog.native-modal::backdrop {
  background-color: rgba(15, 23, 42, 0.55); /* Deep slate tint */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

dialog.native-modal[open]::backdrop {
  opacity: 1;
}

body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

/* 8. Scrollbar Optimization */
.custom-scroll::-webkit-scrollbar {
  height: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: rgba(245, 158, 11, 0.05);
  border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.4);
}
