.blur-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.glass-effect {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.85);
  overflow: hidden;
  will-change: transform;
}

.glass-effect::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0% 0%, rgba(56,189,248,0.12), transparent 55%),
    radial-gradient(circle at 100% 20%, rgba(192,132,252,0.16), transparent 60%),
    radial-gradient(circle at 0% 100%, rgba(45,212,191,0.16), transparent 55%);
  opacity: 0.8;
  mix-blend-mode: screen;
  pointer-events: none;
}

.glass-effect::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(148,163,184,0.55);
  border-left: 1px solid rgba(148,163,184,0.35);
  border-radius: inherit;
  pointer-events: none;
}

html.dark .glass-effect {
  background: rgba(31, 41, 55, 0.7);
}

html:not(.dark) .glass-effect {
  background: rgba(229, 231, 235, 0.7);
}

.code-block {
  position: relative;
  font-family: 'Monaco', 'Consolas', 'Fira Code', 'Courier New', monospace;
  min-height: 160px;
  margin-bottom: 1rem;
  overflow: hidden;
  background: #1e1e1e;
  border-radius: 8px;
  border: 1px solid #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: codeBlockGlow 8s ease-in-out infinite;
}

html:not(.dark) .code-block {
  background: #f8f9fa;
  border-color: #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: codeBlockGlowLight 6s ease-in-out infinite;
}

@keyframes codeBlockGlow {
  0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 4px 16px rgba(86, 156, 214, 0.2); }
}

@keyframes codeBlockGlowLight {
  0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
  50% { box-shadow: 0 4px 16px rgba(0, 0, 255, 0.1); }
}



.code-block pre {
  margin: 0;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  tab-size: 2;
  overflow: hidden;
  background: transparent;
  color: inherit;
  white-space: pre-wrap;
  word-wrap: break-word;
  animation: codeReveal 2s ease-out;
}

html.dark .code-block pre {
  color: #d4d4d4;
}

html:not(.dark) .code-block pre {
  color: #24292e;
}

@keyframes codeReveal {
  0% { 
    opacity: 0;
    transform: translateY(10px);
  }
  100% { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* IDE Header with animations */
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, rgba(15,23,42,0.9), rgba(30,64,175,0.55));
  border-bottom: 1px solid rgba(148,163,184,0.45);
  border-radius: 8px 8px 0 0;
  animation: headerShimmer 12s linear infinite;
}

html:not(.dark) .code-header {
  background: rgba(0, 0, 0, 0.05);
  border-bottom-color: rgba(0, 0, 0, 0.1);
  animation: headerShimmerLight 6s linear infinite;
}

.code-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
}

.dot {
  animation: dotBounce 2s ease-in-out infinite;
}

.dot:hover {
  transform: scale(1.1);
}

.dot.red { animation-delay: 0s; }
.dot.yellow { animation-delay: 0.3s; }
.dot.green { animation-delay: 0.6s; }

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

.dot.red {
  background: #ff5f56;
  box-shadow: 0 0 8px rgba(255, 95, 86, 0.4);
  animation: redDotPulse 3s ease-in-out infinite;
}

.dot.yellow {
  background: #ffbd2e;
  box-shadow: 0 0 8px rgba(255, 189, 46, 0.4);
  animation: yellowDotPulse 3s ease-in-out infinite 0.5s;
}

.dot.green {
  background: #27c93f;
  box-shadow: 0 0 8px rgba(39, 201, 63, 0.4);
  animation: greenDotPulse 3s ease-in-out infinite 1s;
}

.code-filename {
  font-size: 0.8rem;
  color: #888;
  font-family: inherit;
  font-weight: 500;
  animation: filenameFade 3s ease-in-out infinite;
}

html.dark .code-filename {
  color: #858585;
  text-shadow: 0 0 4px rgba(133, 133, 133, 0.3);
}

html:not(.dark) .code-filename {
  color: #6e7681;
  text-shadow: 0 0 4px rgba(110, 118, 129, 0.2);
}

