:root {
  --primary-hue: 190; 
  --primary-saturation: 75%;
  --primary-lightness: 65%;

  --primary-color: hsl(var(--primary-hue), var(--primary-saturation), var(--primary-lightness));
  --primary-light: hsl(var(--primary-hue), var(--primary-saturation), 75%);
  --primary-dark: hsl(var(--primary-hue), var(--primary-saturation), 45%);

  --accent-color: hsl(calc(var(--primary-hue) + 60), 80%, 60%);
  --background-dark: hsl(var(--primary-hue), 20%, 8%);
  --surface-color: hsla(var(--primary-hue), 70%, 60%, 0.1);
  --text-primary: hsl(0, 0%, 95%);
  --text-secondary: hsl(0, 0%, 70%);

  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;

  --shadow-sm: 0 2px 8px hsla(var(--primary-hue), 50%, 10%, 0.3);
  --shadow-md: 0 8px 32px hsla(var(--primary-hue), 50%, 10%, 0.4);
  --shadow-lg: 0 16px 64px hsla(var(--primary-hue), 50%, 10%, 0.5);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--background-dark);
  overflow: hidden;
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
}

.background-gif {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: -3;
  background-image: url("background.gif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.dynamic-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    hsla(var(--primary-hue), 60%, 20%, 0.3) 0%,
    hsla(calc(var(--primary-hue) + 30), 50%, 15%, 0.4) 50%,
    hsla(calc(var(--primary-hue) - 30), 70%, 10%, 0.5) 100%
  );
  z-index: -2;
  animation: colorShift 8s ease-in-out infinite;
}

@keyframes colorShift {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px) saturate(1.2);
  z-index: -1;
}

.dark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    hsla(var(--primary-hue), 30%, 5%, 0.4) 70%,
    hsla(var(--primary-hue), 40%, 3%, 0.8) 100%
  );
  z-index: 0;
}

#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, rgba(0, 255, 255, 0.01) 100%);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#intro-overlay.zoom-out {
  opacity: 0;
  transform: scale(1.1);
  filter: blur(10px);
}

.intro-content {
  text-align: center;
  animation: introFloat 3s ease-in-out infinite;
}

@keyframes introFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.intro-logo {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
}

.logo-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: logoRotate 4s linear infinite;
}

.logo-ring::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--accent-color);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 20px var(--accent-color);
}

@keyframes logoRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.logo-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  text-shadow: 0 0 30px var(--primary-color);
}

#continue-text {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-shadow: 0 0 20px var(--primary-color);
  transition: all var(--transition-smooth);
}

#continue-text:hover {
  transform: scale(1.05);
  color: var(--primary-light);
}

.intro-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.volume-control {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  border: 1px solid hsla(var(--primary-hue), 0%, 30%, 0.1);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  width: 45px;
  overflow: hidden;
}

.volume-control:hover {
  width: 200px;
  background: hsla(var(--primary-hue), 70%, 50%, 0.2);
}

.volume-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-toggle:hover {
  background: hsla(var(--primary-hue), 100%, 100%, 1);
  transform: scale(1.1);
}

.volume-icon {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
  transition: all var(--transition-fast);
}

.volume-toggle.mute .volume-icon {
  color: #ff6b6b;
}

.volume-slider-container {
  position: relative;
  top: -0.2rem;
  margin-left: 1rem;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.volume-control:hover .volume-slider-container {
  opacity: 1;
}

#volume {
  width: 100px;
  height: 4px;
  background: hsla(var(--primary-hue), 30%, 30%, 0.5);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#volume::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-color);
  transition: all var(--transition-fast);
}

#volume::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.container {
  width: min(90vw, 500px);
  background: var(--surface-color);
  backdrop-filter: blur(15px) saturate(1.5);
  border: 1px solid hsla(var(--primary-hue), 50%, 50%, 0.2);
  border-radius: var(--border-radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 10;
  animation: containerFloat 6s ease-in-out infinite;
  opacity: 0;
  transform: scale(0.8) translateY(50px);
  transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.container.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@keyframes containerFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-5px) rotate(0.5deg);
  }
  66% {
    transform: translateY(5px) rotate(-0.5deg);
  }
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.6;
  animation: particleFloat 8s linear infinite;
}

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
}
.particle:nth-child(2) {
  left: 30%;
  animation-delay: 2s;
}
.particle:nth-child(3) {
  left: 50%;
  animation-delay: 4s;
}
.particle:nth-child(4) {
  left: 70%;
  animation-delay: 6s;
}
.particle:nth-child(5) {
  left: 90%;
  animation-delay: 1s;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
    transform: scale(1);
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) scale(0);
    opacity: 0;
  }
}

