:root {
  --background-color: #f5f2e8;
  --button-color: #6f7654;
  --button-text-color: #ffffff;
  --button-radius: 18px;
  --button-shadow: 0 14px 35px rgba(58, 61, 43, 0.18);
  --text-color: #2f3325;
  --muted-color: #6e735e;
  --surface: rgba(255, 255, 255, 0.76);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Cairo", sans-serif;
  color: var(--text-color);
  background: var(--background-color);
  overflow-x: hidden;
}

button,
a,
input,
select,
textarea {
  font: inherit;
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--background-color);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.page-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.46));
  backdrop-filter: blur(1px);
}

.link-page {
  width: min(100% - 28px, 640px);
  min-height: 100vh;
  margin-inline: auto;
  padding: 52px 0 28px;
  display: flex;
  flex-direction: column;
}

.profile-card {
  text-align: center;
  margin-bottom: 28px;
}

.brand-logo,
.brand-fallback {
  width: 104px;
  height: 104px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(43, 47, 32, 0.18);
}

.brand-logo {
  display: block;
  object-fit: cover;
  background: #fff;
}

.brand-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #7d8460, #535a3e);
  color: #fff;
  font-weight: 800;
  font-size: 26px;
}

.profile-card h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.35;
  font-weight: 800;
}

.profile-card p {
  max-width: 520px;
  margin: 8px auto 0;
  color: var(--muted-color);
  line-height: 1.9;
  font-size: 15px;
}

.links-container {
  display: grid;
  gap: 14px;
  flex: 1;
}

.link-button {
  position: relative;
  min-height: 64px;
  padding: 14px 58px 14px 58px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--button-radius);
  background: var(--button-color);
  color: var(--button-text-color);
  box-shadow: var(--button-shadow);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}

.link-button:hover {
  transform: translateY(-3px);
  filter: brightness(1.04);
}

.link-button:active {
  transform: translateY(0) scale(0.99);
}

.link-button:focus-visible {
  outline: 3px solid rgba(47, 51, 37, 0.35);
  outline-offset: 4px;
}

.link-button .link-icon {
  position: absolute;
  right: 20px;
  width: 26px;
  text-align: center;
  font-size: 22px;
}

.link-button .link-arrow {
  position: absolute;
  left: 20px;
  opacity: 0.7;
  font-size: 14px;
}

.loading-card,
.empty-card,
.error-card {
  min-height: 92px;
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(52, 57, 39, 0.1);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted-color);
}

.error-card {
  color: #8a3131;
}

.page-footer {
  padding: 32px 12px 4px;
  text-align: center;
  color: var(--muted-color);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff3cd;
  color: #664d03;
  text-align: center;
}

@media (max-width: 480px) {
  .link-page {
    width: min(100% - 22px, 640px);
    padding-top: 34px;
  }

  .brand-logo,
  .brand-fallback {
    width: 88px;
    height: 88px;
  }

  .link-button {
    min-height: 60px;
    padding-inline: 52px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}
