/* Diseño minimalista: estructura y medidas del concepto suministrado. */
:root {
  --bg-color: #121214;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  --accent-color: #D4AF37;
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg-color: #F8F9FA;
  --card-bg: rgba(0, 0, 0, 0.04);
  --card-border: rgba(0, 0, 0, 0.08);
  --text-primary: #1A1A1A;
  --text-secondary: #666666;
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  color-scheme: light;
}

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

body.public-smart-page {
  background-color: var(--bg-color);
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.smart-link-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  background: var(--bg-color);
  background:
    radial-gradient(ellipse 320px 260px at 0% 360px, color-mix(in srgb, var(--accent-color) 18%, transparent), transparent 75%),
    radial-gradient(ellipse 260px 340px at 100% 640px, color-mix(in srgb, var(--accent-color) 12%, transparent), transparent 75%),
    var(--bg-color);
  position: relative;
  padding-bottom: 40px;
  min-width: 0;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.banner-container { width: 100%; height: 180px; overflow: hidden; }
.banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-logo-wrapper {
  display: flex;
  justify-content: center;
  margin-top: -45px;
  position: relative;
  z-index: 10;
}
.smart-link-container:not(.has-banner) .profile-logo-wrapper { margin-top: 32px; }

.profile-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--bg-color);
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  background: var(--bg-color);
  overflow: hidden;
  flex: none;
}
.profile-logo-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-initial { display: grid; place-items: center; color: var(--text-primary); font-size: 30px; font-weight: 700; }

.profile-info { text-align: center; padding: 15px 20px; }
.profile-name { font-size: 22px; font-weight: 700; margin: 0 0 5px 0; overflow-wrap: anywhere; }
.profile-bio { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }

.links-list { display: flex; flex-direction: column; gap: 12px; padding: 0 20px; margin-top: 15px; }

.glass-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 16px 20px;
  border-radius: 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: var(--glass-shadow);
  min-width: 0;
  min-height: 56px;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color, #D4AF37);
  transform: translateY(-2px);
}
.glass-button:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 4px; }
.glass-button:active { transform: translateY(0); }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; }
.icon svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.label { min-width: 0; overflow-wrap: anywhere; text-align: center; }
.label small { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 12px; font-weight: 400; }
.copy-action { font-size: 12px; font-weight: 500; flex: none; }
.copy-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.public-smart-empty { margin: 24px 20px 0; color: var(--text-secondary); text-align: center; font-size: 14px; }

.footer-brand { text-align: center; margin-top: 40px; font-size: 13px; color: var(--text-secondary); }
.footer-brand a { color: inherit; text-decoration: none; }
.footer-brand a:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 4px; border-radius: 3px; }
.footer-brand a:hover { color: var(--text-primary); }

.theme-toggle-btn {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: calc(20px + env(safe-area-inset-right, 0px));
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: var(--glass-shadow);
  display: grid;
  place-items: center;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.theme-toggle-btn:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 4px; }
.theme-toggle-btn:hover { border-color: var(--accent-color); }
.theme-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

@media (prefers-reduced-motion: reduce) {
  body.public-smart-page, .smart-link-container, .glass-button, .theme-toggle-btn { transition: none; }
  .glass-button:hover, .glass-button:active { transform: none; }
}