@keyframes filenameFade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes headerShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes headerShimmerLight {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes redDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes yellowDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes greenDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes filenameTyping {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}



/* Dark Theme - Enhanced VS Code Dark with animations */
html.dark .token.keyword {
  color: #569cd6 !important;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(86, 156, 214, 0.3);
  animation: keywordGlow 2s ease-in-out infinite alternate;
}

html.dark .token.string {
  color: #ce9178 !important;
  text-shadow: 0 0 6px rgba(206, 145, 120, 0.3);
  animation: stringPulse 3s ease-in-out infinite;
}

html.dark .token.property {
  color: #9cdcfe !important;
  text-shadow: 0 0 5px rgba(156, 220, 254, 0.2);
  animation: propertyShimmer 4s linear infinite;
}

html.dark .token.operator {
  color: #d4d4d4 !important;
  animation: operatorBlink 5s ease-in-out infinite;
}

html.dark .token.punctuation {
  color: #d4d4d4 !important;
  opacity: 0.8;
  animation: punctuationFade 3s ease-in-out infinite;
}

html.dark .token.number {
  color: #b5cea8 !important;
  text-shadow: 0 0 6px rgba(181, 206, 168, 0.4);
  animation: numberGlow 2.5s ease-in-out infinite alternate;
}

html.dark .token.comment {
  color: #6a9955 !important;
  font-style: italic;
  opacity: 0.7;
  animation: commentWave 4s ease-in-out infinite;
}

html.dark .token.function {
  color: #dcdcaa !important;
  text-shadow: 0 0 8px rgba(220, 220, 170, 0.3);
  animation: functionHighlight 3s ease-in-out infinite alternate;
}

html.dark .token.boolean {
  color: #569cd6 !important;
  text-shadow: 0 0 6px rgba(86, 156, 214, 0.4);
  animation: booleanPulse 2s ease-in-out infinite;
}

html.dark .token.null {
  color: #569cd6 !important;
  text-shadow: 0 0 6px rgba(86, 156, 214, 0.4);
  animation: nullGlow 3s ease-in-out infinite alternate;
}

html.dark .token.undefined {
  color: #569cd6 !important;
  text-shadow: 0 0 6px rgba(86, 156, 214, 0.4);
  animation: undefinedFade 2.5s ease-in-out infinite;
}

/* Light Theme - Enhanced VS Code Light with animations */
html:not(.dark) .token.keyword {
  color: #0000ff !important;
  font-weight: 500;
  text-shadow: 0 0 6px rgba(0, 0, 255, 0.2);
  animation: lightKeywordGlow 3s ease-in-out infinite alternate;
}

html:not(.dark) .token.string {
  color: #a31515 !important;
  text-shadow: 0 0 4px rgba(163, 21, 21, 0.2);
  animation: lightStringWave 2.5s ease-in-out infinite;
}

html:not(.dark) .token.property {
  color: #001080 !important;
  text-shadow: 0 0 4px rgba(0, 16, 128, 0.2);
  animation: lightPropertyFloat 4s ease-in-out infinite;
}

html:not(.dark) .token.operator {
  color: #000000 !important;
  animation: lightOperatorSpin 6s linear infinite;
}

html:not(.dark) .token.punctuation {
  color: #000000 !important;
  opacity: 0.6;
  animation: lightPunctuationBounce 3s ease-in-out infinite;
}

html:not(.dark) .token.number {
  color: #098658 !important;
  text-shadow: 0 0 5px rgba(9, 134, 88, 0.3);
  animation: lightNumberPulse 2s ease-in-out infinite;
}

html:not(.dark) .token.comment {
  color: #008000 !important;
  font-style: italic;
  opacity: 0.6;
  animation: lightCommentFade 4s ease-in-out infinite;
}

html:not(.dark) .token.function {
  color: #795e26 !important;
  text-shadow: 0 0 5px rgba(121, 94, 38, 0.2);
  animation: lightFunctionDance 3.5s ease-in-out infinite alternate;
}

html:not(.dark) .token.boolean {
  color: #0000ff !important;
  text-shadow: 0 0 4px rgba(0, 0, 255, 0.3);
  animation: lightBooleanFlash 2.5s ease-in-out infinite;
}

html:not(.dark) .token.null {
  color: #0000ff !important;
  text-shadow: 0 0 4px rgba(0, 0, 255, 0.3);
  animation: lightNullShimmer 3s ease-in-out infinite;
}

html:not(.dark) .token.undefined {
  color: #0000ff !important;
  text-shadow: 0 0 4px rgba(0, 0, 255, 0.3);
  animation: lightUndefinedBlink 2.8s ease-in-out infinite;
}

/* Additional tokens for better coverage */
html.dark .token.regex {
  color: #d16969 !important;
}

html.dark .token.important {
  color: #569cd6 !important;
  font-weight: bold;
}

html.dark .token.variable {
  color: #9cdcfe !important;
}

html.dark .token.class-name {
  color: #4ec9b0 !important;
}

html:not(.dark) .token.regex {
  color: #d16969 !important;
}

html:not(.dark) .token.important {
  color: #0000ff !important;
  font-weight: bold;
}

html:not(.dark) .token.variable {
  color: #001080 !important;
}

html:not(.dark) .token.class-name {
  color: #267f99 !important;
}

/* Dark Theme Animations */
@keyframes keywordGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

@keyframes stringPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes propertyShimmer {
  0% { transform: translateX(0); }
  100% { transform: translateX(2px); }
}

@keyframes operatorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes punctuationFade {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}

@keyframes numberGlow {
  0% { filter: brightness(1) hue-rotate(0deg); }
  100% { filter: brightness(1.3) hue-rotate(10deg); }
}

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

@keyframes functionHighlight {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2) saturate(1.2); }
}

