/* ========================================
   Leonhart Linktree — Liquid Glass Theme
   ======================================== */

/* --- Fonts --- */
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/karla/v31/qkBbXvYC6trAT7RbLtyU5rZPoAU.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

html, body {
  min-height: 100%;
  background: #000;
  font-family: 'Karla', sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

/* --- Video Background --- */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* --- Card Wrapper (viewport centering + scrolling support) --- */
.card-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
}

/* --- Glass Card — Liquid Glass Container --- */
.glass-card {
  position: relative;
  width: 100%;
  max-width: 580px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 36px 40px;
  transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card.is-maximized {
  max-width: 680px;
}

.glass-card.is-minimized {
  padding-bottom: 28px;
}

.card-collapsible {
  display: grid;
  grid-template-rows: 1fr;
  width: 100%;
  margin-top: 14px;
  opacity: 1;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-collapsible-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 18px;
  padding: 4px 10px 14px;
  margin: -4px -10px -14px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
}

.glass-card.is-minimized .card-collapsible {
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
}

.glass-card.is-minimized .card-collapsible-inner {
  transform: translateY(-10px);
}

@keyframes windowShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.glass-card.shake {
  animation: windowShake 0.35s ease;
}

/* --- Window Controls (macOS Tahoe style) --- */
.window-controls {
  position: absolute;
  top: 22px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
  cursor: default;
}

.window-btn {
  position: relative;
  width: 12.5px;
  height: 12.5px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.window-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.12);
}

.window-btn:active {
  transform: scale(0.9);
  filter: brightness(0.85);
}

.window-btn-close {
  background: linear-gradient(180deg, #ff6058 0%, #e1443d 100%);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.window-btn-minimize {
  background: linear-gradient(180deg, #ffbd2e 0%, #df9f1b 100%);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.window-btn-maximize {
  background: linear-gradient(180deg, #28c941 0%, #1ea734 100%);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

/* --- Profile Header --- */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 16px;
}

/* --- Profile Picture & Discord Decoration --- */
.pfp-container {
  position: relative;
  width: 140px;
  height: 140px;
  user-select: none;
  -webkit-user-select: none;
}

.pfp {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.pfp-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130%;
  height: 130%;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* --- Username & Name Effect --- */
.username-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 320px;
  height: 52px;
}

.username-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-73%, -50%);
  width: 400px;
  height: auto;
  pointer-events: none;
  z-index: 0;
}

.username {
  position: relative;
  z-index: 1;
  font-family: 'Silkscreen', cursive;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  margin: 0;
}

/* --- Bio --- */
.bio {
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #ffffff;
  letter-spacing: 0.6px;
  margin: -4px 0 0 0;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* --- Discord Status Widget (guns.lol GUNS__a1-9c55e2ff-0953f188-17d83a59) --- */
.discord-presence-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.discord-presence-container,
.GUNS__a1-9c55e2ff-0953f188-17d83a59 {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 25px;
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  transition: all 0.25s ease;
}

.discord-user-info {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-sizing: border-box;
  width: 100%;
}

.discord-not-authorized {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 6px 14px;
  font-family: 'Karla', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.8px;
  text-transform: lowercase;
  user-select: none;
}

.discord-avatar-wrapper {
  position: relative;
  display: flex;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
}

.discord-avatar-img {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.discord-status-badge {
  position: absolute;
  bottom: 0px;
  right: 0px;
  height: 13px;
  width: 13px;
  border-radius: 50%;
  border: 2.5px solid rgba(16, 16, 20, 0.95);
  box-sizing: content-box;
}

.discord-status-badge.online { background-color: #23a55a; }
.discord-status-badge.idle { background-color: #f0b232; }
.discord-status-badge.dnd { background-color: #f23f43; }
.discord-status-badge.offline { background-color: #80848e; }

.discord-user-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.discord-username-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.discord-username {
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-tag-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  font-family: 'Karla', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.discord-tag-badge .clan-badge-img {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}


.discord-status-text {
  font-family: 'Karla', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-status-text .truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-emoji {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.discord-emoji-text {
  font-size: 14px;
}

.discord-activity-image {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
}

.discord-activity-image img {
  height: 44px;
  width: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* --- Links Container (Linktree Style) --- */
.links-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 14px;
  margin-top: 6px;
}

/* --- Liquid Glass Link Items --- */
.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 54px;
  padding: 0 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.link-item:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 24px rgba(255, 255, 255, 0.08);
}

.link-item:active {
  transform: translateY(0) scale(0.99);
  background: rgba(255, 255, 255, 0.12);
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.link-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.link-item:hover .link-icon {
  color: #ffffff;
  transform: scale(1.08);
}

.link-label {
  font-family: 'Karla', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: #ffffff;
  flex: 1;
  text-align: center;
  user-select: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.link-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-item:hover .link-arrow {
  transform: translate(2px, -2px);
  color: #ffffff;
}

/* --- Responsive Adjustments --- */
@media (max-width: 640px) {
  .card-wrapper {
    padding: 30px 16px;
  }

  .glass-card {
    border-radius: 28px;
    padding: 34px 22px 30px;
  }

  .glass-card.is-minimized {
    padding-bottom: 22px;
  }

  .window-controls {
    top: 18px;
    left: 20px;
    gap: 7px;
  }

  .window-btn {
    width: 11.5px;
    height: 11.5px;
  }

  .pfp-container {
    width: 120px;
    height: 120px;
  }

  .username {
    font-size: 19px;
  }

  .username-effect {
    width: 350px;
  }

  .link-item {
    height: 52px;
    padding: 0 18px;
  }

  .link-label {
    font-size: 15px;
  }
}
