body {
  margin: 0;
  padding: 0;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-family: -apple-system, BlinkMacSystemFont, SFPRODisplay-Regular,'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
}

.container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.title-container {
  position: relative;
  margin-bottom: 0.5rem;
}

.main-title {
  font-size: 4rem;
  text-align: center;
  margin: 0;
}

/* Use stacked layers to avoid css crossbrowser bug: here https://stackoverflow.com/questions/69253420/text-stroke-webkit-text-stroke-css-problem */
.stroke-layer {
  color: #222;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  -webkit-text-stroke: 2px #222;
  /* Cartoonish drop shadow belongs to the lower stroke layer instead of text layer */
  text-shadow:
    4px 4px 0 #555,
    8px 8px 0 #f5a623,
    0 2px 10px rgba(0,0,0,0.2);
}

.text-layer {
  color: #ffffff;
  position: relative;
  z-index: 2;

}

.slogan {
  font-size: 1.4rem;
  color: #333;
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.5;
  max-width: 90%;
}

.subheader {
  font-size: 1.2rem;
  color: #111;
  background: #ffe066;
  padding: 0.6em 2em;
  border-radius: 2em;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
  border: none;
  display: inline-block;
  transition: background 0.2s;
  cursor: pointer;
}
.subheader:hover {
  background: #ffd700;
}

.icp-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  text-align: center;
  font-size: 0.95rem;
  color: #333;
  background: rgba(255,255,255,0.7);
  padding: 0.25em 0;
  letter-spacing: 0.05em;
  pointer-events: auto;
}
.icp-footer a {
  color: #222;
  text-decoration: none;
}
.icp-footer a:hover {
  text-decoration: underline;
}

.bottom-bg {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 66.7vw; /* 1024/1536 = 0.6667, so 66.7vw for perfect aspect ratio */
  background: url('happy.png') bottom center no-repeat;
  background-size: contain;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

body {
  margin: 0;
  padding: 0;
  background: #fffbf0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow-x: hidden;
}

.container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 70vh;
  padding-top: 12vh;
  position: relative;
  z-index: 2;
}

@media (max-width: 600px) {
  .main-title {
    font-size: max(2.4rem, 10vw);
  }
  .subheader {
    font-size: 1rem;
    padding: 0.5em 1em;
  }
  .slogan {
    font-size: 1rem;
  }

  .container {
    justify-content: center;
    padding-top: 0;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
}

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

.modal-dialog {
  background: #fff;
  width: 90%;
  max-width: 500px;
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}

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

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #999;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #333;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 0 0 1.5rem 0;
  text-align: center;
  color: #333;
}

.modal-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}

.modal-content p {
  margin-bottom: 1rem;
  text-align: justify;
}

.modal-content p:last-child {
  margin-bottom: 0;
}

.modal-action {
  text-align: center;
  margin-top: 2rem;
}

.btn-primary {
  background: #ffe066;
  color: #111;
  border: none;
  padding: 0.8em 3em;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 2em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-primary:hover {
  background: #ffd700;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
