/* CSS Variables - Paleta de Cores */
:root {
  --bg: #0B0F19;
  --card: #111827;
  --muted: #9CA3AF;
  --text: #E5E7EB;
  --primary: #2D9BF0;
  --primary-hover: #1e8bd9;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  min-height: 100vh;
  width: 100%;
  padding: 2rem 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 3rem 1rem;
  }
}

.content {
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
}

/* Microheading */
.microheading {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.dot-icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

/* Headline */
.headline {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

@media (min-width: 768px) {
  .headline {
    font-size: 3rem;
  }
}

.gradient-text {
  background: linear-gradient(to right, #2D9BF0, #06B6D4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Description */
.description {
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .description {
    font-size: 1.125rem;
  }
}

/* Identity Card */
.identity-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 2rem;
}

.avatar-wrapper {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, #2D9BF0, #06B6D4);
  border-radius: 50%;
  padding: 2px;
}

.avatar {
  width: 100%;
  height: 100%;
  background-color: var(--card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.identity-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.125rem;
}

.identity-subtitle {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Links List */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

/* Link Card */
.link-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.link-card:active {
  transform: scale(0.99);
}

.link-card:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary);
}

.link-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: var(--primary);
  transition: background-color 0.2s ease;
}

.link-card:hover .link-icon {
  background-color: rgba(255, 255, 255, 0.1);
}

.link-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.arrow-icon {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.link-card:hover .arrow-icon {
  transform: translateX(2px);
}

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--muted);
}

.shield-icon {
  color: #10b981;
}

/* QR Button */
.qr-button {
  font-size: 0.875rem;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.qr-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.qr-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary);
}

/* Copyright */
.copyright {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 28rem;
  background-color: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.modal-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.qr-wrapper {
  display: flex;
  justify-content: center;
  background-color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
}

#qrCanvas {
  max-width: 100%;
  height: auto;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-secondary,
.btn-primary {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  opacity: 0.9;
}

.btn-secondary:focus,
.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

/* Responsive Adjustments */
@media (max-width: 360px) {
  .headline {
    font-size: 2rem;
  }
  
  .container {
    padding: 1.5rem 0.75rem;
  }
  
  .link-label {
    font-size: 0.875rem;
  }
}
