*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --fun-bg: #0094da;
  --fun-accent: #0094da;
  --religious-bg: linear-gradient(135deg, #f59e0b, #ea580c);
  --religious-accent: #9a3412;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow: hidden;
}

.app {
  height: 100vh;
  width: 100vw;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.main-section {
  position: relative;
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  transition: background 0.5s;
}

.main-section.fun {
  background: var(--fun-bg);
}

.main-section.religious {
  background: var(--religious-bg);
}

/* Header */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 40;
  pointer-events: none;
}

.brand {
  pointer-events: auto;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.brand h1 {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: -0.025em;
}

.brand span {
  font-size: 0.75rem;
  opacity: 0.8;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.settings-btn {
  pointer-events: auto;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.settings-btn:active {
  transform: scale(0.95);
}

.settings-btn svg {
  width: 24px;
  height: 24px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
}

.install-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.install-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.install-btn:active {
  transform: scale(0.95);
}

.install-btn svg {
  width: 18px;
  height: 18px;
}

/* Bell Area */
.bell-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ripple-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: visible;
}

.ripple {
  position: absolute;
  width: 288px;
  height: 288px;
  border-radius: 50%;
  border: 6px solid white;
  animation: ripple 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.5;
    border-width: 6px;
  }

  100% {
    transform: scale(var(--scale, 2.5));
    opacity: 0;
    border-width: 0;
  }
}

.bell-button {
  position: relative;
  z-index: 10;
  width: 288px;
  height: 288px;
  background: white;
  border-radius: 50%;
  border: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.bell-button:active {
  transform: scale(0.95);
}

.bell-button:focus {
  outline: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.bell-icon {
  width: 192px;
  height: 192px;
  transition: color 0.5s;
  transform-origin: top center;
}

.bell-icon.fun {
  color: var(--fun-accent);
}

.bell-icon.religious {
  color: var(--religious-accent);
}

@keyframes swing-left {
  0% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(15deg);
  }

  40% {
    transform: rotate(-10deg);
  }

  60% {
    transform: rotate(5deg);
  }

  80% {
    transform: rotate(-2deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@keyframes swing-right {
  0% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(-15deg);
  }

  40% {
    transform: rotate(10deg);
  }

  60% {
    transform: rotate(-5deg);
  }

  80% {
    transform: rotate(2deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.animate-swing-left {
  animation: swing-left 1s ease-in-out;
}

.animate-swing-right {
  animation: swing-right 1s ease-in-out;
}

@keyframes button-impact {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

.animate-impact {
  animation: button-impact 0.6s ease-out;
}

/* Instructions */
.instructions {
  position: absolute;
  bottom: -2.5rem;
  text-align: center;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.instructions p {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.instructions strong {
  font-weight: 700;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 1rem;
  width: 100%;
  text-align: center;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.footer .shake-hint {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.95;
}

.footer .tagline {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

.footer .scroll-hint {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

.footer svg {
  width: 16px;
  height: 16px;
  margin: 0.25rem auto 0;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }

  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* SEO Section */
.seo-section {
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: white;
  transition: background 0.5s;
}

.seo-section.fun {
  background: #0073ad;
}

.seo-section.religious {
  background: linear-gradient(135deg, #ea580c, #f59e0b);
}

.seo-content {
  max-width: 42rem;
  width: 100%;
  text-align: center;
}

.seo-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.seo-header svg {
  width: 40px;
  height: 40px;
  opacity: 0.5;
}

.seo-header h2 {
  font-size: 1.875rem;
  font-weight: bold;
  letter-spacing: -0.025em;
}

.seo-box {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: left;
}

.seo-box p {
  line-height: 1.6;
}

.seo-box p:first-child {
  font-size: 1.125rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.seo-box p:nth-child(2) {
  font-size: 0.875rem;
  opacity: 0.9;
}

.seo-box hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 1rem 0;
}

.seo-box .notice {
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.seo-box .notice h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.seo-box .notice p {
  font-size: 0.75rem;
  opacity: 0.8;
}

.seo-footer {
  padding-top: 2rem;
}

.seo-footer p {
  font-size: 0.75rem;
  opacity: 0.7;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Settings Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 24rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  color: white;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0.5rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header h2 svg {
  width: 20px;
  height: 20px;
}

.modal-close {
  padding: 0.5rem;
  background: none;
  border: none;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.setting-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.setting-group label svg {
  width: 16px;
  height: 16px;
}

.btn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.btn-option {
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: capitalize;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-option.active {
  background: white;
  border-color: white;
}

.btn-option.active.fun {
  color: var(--fun-accent);
}

.btn-option.active.religious {
  color: var(--religious-accent);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.slider-header label {
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slider-header label svg {
  width: 16px;
  height: 16px;
}

.slider-header span {
  opacity: 0.6;
}

input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  margin-top: -6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.4;
  padding: 0.25rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.8;
}

.toggle-row label svg {
  width: 16px;
  height: 16px;
}

.toggle {
  width: 48px;
  height: 24px;
  border-radius: 12px;
  padding: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle.off {
  background: rgba(255, 255, 255, 0.2);
}

.toggle.on {
  background: white;
}

.toggle-knob {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.toggle.off .toggle-knob {
  transform: translateX(0);
  opacity: 0.5;
}

.toggle.on .toggle-knob {
  transform: translateX(24px);
}

.toggle-knob.fun {
  background: var(--fun-accent);
}

.toggle-knob.religious {
  background: var(--religious-accent);
}

.modal-footer {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.6;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s;
}

.reset-btn:hover {
  opacity: 1;
}

.reset-btn svg {
  width: 12px;
  height: 12px;
}