/* ============================================
   4WAWAX LINKS - GOLD & SKY LUXURY STYLE
   Linktree-style landing page
   Version: 2.0.0
   ============================================ */

/* ============ CSS VARIABLES ============ */
:root {
  /* Gold Palette */
  --gold-light: #FFE57A;
  --gold-main: #F5C518;
  --gold-mid: #D4A017;
  --gold-dark: #A67C00;
  --gold-deep: #7A5800;
  --gold-shine: #FFF5C0;

  /* Sky Palette */
  --sky-light: #E0F4FF;
  --sky-mid: #7EC8E3;
  --sky-deep: #2D8BBF;
  --sky-dark: #1A5F8A;

  /* Background */
  --bg-base: #1a4a6b;
  --bg-card: rgba(255, 255, 255, 0.12);
  --bg-card-hover: rgba(255, 255, 255, 0.2);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #e8f4fd;
  --text-muted: #a8d4ee;

  /* Effects */
  --shadow-gold: 0 8px 32px rgba(212, 160, 23, 0.5);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --glow-gold: 0 0 20px rgba(245, 197, 24, 0.4), 0 0 40px rgba(245, 197, 24, 0.2);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ BASE RESET ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* ============ GOLD TEXT UTILITY ============ */
.gold-text {
  background: linear-gradient(135deg, var(--gold-shine) 0%, var(--gold-main) 30%, var(--gold-dark) 60%, var(--gold-main) 80%, var(--gold-shine) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ ANIMATED BACKGROUND ============ */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg,
    #87CEEB 0%,
    #5aafd6 20%,
    #3d8fb5 50%,
    #1a5f8a 80%,
    #0d3d5c 100%
  );
}

/* Cloud layers */
.background::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 200px at 20% 25%, rgba(255,255,255,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 500px 150px at 70% 15%, rgba(255,255,255,0.45) 0%, transparent 70%),
    radial-gradient(ellipse 400px 120px at 90% 35%, rgba(255,255,255,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 300px 100px at 10% 45%, rgba(255,255,255,0.3) 0%, transparent 70%);
  animation: clouds 30s ease-in-out infinite alternate;
}

/* Sun glow top */
.background::after {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(255,240,150,0.35) 0%, transparent 70%);
  animation: sunpulse 6s ease-in-out infinite;
}

@keyframes clouds {
  0%   { transform: translateX(0px); }
  100% { transform: translateX(40px); }
}

@keyframes sunpulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, 0) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, 0) scale(1.08); }
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: float 20s infinite ease-in-out;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,220,80,0.6) 0%, transparent 70%);
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 70%);
  bottom: 10%;
  left: -5%;
  animation-delay: -7s;
}

.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(135,206,235,0.5) 0%, transparent 70%);
  top: 40%;
  left: 40%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -30px) scale(1.1); }
  66%       { transform: translate(-20px, 20px) scale(0.9); }
}

/* ============ CONTAINER ============ */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 20px;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============ PROFILE SECTION ============ */
.profile-section {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeInUp 0.6s var(--ease) backwards;
  position: relative;
}

.profile-image-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 24px;
}

.profile-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold-shine), var(--gold-main), var(--gold-dark), var(--gold-main), var(--gold-shine));
  animation: rotate 3s linear infinite;
  z-index: -1;
  box-shadow: var(--glow-gold);
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid transparent;
  background: transparent;
  display: block;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), var(--glow-gold);
}

.profile-name {
  font-size: 32px;
  font-weight: 800;
  font-family: 'Playfair Display', 'Poppins', serif;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--gold-shine) 0%, var(--gold-main) 30%, var(--gold-dark) 60%, var(--gold-main) 80%, var(--gold-shine) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(212,160,23,0.5));
  letter-spacing: 1px;
  text-transform: uppercase;
}

.profile-bio {
  font-size: 14px;
  color: var(--gold-light);
  font-weight: 400;
  max-width: 90%;
  margin: 0 auto;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============ ONLINE BADGE ============ */
.online-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  background: #22c55e;
  border-radius: 50%;
  border: 3px solid transparent;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: badgePulse 2.5s ease-in-out infinite;
  z-index: 2;
}

