/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-color-start: #112d52;
  --bg-color-end: #7dd9e8;
  --bg-gradient: linear-gradient(
    180deg,
    #112d52 0%,
    #112d52 30%,
    #13335b 45%,
    #173c68 58%,
    #1f4b7a 70%,
    #2b618e 80%,
    #417ea3 89%,
    #5ea8be 96%,
    #7dd9e8 100%
  );
  --button-border: #7dd9e8;
  --button-border-hover: #a5ebf5;
  --button-bg: rgba(255, 255, 255, 0.05);
  --button-hover-bg: rgba(125, 217, 232, 0.2);
  --button-hover-shadow: 0 4px 20px rgba(125, 217, 232, 0.3);
  --text-primary: #ffffff;
  --text-muted: #8ea3bf;
  --social-color: #ffffff;
  --social-hover-color: #7dd9e8;
  --modal-bg: #112d52;
  --container-max-width: 600px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background: var(--bg-gradient);
  background-repeat: no-repeat;
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 16px 60px 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page Container */
.page-container {
  width: 100%;
  max-width: var(--container-max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Header & Avatar */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  width: 100%;
}

.avatar-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin-bottom: 14px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 4px;
}

.profile-bio {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 480px;
  margin-top: 4px;
}

/* Links Container */
.links-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

/* Link Card Button */
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 6px 14px 6px 10px;
  border: 2px solid var(--button-border);
  border-radius: 40px;
  background-color: var(--button-bg);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.link-card:hover {
  border-color: var(--button-border-hover);
  background-color: var(--button-hover-bg);
  box-shadow: var(--button-hover-shadow);
  transform: translateY(-2px);
}

.link-card:active {
  transform: translateY(0);
}

/* Left Icon Badge */
.link-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.link-icon-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.link-icon-badge svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Title */
.link-title {
  flex-grow: 1;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Arrow Icon */
.link-arrow-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-primary);
  opacity: 0.85;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  padding-right: 6px;
}

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

.link-card:hover .link-arrow-icon {
  opacity: 1;
  color: #ffffff;
  transform: translateX(4px);
}

/* Social Footer */
.socials-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
  margin-bottom: 24px;
}

.social-icon-link {
  color: var(--social-color);
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 8px;
  border-radius: 50%;
  filter: drop-shadow(0 2px 6px rgba(17, 45, 82, 0.4));
}

.social-icon-link:hover {
  color: var(--social-hover-color);
  opacity: 1;
  transform: translateY(-2px) scale(1.1);
}

.social-icon-link svg,
.social-icon-link img,
.social-icon-img {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
  fill: currentColor;
}

/* Privacy & GDPR Badge */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #ffffff;
  opacity: 0.9;
  margin-top: auto;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(17, 45, 82, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(17, 45, 82, 0.25);
}

.privacy-badge:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: var(--button-border);
  box-shadow: 0 4px 16px rgba(125, 217, 232, 0.35);
}

.privacy-badge:active {
  transform: translateY(0);
}

.privacy-badge svg {
  width: 14px;
  height: 14px;
  fill: var(--button-border);
}

/* Privacy & Cookie Policy Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 17, 33, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--modal-bg);
  border: 2px solid var(--button-border);
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(125, 217, 232, 0.2);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(125, 217, 232, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.modal-header-title svg {
  width: 22px;
  height: 22px;
  stroke: var(--button-border);
}

.modal-header-title h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.75;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 50%;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  color: #c5d5e8;
  font-size: 0.9rem;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 217, 232, 0.4) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(125, 217, 232, 0.4);
  border-radius: 4px;
}

.policy-intro {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 4px;
}

.policy-point {
  background: rgba(255, 255, 255, 0.035);
  border-left: 3px solid var(--button-border);
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
}

.policy-point-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.92rem;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.policy-point-text {
  color: #9cb3ce;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.45;
}

.modal-footer {
  padding: 14px 22px 18px 22px;
  border-top: 1px solid rgba(125, 217, 232, 0.15);
  display: flex;
  justify-content: flex-end;
}

.modal-action-btn {
  background: var(--button-border);
  color: var(--modal-bg);
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 22px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-action-btn:hover {
  background: var(--button-border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(125, 217, 232, 0.35);
}


/* Responsive adjustments */
@media (max-width: 640px) {
  body {
    padding: 30px 14px 40px 14px;
  }
  
  .avatar-wrapper {
    width: 88px;
    height: 88px;
  }

  .link-card {
    min-height: 52px;
    padding: 5px 12px 5px 8px;
  }

  .link-icon-badge {
    width: 38px;
    height: 38px;
  }

  .link-title {
    font-size: 0.98rem;
  }

  .link-arrow-icon {
    width: 38px;
    height: 38px;
    padding-right: 4px;
  }
}