@keyframes booleanPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes nullGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.15); }
}

@keyframes undefinedFade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Light Theme Animations */
@keyframes lightKeywordGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.1); }
}

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

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

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

@keyframes lightPunctuationBounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-1px); }
  75% { transform: translateY(1px); }
}

@keyframes lightNumberPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes lightCommentFade {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.3; }
}

@keyframes lightFunctionDance {
  0% { transform: translateX(0); }
  100% { transform: translateX(1px); }
}

@keyframes lightBooleanFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes lightNullShimmer {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

@keyframes lightUndefinedBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}


.code-block .copy-button {
  right: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

html.dark .code-block .copy-button {
  background: rgba(255, 255, 255, 0.1);
  color: #d4d4d4;
  border-color: rgba(255, 255, 255, 0.2);
}

html:not(.dark) .code-block .copy-button {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
  border-color: rgba(0, 0, 0, 0.1);
}

.code-block .copy-button {
  animation: copyButtonFloat 4s ease-in-out infinite;
}

.code-block .copy-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

html.dark .code-block .copy-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

html:not(.dark) .code-block .copy-button:hover {
  background: rgba(0, 0, 0, 0.1);
}

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

.run-button {
  right: 86px;
  background: rgba(67, 181, 129, 0.2);
  color: #43b581;
  border-color: rgba(67, 181, 129, 0.3);
}

html.dark .run-button {
  background: rgba(67, 181, 129, 0.15);
  color: #4ade80;
  border-color: rgba(67, 181, 129, 0.25);
}

html:not(.dark) .run-button {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.2);
}

.run-button {
  animation: runButtonPulse 3s ease-in-out infinite;
}

.run-button:hover {
  background: rgba(67, 181, 129, 0.3);
  transform: scale(1.05);
}

html.dark .run-button:hover {
  background: rgba(67, 181, 129, 0.25);
}

html:not(.dark) .run-button:hover {
  background: rgba(34, 197, 94, 0.15);
}

@keyframes runButtonPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.copied-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 18px;
  background: #43b581;
  color: #fff;
  border-radius: 6px;
  transform: translateY(100px);
  transition: transform 0.3s;
  font-size: 1rem;
}

.copied-toast.show {
  transform: translateY(0);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3em;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(15,23,42,0.8);
  border: 1px solid rgba(148,163,184,0.38);
}


.social-icon {
  will-change: transform;
}

.social-icon:hover {
  transform: translateY(-5px) scale(1.15);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-icon.facebook:hover {
  background: #1877f2;
  color: white !important;
}

.social-icon.discord:hover {
  background: #7289da;
  color: white !important;
}

.social-icon.github:hover {
  background: #333;
  color: white !important;
}

.not-found {
  display: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #111827 60%, #1f2937 100%);
  color: #fff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  animation: fadeIn 0.5s;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.not-found.show {
  display: flex;
}

.not-found h1 {
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 1.2rem;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px #000;
}

.not-found p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: #e5e7eb;
}

.not-found button {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  padding: 0.9rem 2.2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.2s, transform 0.2s;
}

.not-found button:hover {
  background: #43b581;
  color: #fff;
  transform: scale(1.07);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.touch-me-btn {
  display: none;
}

html.dark .touch-me-btn,
html:not(.dark) .touch-me-btn,
.touch-me-btn:hover {
  display: none;
}

.console-output {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.72);
  color: #43b581;
  padding: 1rem 1.25rem;
  font-family: 'Consolas', monospace;
  transform: translateY(100%);
  transition: transform 0.3s;
  z-index: 1000;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.console-output.show {
  transform: translateY(0);
}

.console-line {
  margin: 0.2rem 0;
  opacity: 0;
  transform: translateY(10px);
  animation: slideFadeIn 0.3s forwards;
}

@keyframes slideFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.discord-status {
  width: 100%;
  max-width: 320px;
  margin: 0.5rem auto;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
}

html.dark .discord-status {
  background: rgba(31, 41, 55, 0.7);
}

html:not(.dark) .discord-status {
  background: rgba(229, 231, 235, 0.7);
}

#lanyardBadge {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0.5rem 0;
}