.eye-container {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-smooth);
}

.eye {
  width: 40px;
  height: 40px;
  background: var(--surface-color);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px hsla(var(--primary-hue), 80%, 60%, 0.3);
  transition: all var(--transition-smooth);
}

.eye:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px hsla(var(--primary-hue), 80%, 60%, 0.5);
}

.pupil {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 30% 30%, var(--primary-light), var(--primary-dark));
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all var(--transition-fast);
}

.eye-shine {
  position: absolute;
  top: 25%;
  left: 35%;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0);
  border-radius: 50%;
  opacity: 0.8;
}

.view-counter {
  background: var(--surface-color);
  backdrop-filter: blur(10px);
  border: 1px solid hsla(var(--primary-hue), 50%, 50%, 0.2);
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-smooth);
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.eye-container:hover .view-counter {
  opacity: 1;
  transform: translateX(0);
}

.view-icon {
  font-size: 1rem;
}

.profile-section {
  margin-bottom: 2rem;
}

.profile-image-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
}

.profile-image-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 30px hsla(var(--primary-hue), 80%, 60%, 0.4);
  transition: all var(--transition-smooth);
}

.profile-image-container:hover img {
  transform: scale(1.05);
  box-shadow: 0 0 40px hsla(var(--primary-hue), 80%, 60%, 0.6);
}

.profile-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color)) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: ringRotate 3s linear infinite;
  
}

@keyframes ringRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.profile-name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  transition: all var(--transition-smooth);
}

.profile-name:hover {
  transform: scale(1.05);
}

.description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
  transition: all var(--transition-smooth);
}

.description:hover {
  color: var(--primary-light);
  transform: scale(1.02);
}

#typewriter {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: 2rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#typewriter::after {
  content: "|";
  color: var(--primary-color);
  animation: cursorBlink 1s infinite;
  margin-left: 2px;
}

@keyframes cursorBlink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.social-link {
  text-decoration: none;
  transition: all var(--transition-smooth);
  transform: translateY(0);
}

.social-icon-wrapper {
  width: 60px;
  height: 60px;
  background: var(--surface-color);
  border: 1px solid hsla(var(--primary-hue), 10%, 50%, 0.1%);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.social-icon-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  opacity: 0.1;
  transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.social-link:hover {
  transform: translateY(-8px) scale(1.05);
}

.social-link:hover .social-icon-wrapper {
  background: hsla(var(--primary-hue), 50%, 20%, 0.4);
  border-color: var(--primary-color);
  box-shadow: 0 15px 40px hsla(var(--primary-hue), 80%, 60%, 0.4);
}

.social-link:hover .social-icon-wrapper::before {
  left: 100%;
}

.social-icon-wrapper svg {
  transition: all var(--transition-fast);
  width: 24px;
  height: 24px;
}

.social-link:hover .social-icon-wrapper svg {
  color: var(--primary-light);
  transform: scale(1.2) rotate(5deg);
}

.social-link:active {
  transform: translateY(-4px) scale(1.02);
}

.discord-status-card {
  background: var(--surface-color);
  border: 1px solid hsla(var(--primary-hue), 50%, 50%, 0.2);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discord-status-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.status-loading {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid hsla(var(--primary-hue), 50%, 50%, 0.2);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.discord-avatar-container {
  display: flex;
  position: relative;
}

.discord-avatar-decoration {
  position: absolute;
  left: -6%;
  top: -5%;
  width: 112%;
  pointer-events: none;
  z-index: 9999;
}

.discord-avatar-main {
  border-radius: 50%;
  height: 100px;
  width: 100px;
  object-fit: cover;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 20px hsla(var(--primary-hue), 80%, 60%, 0.3);
  transition: all var(--transition-smooth);
}

.discord-avatar {
  position: relative;
  display: inline-block;
}

.avatar-container {
  position: relative;
  display: inline-block;
}

.discord-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 15px hsla(var(--primary-hue), 80%, 60%, 0.3);
  transition: all var(--transition-smooth);
}

.discord-avatar img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px hsla(var(--primary-hue), 80%, 60%, 0.5);
}

.status-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: absolute;
  bottom: 2px;
  right: 2px;
  border: 2px solid var(--surface-color);
  z-index: 102222222222222222222222222222222222222;
}

