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

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .container {
    animation: none;
  }
}

.container {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px;
  animation: fadeIn 0.6s ease-in;
  box-sizing: border-box;
  position: relative;
}

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

header {
  text-align: center;
  margin-bottom: 40px;
}

.profile-photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.verified-badge svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  display: block;
}

.subtitle {
  font-size: 0.9375rem;
  color: #666;
  font-weight: 400;
  margin-bottom: 0;
  letter-spacing: 0.01em;
}

main {
  margin-bottom: 40px;
}

/* Legal page main adjustments */
main:has(.legal-content) {
  margin-bottom: 48px;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  width: 100%;
}

.button svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.button-primary {
  background-color: #000;
  color: #fff;
}

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

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

.button:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.button:focus:not(:focus-visible) {
  outline: none;
}

footer {
  text-align: center;
  padding-top: 24px;
}

.footer-links {
  margin-top: 24px;
}

.copyright {
  font-size: 0.75rem;
  color: #999;
  margin: 32px 0 8px 0;
}

.legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
}

.legal-link {
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.legal-link:hover {
  color: #666;
}

.legal-link:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.legal-link:focus:not(:focus-visible) {
  outline: none;
}

.legal-separator {
  color: #ccc;
}

/* Legal Pages Styles */
body:has(.legal-content) .container {
  max-width: 640px;
}

.legal-content {
  text-align: left;
  max-width: 100%;
  margin: 0 auto;
}

.legal-content section {
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 16px;
  text-transform: none;
  letter-spacing: normal;
  padding-bottom: 0;
}

.legal-content h2::after {
  display: none;
}

.legal-content p {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-content ul {
  margin: 16px 0 16px 24px;
  padding: 0;
}

.legal-content li {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-content strong {
  color: #333;
  font-weight: 500;
}

.legal-content a {
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.legal-content a:hover {
  border-bottom-color: #1a1a1a;
  color: #000;
}

.top-back-link {
  text-align: left;
  margin-bottom: 24px;
}

.top-back-link .back-link {
  margin-top: 0;
}

.back-link {
  color: #999;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
  display: inline-block;
  margin-top: 24px;
}

.back-link:hover {
  color: #666;
}

.back-link:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.back-link:focus:not(:focus-visible) {
  outline: none;
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #1a1a1a;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

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

.social-icon:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.social-icon:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.social-icon:focus:not(:focus-visible) {
  outline: none;
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

/* QR Code Modal */
.qr-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.qr-modal.active {
  display: flex;
  opacity: 1;
}

.qr-modal-content {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 32px;
  max-width: 320px;
  width: 90%;
  position: relative;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.qr-modal.active .qr-modal-content {
  transform: scale(1);
}

.qr-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: #f5f5f5;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.qr-modal-close:hover {
  background-color: #ebebeb;
  transform: rotate(90deg);
}

.qr-modal-close:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.qr-modal-close:focus:not(:focus-visible) {
  outline: none;
}

.qr-code-image {
  width: 100%;
  max-width: 256px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
}

.qr-code-text {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .social-icons {
    display: none;
  }

  .button {
    border: 1px solid #000;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 32px 20px;
  }

  header {
    margin-bottom: 32px;
  }

  main {
    margin-bottom: 32px;
  }

  footer {
    padding-top: 20px;
  }

  .profile-photo {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .verified-badge svg {
    width: 18px;
    height: 18px;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  .button {
    padding: 14px 20px;
    font-size: 0.9375rem;
  }

  .button svg {
    width: 18px;
    height: 18px;
  }

  .social-icon {
    width: 40px;
    height: 40px;
  }

  .social-icon svg {
    width: 18px;
    height: 18px;
  }

  .qr-modal-content {
    padding: 24px;
    max-width: 280px;
  }

  .qr-code-image {
    max-width: 220px;
  }

  .footer-links {
    margin-top: 20px;
  }

  .copyright {
    font-size: 0.6875rem;
  }

  .legal-links {
    font-size: 0.6875rem;
  }

  .legal-content h2 {
    font-size: 1rem;
  }

  .legal-content p,
  .legal-content li {
    font-size: 0.875rem;
  }
}