#lanyardBadge {
  will-change: transform;
}

#lanyardBadge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.discord-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  position: relative;
}

.discord-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.discord-info {
  flex: 1;
  text-align: center;
}

.discord-activity {
  font-size: 0.85rem;
  color: #b9bbbe;
  margin-top: 0.25rem;
}

.game-icon {
  width: 16px;
  height: 16px;
  margin-right: 0.25rem;
  vertical-align: middle;
}

* {
  -webkit-tap-highlight-color: transparent;
}

img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

@media (max-width: 768px) {
  #tsparticles {
    display: none;
  }
  
  .code-block {
    font-size: 0.9rem;
    min-height: 120px;
  }

  .run-button,
  .copy-button {
    font-size: 1rem;
    width: 80px;
    padding: 8px 12px;
  }

  .run-button {
    right: 92px;
  }

  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1em;
  }

  .discord-status {
    max-width: 240px;
    padding: 0.5rem;
  }

  #lanyardBadge {
    max-width: 220px;
  }
}

@media (max-width: 480px) {
  .code-block {
    font-size: 0.85rem;
    min-height: 90px;
    margin: 0 -0.5rem;
  }

  .run-button,
  .copy-button {
    width: 70px;
    font-size: 0.95rem;
    padding: 7px 10px;
  }

  /* Sửa vị trí để không bị chồng lên nhau */
  .run-button {
    right: 90px; /* tăng khoảng cách so với .copy-button */
  }

  .copy-button {
    right: 8px;
  }

  .social-icon {
    width: 36px;
    height: 36px;
    font-size: 1em;
  }

  .discord-status {
    max-width: 180px;
    padding: 0.4rem;
  }

  #lanyardBadge {
    max-width: 200px;
  }

  .glass-effect {
    margin: 0.5rem;
  }
}

/* Mobile portrait */
@media (max-width: 480px) and (orientation: portrait) {
  body {
    font-size: 15px;
    padding: 0;
  }
  .glass-effect {
    margin: 0.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px 0 rgba(31,38,135,0.25);
  }
  .code-block {
    font-size: 0.85rem;
    min-height: 90px;
    margin: 0 -0.5rem 1rem -0.5rem;
    padding: 0.7rem;
    border-radius: 0.7rem;
  }
  .run-button, .copy-button {
    width: 65px;
    font-size: 0.95rem;
    padding: 7px 8px;
    border-radius: 5px;
  }
  .run-button { right: 90px; }
  .copy-button { right: 8px; }
  .social-icon {
    width: 34px;
    height: 34px;
    font-size: 1em;
    margin: 0 2px;
  }
  .discord-status {
    max-width: 160px;
    padding: 0.3rem;
    font-size: 0.9em;
  }

  #lanyardBadge {
    max-width: 180px;
  }
  .not-found {
    padding: 0 1rem;
    font-size: 1.1em;
    align-items: center;
    justify-content: center;
  }
  .not-found h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
  }
  .not-found p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
  .not-found button {
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
    border-radius: 0.7rem;
  }
}

/* Mobile landscape */
@media (max-width: 700px) and (orientation: landscape) {
body {
	font-size: 14px;
	padding: 0;
}
	  .glass-effect {
	    margin: 0.5rem;
	    border-radius: 0.7rem;
	    box-shadow: 0 2px 8px 0 rgba(31,38,135,0.18);
	  }

  body{
    background: radial-gradient(circle at 0% 0%, #020617 0, #020617 25%, #020617 60%, #000 100%);
  }

.chrome-orb{
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 9999px;
  mix-blend-mode: screen;
  opacity: 0.8;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9) 0%, rgba(150,150,150,0.5) 20%, rgba(50,50,50,0.8) 50%, rgba(0,0,0,1) 100%);
  box-shadow:
    inset -20px -20px 50px rgba(255,255,255,0.2),
    0 0 50px rgba(255,255,255,0.1);
  filter: blur(2px);
}

@media (min-width: 768px){
  .chrome-orb{
    width: 26rem;
    height: 26rem;
  }
}