.status-text {
  color: var(--text-primary);
  font-size: 1.1rem;
}

.status-text p {
  margin: 0.25rem 0;
}

.status-label {
  font-weight: 600;
  color: var(--primary-color);
}

.status-label.offline {
  color: #ff6b6b;
}

#time-played-value {
  color: #48e496;
  font-family: var(--font-mono);
  font-weight: 500;
}

.game-avatar img {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 15px hsla(var(--primary-hue), 80%, 60%, 0.3);
  transition: all var(--transition-smooth);
}

.game-avatar img:hover {
  transform: scale(1.1);
}

/* ============= RESPONSIVE DESIGN ============= */

/* Tablet & Mobile (dưới 768px) */
@media (max-width: 768px) {
  .container {
    width: 95vw;
    padding: 2rem 1.5rem;
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }

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

  .social-icons {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .social-icon-wrapper {
    width: 50px;
    height: 50px;
  }

  .volume-control {
    top: 1rem;
    left: 1rem;
    width: 50px;
    border-radius: 50%;
  }

  .volume-control:hover {
    width: 50px;
    background: var(--surface-color);
  }

  .volume-slider-container {
    display: none;
  }

  .eye-container {
    top: 1rem;
    left: 1rem;
    gap: 0.5rem;
  }

  #continue-text {
    font-size: 2rem;
  }

  .intro-logo {
    width: 80px;
    height: 80px;
  }

  .logo-center {
    font-size: 2rem;
  }

  .discord-status-card {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .discord-avatar-main {
    width: 80px;
    height: 80px;
  }

  .status-circle {
    width: 18px;
    height: 18px;
    bottom: 0;
    right: 0;
  }

  .game-avatar img {
    width: 40px;
    height: 40px;
  }
}

/* Mobile nhỏ (dưới 480px) */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
    margin: 0.5rem;
    width: calc(100vw - 1rem);
  }

  .profile-image-container {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
  }

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

  .description, .ussr-text {
    font-size: 1rem;
  }

  #typewriter {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .social-icon-wrapper {
    width: 45px;
    height: 45px;
  }

  .social-icon-wrapper svg {
    width: 20px;
    height: 20px;
  }

  .discord-status-card {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .status-text {
    font-size: 0.9rem;
  }

  #continue-text {
    font-size: 1.8rem;
  }

  .intro-subtitle {
    font-size: 0.9rem;
  }
}

/* iPad / Tablet dọc */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  .container {
    width: 80vw;
    max-width: 600px;
  }

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

  .social-icon-wrapper {
    width: 55px;
    height: 55px;
  }
}

/* iPad ngang */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
  .container {
    width: 70vw;
    max-width: 700px;
  }
}

/* Màn hình nhỏ chiều cao (landscape mobile) */
@media (max-height: 600px) and (orientation: landscape) {
  .container {
    max-height: 90vh;
    padding: 1rem;
    overflow-y: auto;
  }

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

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

  .social-icons {
    gap: 0.75rem;
  }

  .social-icon-wrapper {
    width: 40px;
    height: 40px;
  }

  .discord-status-card {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .container {
    max-height: 85vh;
    padding: 1rem;
  }

  .profile-image-container {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
  }

  .profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .social-icons {
    margin-bottom: 1rem;
  }

  .discord-status-card {
    padding: 0.75rem;
  }
}

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

@media (prefers-color-scheme: light) {
  :root {
    --background-dark: hsl(var(--primary-hue), 20%, 95%);
    --surface-color: hsla(var(--primary-hue), 30%, 90%, 0.9);
    --text-primary: hsl(0, 0%, 10%);
    --text-secondary: hsl(0, 0%, 40%);
  }
}

.ussr-text {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 500;
  transition: all var(--transition-smooth);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.ussr-text:hover {
  transform: scale(1.02);
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkleFloat 2s ease-out forwards;
}

@keyframes sparkleFloat {
  0% {
    opacity: 1;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 0.8;
    transform: scale(1) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: scale(0) rotate(360deg);
  }
}