/* Base Styles */
body {
  width: 350px;
  background-color: white;
  padding: 0;
  margin: 0;
  text-align: center;
  transition: all 0.3s ease;
  font-family: "Helvetica Neue", "Lucida Grande", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  overflow-x: hidden;
}

/* Modern Card Layout */
body {
  border-radius: 8px;
  box-shadow: 0 1px 15px rgba(0, 0, 0, 0.04), 0 1px 6px rgba(0, 0, 0, 0.04);
  padding: 15px;
}

/* Modern Grid Layout */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding: 0;
  box-sizing: border-box;
  max-width: 500px; /* Prevent layout issues on larger screens */
}

.grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.column {
  position: relative;
  width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
  margin-bottom: 15px;
}

.sixteen.wide.column {
  width: 100%;
}

.center.aligned {
  text-align: center;
}

/* Modern Typography */
#title {
  font-family: "Norwester", "Helvetica Neue", "Lucida Grande", sans-serif;
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 0;
  margin-top: 10px;
  letter-spacing: -0.02em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

#caption {
  font-family: "Norwester", "Helvetica Neue", "Lucida Grande", sans-serif;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 8px;
  color: #666;
  opacity: 0.85;
}

.small.header {
  font-size: 14px;
  font-weight: 600;
  margin: 5px 0;
  color: #333;
}

.onboarding {
  font-family: sans-serif;
  border-top: 2px solid #f0f0f0;
  font-weight: 500;
  padding-top: 15px;
  margin-top: 15px;
  font-size: medium;
  color: #444;
}

/* Toggle Switch with Enhanced Animation */
#onffbox {
  appearance: none;
}

#onffmain {
  position: relative;
  display: inline-block;
  cursor: pointer;
  width: 55px;
  height: 25px;
  border-radius: 25px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: #ff8585;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

#onffball {
  position: absolute;
  display: inline-block;
  width: 21px;
  height: 21px;
  top: 2px;
  left: 4px;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: #ff3737;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#onffbox:checked + #onffmain {
  background: #8faadc;
}

#onffbox:checked + #onffmain #onffball {
  left: 30px;
  background: #2f5496;
}

/* Button Styles */
.button {
  display: inline-block;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  background-color: #e0e0e0;
  color: rgba(0, 0, 0, 0.87);
  font-size: 0.95em;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.button:hover {
  background-color: #d0d0d0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.secondary.button {
  background-color: #1678c2;
  color: white;
}

.secondary.button:hover {
  background-color: #0d71bb;
}

/* Modern Ripple Effect for Buttons */
.button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.button:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

/* Social Icons with Modern Hover Effects */
#socials {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 5px 0;
}

#socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
  background-color: #f5f5f5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#socials a:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Icons with SVG for Better Rendering */
.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 5px;
  position: relative;
}

/* SVG Icons */
.icon.github:before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="black" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>')
    no-repeat;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.icon.envelope:before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="red" d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2zm13 2.383l-4.758 2.855L15 11.114v-5.73zm-.034 6.878L9.271 8.82 8 9.583 6.728 8.82l-5.694 3.44A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.739zM1 11.114l4.758-2.876L1 5.383v5.73z"/></svg>')
    no-repeat;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.icon.list.alternate.outline:before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="grey" d="M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm-3 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm0 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm0 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/></svg>')
    no-repeat;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.icon.settings:before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="grey" d="M8 4.754a3.246 3.246 0 1 0 0 6.492 3.246 3.246 0 0 0 0-6.492zM5.754 8a2.246 2.246 0 1 1 4.492 0 2.246 2.246 0 0 1-4.492 0z"/><path fill="grey" d="M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 0 1-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 0 1-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 0 1 .52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 0 1 1.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 0 1 1.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 0 1 .52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 0 1-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 0 1-1.255-.52l-.094-.319zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 0 0 2.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 0 0 1.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 0 0-1.115 2.693l.16.291c.415.764-.42 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 0 0-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 0 0-2.692-1.115l-.292.16c-.764.415-1.6-.42-1.184-1.185l.159-.291A1.873 1.873 0 0 0 1.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 0 0 3.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 0 0 2.692-1.115l.094-.319z"/></svg>')
    no-repeat;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Utility Classes */
[hidden] {
  display: none !important;
}

/* Animation Keyframes */
@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 1;
  }
  20% {
    transform: scale(25, 25);
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Elements Animation */
#title,
#caption,
.onboarding,
#auth_mode,
#hook_mode,
#commit_mode,
#socials {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Responsive Adjustments */
@media (max-width: 400px) {
  body {
    /* width: 100%; */
    box-sizing: border-box;
  }

  #socials {
    gap: 12px;
  }

  #socials a {
    width: 30px;
    height: 30px;
  }
}