/* Modern CSS reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overscroll-behavior: none;
}

html {
  background: linear-gradient(135deg, #1e3a8a, #7c3aed, #000000) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  overscroll-behavior: none !important;
  height: 100% !important;
  overflow-x: hidden !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.6;
  background: transparent !important;
  overscroll-behavior: none !important;
  height: 100% !important;
  overflow-x: hidden !important;
  position: relative !important;
}

/* Modern Avatar Container */
.avatar-container {
  position: relative;
  width: 180px;
  height: 260px;
  margin: 10px auto;
  filter: drop-shadow(0 10px 20px rgba(139, 69, 19, 0.3));
}

.dev-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.dev-avatar:hover {
  transform: scale(1.05);
}

/* Modern Head with Gradient */
.avatar-head {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #D2691E, #8B4513, #654321);
  border-radius: 50%;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.1);
}

/* Modern Textured Hair */
.avatar-hair {
  width: 70px;
  height: 50px;
  background: linear-gradient(145deg, #1a1a1a, #2C1810, #1a1a1a);
  border-radius: 50% 50% 45% 45%;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Hair strands for texture */
.avatar-hair::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.1) 50%, transparent 55%);
  border-radius: inherit;
}

/* Modern Body with Professional Look */
.avatar-body {
  width: 38px;
  height: 70px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Modern Gradient Tie */
.avatar-tie {
  width: 15px;
  height: 55px;
  background: linear-gradient(145deg, #6366f1, #8b5cf6, #a855f7);
  position: absolute;
  top: 67px;
  left: 50%;
  transform: translateX(-50%);
  clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

/* Modern Arms with Gradient */
.avatar-arm {
  width: 24px;
  height: 55px;
  background: linear-gradient(135deg, #D2691E, #8B4513);
  position: absolute;
  top: 67px;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.avatar-arm.left {
  left: 58px;
  transform-origin: 50% 20%;
  animation: modernWave 2.5s ease-in-out infinite;
}

.avatar-arm.right {
  right: 58px;
  transform: rotate(-5deg);
}

/* Modern Slim Waist */
.avatar-waist {
  width: 32px;
  height: 26px;
  background: linear-gradient(135deg, #1a1a1a, #333);
  position: absolute;
  top: 128px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Modern Curvy Hips */
.avatar-hips {
  width: 62px;
  height: 45px;
  background: linear-gradient(135deg, #1a1a1a, #333, #1a1a1a);
  position: absolute;
  top: 148px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 18px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

/* Modern Legs */
.avatar-leg {
  width: 18px;
  height: 55px;
  background: linear-gradient(135deg, #D2691E, #8B4513);
  position: absolute;
  top: 188px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.avatar-leg.left {
  left: 66px;
}

.avatar-leg.right {
  right: 66px;
}

/* Modern Floating Animation */
@keyframes modernWave {
  0%, 100% {
    transform: rotate(-10deg) translateY(0px);
  }
  25% {
    transform: rotate(-25deg) translateY(-3px);
  }
  50% {
    transform: rotate(-5deg) translateY(-2px);
  }
  75% {
    transform: rotate(15deg) translateY(-1px);
  }
}

/* Modern Tech Glasses */
.avatar-glasses {
  width: 45px;
  height: 18px;
  border: 2px solid #6366f1;
  border-radius: 15px;
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.2));
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.avatar-glasses::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 2px;
  background: #6366f1;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

/* Glowing Effect */
.dev-avatar::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 50px;
  z-index: -2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dev-avatar:hover::before {
  opacity: 1;
}

/* Custom animations for better performance */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .avatar-container {
    width: 180px;
    height: 260px;
  }
  
  .avatar-head {
    width: 60px;
    height: 60px;
  }
  
  .avatar-hair {
    width: 75px;
    height: 50px;
  }
  
  .avatar-body {
    width: 40px;
    height: 70px;
  }
  
  .avatar-arm {
    width: 24px;
    height: 55px;
  }
  
  .avatar-arm.left {
    left: 60px;
  }
  
  .avatar-arm.right {
    right: 60px;
  }
  
  .avatar-leg {
    width: 20px;
    height: 55px;
  }
  
  .avatar-leg.left {
    left: 70px;
  }
  
  .avatar-leg.right {
    right: 70px;
  }
}

/* Form styling */
input, textarea {
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* Button hover effects */
button, .btn {
  transition: all 0.3s ease;
}

button:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Link hover effects */
a {
  transition: color 0.3s ease;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #a855f7;
  animation: spin 1s ease-in-out infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.7);
}

/* Prevent overscroll bounce on mobile */
* {
  overscroll-behavior: none !important;
}

/* Ensure no white background shows during overscroll */
html, body {
  min-height: 100vh !important;
  background: linear-gradient(135deg, #1e3a8a, #7c3aed, #000000) !important;
  background-attachment: fixed !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

/* Add pseudo-element to body for extra background coverage */
body::before {
  content: '';
  position: fixed;
  top: -100vh;
  left: 0;
  right: 0;
  bottom: -100vh;
  background: linear-gradient(135deg, #1e3a8a, #7c3aed, #000000);
  z-index: -1;
  pointer-events: none;
}

/* Prevent pull-to-refresh and overscroll effects */
body {
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -khtml-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* Additional mobile fixes */
@supports (-webkit-touch-callout: none) {
  html, body {
    background: linear-gradient(135deg, #1e3a8a, #7c3aed, #000000) !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
  }
}