@keyframes badgePulse {
  0%   { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0.7); }
  60%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0);   }
}

/* ============ HOVER PREVIEW TOOLTIP ============ */
#link-tooltip {
  position: fixed;
  background: rgba(10, 30, 50, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 197, 24, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #FFE57A;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
#link-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
#link-tooltip i { color: var(--gold-mid); font-size: 11px; }

/* ============ LINKS SECTION ============ */
.links-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 100%);
  backdrop-filter: blur(14px);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s var(--ease) backwards;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
}

.link-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,229,122,0.18) 0%, rgba(212,160,23,0.22) 100%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.link-item:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.12) 100%);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.3);
}

.link-item:hover::before {
  opacity: 0.1;
}

.link-item:active {
  transform: translateY(0);
}

.link-icon {
  width: 36px;
  height: 36px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245,197,24,0.25), rgba(212,160,23,0.15));
  border: 1px solid rgba(245,197,24,0.4);
  border-radius: 50%;
  color: var(--gold-main);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(245,197,24,0.4));
}

.link-title {
  flex: 1;
  position: relative;
  z-index: 1;
}

.link-arrow {
  width: 20px;
  height: 20px;
  font-size: 16px;
  color: var(--gold-mid);
  transition: transform 0.3s var(--ease);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.link-item:hover .link-arrow {
  transform: translateX(4px);
  color: var(--gold-light);
}

/* ============ SOCIAL SECTION ============ */
.social-section {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  animation: fadeInUp 0.6s var(--ease) 0.2s backwards;
}

.social-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.07));
  backdrop-filter: blur(14px);
  border: none;
  border-radius: 50%;
  color: var(--gold-main);
  text-decoration: none;
  font-size: 20px;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
  filter: drop-shadow(0 0 4px rgba(245,197,24,0.3));
}

.social-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,229,122,0.25), rgba(212,160,23,0.3));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.social-icon:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.12));
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
  color: var(--gold-light);
  filter: drop-shadow(0 0 10px rgba(245,197,24,0.6));
}

.social-icon:hover::before {
  opacity: 0.15;
}

.social-icon i {
  position: relative;
  z-index: 1;
}

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin-top: auto;
  animation: fadeIn 0.6s var(--ease) 0.4s backwards;
}

.footer a {
  color: var(--gold-main);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s var(--ease);
}

.footer a:hover {
  color: var(--gold-light);
}

.heart {
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
  color: var(--gold-main);
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  10%, 30% {
    transform: scale(1.1);
  }
  20%, 40% {
    transform: scale(1);
  }
}

/* ============ LOADING OVERLAY ============ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: #1a4a6b;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s var(--ease);
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--gold-main);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Add stagger delay for link items */
.link-item:nth-child(1) { animation-delay: 0.1s; }
.link-item:nth-child(2) { animation-delay: 0.15s; }
.link-item:nth-child(3) { animation-delay: 0.2s; }
.link-item:nth-child(4) { animation-delay: 0.25s; }
.link-item:nth-child(5) { animation-delay: 0.3s; }
.link-item:nth-child(6) { animation-delay: 0.35s; }
.link-item:nth-child(7) { animation-delay: 0.4s; }
.link-item:nth-child(8) { animation-delay: 0.45s; }
.link-item:nth-child(9) { animation-delay: 0.5s; }
.link-item:nth-child(10) { animation-delay: 0.55s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .container {
    padding: 40px 16px;
  }
  
  .profile-name {
    font-size: 24px;
  }
  
  .profile-bio {
    font-size: 14px;
  }
  
  .link-item {
    padding: 18px 20px;
    font-size: 15px;
  }
  
  .social-icon {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .profile-image-wrapper {
    width: 100px;
    height: 100px;
  }
  
  .profile-name {
    font-size: 22px;
  }
  
  .link-item {
    padding: 16px 18px;
    font-size: 14px;
    gap: 12px;
  }
  
  .link-icon {
    font-size: 18px;
  }
  
  .social-section {
    gap: 12px;
  }
  
  .social-icon {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--sky-dark);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-main), var(--gold-dark));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-main));
}
