* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #0a0a0a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(88, 101, 242, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(88, 101, 242, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.card {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  /* Prevent 3D transform issues on mobile */
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover .card-glow {
    opacity: 1;
  }

  .card:hover .avatar {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(88, 101, 242, 0.4);
    transform: scale(1.05);
  }
}

.card-content {
  position: relative;
  z-index: 1;
}

.profile-section {
  text-align: center;
  margin-bottom: 32px;
}

.avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(88, 101, 242, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
  /* Better mobile rendering */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.name {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  word-wrap: break-word;
  line-height: 1.2;
}

.subtitle {
  font-size: 15px;
  color: #888888;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin-bottom: 28px;
}

.social-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.discord-button,
.whatsapp-button,
.youtube-button,
.instagram-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  text-decoration: none;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  /* Better mobile performance */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  cursor: pointer;
}

.discord-button {
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.whatsapp-button {
  background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.youtube-button {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Fixed Instagram gradient with proper purple-to-orange colors */
.instagram-button {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(131, 58, 180, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.discord-button::before,
.whatsapp-button::before,
.youtube-button::before,
.instagram-button::before {
  content: "";
  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;
}

@media (hover: hover) and (pointer: fine) {
  .discord-button:hover::before,
  .whatsapp-button:hover::before,
  .youtube-button:hover::before,
  .instagram-button:hover::before {
    left: 100%;
  }

  .discord-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  }

  .whatsapp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  }

  .youtube-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  }

  .instagram-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(131, 58, 180, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  }

  .discord-button:hover .arrow,
  .whatsapp-button:hover .arrow,
  .youtube-button:hover .arrow,
  .instagram-button:hover .arrow {
    transform: translateX(4px);
  }
}

.discord-button:active,
.whatsapp-button:active,
.youtube-button:active,
.instagram-button:active {
  transform: scale(0.98);
}

.discord-logo,
.whatsapp-logo,
.youtube-logo,
.instagram-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* Enhanced tablet responsiveness */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  .card {
    padding: 36px 28px;
  }
}

/* Improved mobile responsiveness for standard phones */
@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .card {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .profile-section {
    margin-bottom: 28px;
  }

  .avatar {
    width: 90px;
    height: 90px;
    margin-bottom: 16px;
  }

  .name {
    font-size: 24px;
  }

  .subtitle {
    font-size: 14px;
  }

  .social-section {
    gap: 12px;
  }

  .discord-button,
  .whatsapp-button,
  .youtube-button,
  .instagram-button {
    padding: 14px 20px;
    font-size: 14px;
    border-radius: 12px;
  }

  .discord-logo,
  .whatsapp-logo,
  .youtube-logo,
  .instagram-logo {
    width: 22px;
    height: 22px;
  }

  .arrow {
    width: 18px;
    height: 18px;
  }
}

/* Extra small screens optimization for older/smaller phones */
@media (max-width: 360px) {
  body {
    padding: 12px;
  }

  .card {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .profile-section {
    margin-bottom: 24px;
  }

  .avatar {
    width: 80px;
    height: 80px;
    margin-bottom: 14px;
  }

  .name {
    font-size: 22px;
  }

  .subtitle {
    font-size: 13px;
  }

  .divider {
    margin-bottom: 24px;
  }

  .social-section {
    gap: 10px;
  }

  .discord-button,
  .whatsapp-button,
  .youtube-button,
  .instagram-button {
    padding: 12px 16px;
    font-size: 13px;
    border-radius: 10px;
  }

  .discord-logo,
  .whatsapp-logo,
  .youtube-logo,
  .instagram-logo {
    width: 20px;
    height: 20px;
  }

  .arrow {
    width: 16px;
    height: 16px;
  }
}

/* Landscape mode for mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
  body {
    padding: 12px;
  }

  .card {
    padding: 24px 28px;
  }

  .profile-section {
    margin-bottom: 20px;
  }

  .avatar {
    width: 70px;
    height: 70px;
    margin-bottom: 12px;
  }

  .name {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .subtitle {
    font-size: 13px;
  }

  .divider {
    margin-bottom: 20px;
  }

  .social-section {
    gap: 10px;
  }

  .discord-button,
  .whatsapp-button,
  .youtube-button,
  .instagram-button {
    padding: 12px 18px;
    font-size: 14px;
  }
}
