
/* ===== CSS RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.15);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);
  --accent-glow: rgba(147, 112, 219, 0.4);
  --button-bg: rgba(255, 255, 255, 0.12);
  --button-hover: rgba(255, 255, 255, 0.2);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== APP CONTAINER ===== */
.app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* ===== ANIMATED BACKGROUND ===== */
.background-gradient {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #1a1a2e 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: -2;
}

.background-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(102, 126, 234, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(240, 147, 251, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 40%, rgba(118, 75, 162, 0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 60% 60%, rgba(99, 102, 241, 0.1) 0%, transparent 35%);
  animation: float 20s ease-in-out infinite;
}

.background-gradient::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 50px 160px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(2px 2px at 200px 50px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 250px 180px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 300px 90px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 350px 150px, rgba(255, 255, 255, 0.4), transparent);
  background-repeat: repeat;
  background-size: 400px 200px;
  animation: twinkle 8s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(10px, -10px) scale(1.02);
  }
  50% {
    transform: translate(-5px, 15px) scale(0.98);
  }
  75% {
    transform: translate(-15px, -5px) scale(1.01);
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ===== FLOATING SHAPES ===== */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  top: -100px;
  left: -100px;
  animation: floatShape1 25s ease-in-out infinite;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  top: 50%;
  right: -50px;
  animation: floatShape2 20s ease-in-out infinite;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  bottom: -80px;
  left: 20%;
  animation: floatShape3 22s ease-in-out infinite;
}

.shape-4 {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #fa709a, #fee140);
  top: 30%;
  left: 10%;
  animation: floatShape4 18s ease-in-out infinite;
}

.shape-5 {
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, #a18cd1, #fbc2eb);
  bottom: 20%;
  right: 15%;
  animation: floatShape5 23s ease-in-out infinite;
}

@keyframes floatShape1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(50px, 50px) rotate(90deg); }
  50% { transform: translate(30px, 100px) rotate(180deg); }
  75% { transform: translate(-20px, 50px) rotate(270deg); }
}

@keyframes floatShape2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.1); }
  66% { transform: translate(-20px, -40px) scale(0.9); }
}

@keyframes floatShape3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(60px, -40px) rotate(180deg); }
}

@keyframes floatShape4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -30px) scale(1.15); }
  50% { transform: translate(40px, 20px) scale(1); }
  75% { transform: translate(10px, 40px) scale(0.85); }
}

@keyframes floatShape5 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-30px, -50px); }
  66% { transform: translate(20px, -20px); }
}

/* ===== PROFILE CARD ===== */
.profile-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 32px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 -20px 40px -20px rgba(255, 255, 255, 0.02) inset;
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(102, 126, 234, 0.1),
    transparent,
    rgba(240, 147, 251, 0.1),
    transparent,
    rgba(118, 75, 162, 0.1),
    transparent
  );
  animation: rotate 12s linear infinite;
  opacity: 0.6;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.card-content {
  position: relative;
  padding: 45px 35px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  z-index: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== PROFILE IMAGE ===== */
.profile-image-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.ring-1 {
  width: 100%;
  height: 100%;
  border-color: rgba(255, 255, 255, 0.25);
  animation: pulse 3s ease-in-out infinite;
}

.ring-2 {
  width: 118%;
  height: 118%;
  border-color: rgba(255, 255, 255, 0.12);
  animation: pulse 3s ease-in-out infinite 0.4s;
}

.ring-3 {
  width: 136%;
  height: 136%;
  border-color: rgba(255, 255, 255, 0.06);
  animation: pulse 3s ease-in-out infinite 0.8s;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.5;
  }
}

.profile-image {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.4),
    0 0 0 6px rgba(255, 255, 255, 0.08),
    0 0 60px rgba(102, 126, 234, 0.3),
    inset 0 0 30px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.profile-image:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 8px rgba(255, 255, 255, 0.15),
    0 0 80px rgba(102, 126, 234, 0.5),
    inset 0 0 30px rgba(0, 0, 0, 0.15);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #f093fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.avatar-placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.avatar-emoji {
  font-size: 4rem;
  filter: grayscale(100%) brightness(2);
  position: relative;
  z-index: 1;
}