.metal-ring{
  position: absolute;
  width: 37.5rem; /* ~600px */
  height: 37.5rem;
  border-radius: 9999px;
  border-width: 3.75rem; /* ~60px */
  border-style: solid;
  border-color: #333;
  box-shadow:
    inset 10px 10px 40px rgba(255,255,255,0.4),
    inset -10px -10px 40px rgba(0,0,0,0.8),
    10px 10px 40px rgba(0,0,0,0.5);
  filter: blur(4px);
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
}

  .avatar-pulse{
    box-shadow: 0 0 0 0 rgba(52,211,153,0.55);
    animation: avatarPulse 2.4s ease-out infinite;
  }

  @keyframes avatarPulse{
    0%{ box-shadow:0 0 0 0 rgba(52,211,153,0.6); transform:translateZ(0); }
    70%{ box-shadow:0 0 0 18px rgba(52,211,153,0); }
    100%{ box-shadow:0 0 0 0 rgba(52,211,153,0); }
  }

  .glass-effect{
    background: linear-gradient(135deg, rgba(15,23,42,0.94), rgba(30,64,175,0.8));
    border-color: rgba(148,163,184,0.45);
  }

  html:not(.dark) .glass-effect{
    background: linear-gradient(145deg, rgba(15,23,42,0.08), rgba(15,23,42,0.18));
    border-color: rgba(15,23,42,0.12);
  }

  .social-icon{
    border: 1px solid rgba(148,163,184,0.35);
  }

  .code-block {
    font-size: 0.8rem;
    min-height: 70px;
    margin: 0 -0.3rem 1rem -0.3rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
  }
  .run-button, .copy-button {
    width: 60px;
    font-size: 0.9rem;
    padding: 6px 6px;
    border-radius: 4px;
  }
  .run-button { right: 80px; }
  .copy-button { right: 8px; }
  .social-icon {
    width: 30px;
    height: 30px;
    font-size: 0.95em;
    margin: 0 1px;
  }
  .discord-status {
    max-width: 120px;
    padding: 0.2rem;
    font-size: 0.85em;
  }

  #lanyardBadge {
    max-width: 150px;
  }
  .not-found {
    padding: 0 0.5rem;
    font-size: 1em;
    align-items: center;
    justify-content: center;
  }
  .not-found h1 {
    font-size: 2.2rem;
    margin-bottom: 0.7rem;
  }
  .not-found p {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  .not-found button {
    font-size: 0.95rem;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
  }
}




/* =========================================================
   Fluent + Glass: Centered Code Header + Responsive Actions
   (Fix "chưa canh giữa")
   ========================================================= */

.code-header{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  /* giữ "bar" giống cửa sổ macOS */
  padding: 0.55rem 0.75rem;
}

.code-filename{
  justify-self: center;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.2px;
  opacity: 0.92;
  user-select: none;
}

/* vùng nút hành động bên phải để title thật sự ở giữa */
.code-actions{
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* reset absolute button cũ (tránh lệch/không canh giữa) */
.code-header .run-button,
.code-header .code-block .copy-button,
.code-header .copy-button{
  position: static;
  top: auto;
  right: auto;
  left: auto;
  transform: none;
  animation: none;
}

/* chuẩn hoá nút theo Fluent/Glass */
.code-btn{
  position: relative;
  height: 32px;
  padding: 0 10px;
  width: auto;
  border-radius: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;

  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);

  border: 1px solid rgba(148,163,184,0.45);
  box-shadow: 0 6px 18px rgba(15,23,42,0.75);

  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.code-btn.reveal::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--reveal-x, 50%) var(--reveal-y, 50%), rgba(148,163,184,0.7), transparent 55%);
  mix-blend-mode: screen;
  opacity: var(--reveal-opacity, 0);
  pointer-events: none;
  transition: opacity 120ms ease-out;
}

.code-btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(86,156,214,0.35),
    0 6px 18px rgba(0,0,0,0.18);
}

/* hover/press micro-interaction (Fluent-ish) */
.code-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  border-color: rgba(255,255,255,0.24);
}

.code-btn:active{
  transform: translateY(0px) scale(0.99);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.code-btn .label{
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
}

/* thu gọn label trên màn hình rất nhỏ */
@media (max-width: 420px){
  .code-btn{
    width: 36px;
    padding: 0;
    border-radius: 12px;
  }
  .code-btn .label{
    display: none;
  }
}

/* nới container cho desktop lớn (đỡ "lọt thỏm") */
@media (min-width: 1024px){
  .glass-effect{
    max-width: 72rem;
  }
}

/* tắt motion nếu user yêu cầu */
@media (prefers-reduced-motion: reduce){
  .code-btn,
  .glass-effect{
    transition: none !important;
  }
}