.status-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.95);
  z-index: 3;
  animation: statusPulse 2.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
}

@keyframes statusPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6), 0 0 20px rgba(34, 197, 94, 0.6);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0), 0 0 20px rgba(34, 197, 94, 0.6);
  }
}

/* ===== PROFILE INFO ===== */
.profile-info {
  text-align: center;
  margin-bottom: 25px;
}

.profile-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-bio {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
  line-height: 1.6;
  font-weight: 500;
}

.profile-location {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

/* ===== STATS SECTION ===== */
.stats-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px 25px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
}

/* ===== LINKS CONTAINER ===== */
.links-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ===== LINK BUTTON ===== */
.link-button {
  position: relative;
  display: flex;
  align-items: center;
  padding: 18px 22px;
  background: var(--button-bg);
  border-radius: 18px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.link-button:nth-child(1) { animation-delay: 0.1s; }
.link-button:nth-child(2) { animation-delay: 0.18s; }
.link-button:nth-child(3) { animation-delay: 0.26s; }
.link-button:nth-child(4) { animation-delay: 0.34s; }
.link-button:nth-child(5) { animation-delay: 0.42s; }
.link-button:nth-child(6) { animation-delay: 0.5s; }
.link-button:nth-child(7) { animation-delay: 0.58s; }
.link-button:nth-child(8) { animation-delay: 0.66s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.link-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--button-hover);
}

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

.link-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.link-button:hover .link-bg {
  opacity: 0.25;
}

.link-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
  z-index: 1;
}

.link-button:hover .link-shine {
  left: 100%;
}

.link-icon {
  font-size: 1.5rem;
  margin-right: 16px;
  position: relative;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.link-button:hover .link-icon {
  transform: scale(1.25) rotate(-8deg);
}

.link-title {
  flex: 1;
  position: relative;
  z-index: 2;
  text-align: left;
  letter-spacing: 0.01em;
}

.link-arrow {
  font-size: 1.3rem;
  opacity: 0;
  transform: translateX(-15px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 2;
}

.link-button:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ===== FOOTER ===== */
.profile-footer {
  text-align: center;
  margin-top: 35px;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-footer p {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.footer-icon {
  font-size: 1.2rem;
  opacity: 0.6;
  transition: all 0.3s ease;
  cursor: pointer;
}

.footer-icon:hover {
  opacity: 1;
  transform: scale(1.3) rotate(10deg);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
  .app {
    padding: 15px;
  }

  .profile-card {
    border-radius: 24px;
  }

  .card-content {
    padding: 35px 22px;
  }

  .profile-image-container {
    width: 130px;
    height: 130px;
  }

  .profile-image {
    width: 110px;
    height: 110px;
  }

  .avatar-emoji {
    font-size: 3rem;
  }

  .status-indicator {
    width: 20px;
    height: 20px;
    bottom: 8px;
    right: 8px;
  }

  .profile-name {
    font-size: 1.6rem;
  }

  .profile-bio {
    font-size: 0.95rem;
  }

  .stats-container {
    gap: 15px;
    padding: 16px 20px;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .link-button {
    padding: 15px 18px;
    font-size: 0.95rem;
    border-radius: 14px;
  }

  .link-icon {
    font-size: 1.3rem;
    margin-right: 14px;
  }
}

@media (max-width: 360px) {
  .card-content {
    padding: 28px 18px;
  }

  .profile-name {
    font-size: 1.4rem;
  }

  .profile-bio {
    font-size: 0.9rem;
  }

  .stats-container {
    gap: 12px;
    padding: 14px 16px;
  }

  .stat-number {
    font-size: 1.1rem;
  }

  .link-button {
    padding: 13px 15px;
    font-size: 0.9rem;
  }

  .link-icon {
    font-size: 1.2rem;
    margin-right: 12px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states for keyboard navigation */
.link-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.6);
}

.link-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

/* ===== SELECTION STYLING ===== */
::selection {
  background: rgba(102, 126, 234, 0.4);
  color: #ffffff;
}

::-moz-selection {
  background: rgba(102, 126, 234, 0.4);
  color: #ffffff;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.7);
}
