@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700;900&family=Padauk:wght@400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  overflow: hidden;
  background: #000;
  color: #0f0;
  font-family: 'JetBrains Mono', monospace;
  cursor: none;
  height: 100vh;
}

/* Cursor */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid #0f0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px #0f0;
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: #0f0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px #0f0;
}

.snow-particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: #0f0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.8;
  box-shadow: 0 0 6px #0f0;
  animation: fadeSnow 0.8s ease-out forwards;
}

@keyframes fadeSnow {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.3) translateY(10px); }
}

@media (hover: none) {
  .custom-cursor, .cursor-dot { display: none; }
  body { cursor: auto; }
}

/* Enable hover only for devices that support it */
@media (hover: hover) and (pointer: fine) {
  .game-control-btn:hover,
  .cmd-button:hover,
  .nav-arrow:hover,
  .minimap-cell:not(.empty):not(.active):hover,
  .terminal-btn:hover,
  .lang-btn:hover,
  .project-menu-btn:hover,
  .cert-card:hover {
    background: #0f0 !important;
    color: #000 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 0 15px #0f0 !important;
  }

  .nav-arrow:hover {
    background: #0f0 !important;
    color: #000 !important;
    box-shadow: 0 0 18px #0f0 !important;
    transform: scale(1.08) !important;
  }

  .button-group .cmd-button:hover {
    transform: scale(1.05) !important;
  }

  .cert-card:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 8px 30px rgba(0, 255, 0, 0.5) !important;
  }

  .project-menu-btn:hover {
    background: #0f0 !important;
    color: #000 !important;
    transform: translateX(5px) !important;
  }

  .lang-btn:hover {
    background: #0f0 !important;
    color: #000 !important;
    transform: scale(1.1) !important;
  }
}

/* Disable hover only for touch devices */
@media (hover: none) and (pointer: coarse) {
  .game-control-btn:hover,
  .cmd-button:hover,
  .nav-arrow:hover,
  .minimap-cell:hover,
  .terminal-btn:hover,
  .lang-btn:hover,
  .project-menu-btn:hover,
  .cert-card:hover {
    background: rgba(0, 255, 0, 0.1) !important;
    color: #0f0 !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Stylish Background - Matrix Rain + 3D */
#canvas-3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  opacity: 0.15;
}

.burmese-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.burmese-word {
  position: absolute;
  font-family: 'Padauk', sans-serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  color: #0f0;
  opacity: 0.08;
  animation: float-word 25s linear infinite;
}

@keyframes float-word {
  0% { transform: translateX(-10%) translateY(0); opacity: 0; }
  10% { opacity: 0.08; }
  90% { opacity: 0.08; }
  100% { transform: translateX(110%) translateY(-50px); opacity: 0; }
}

/* Loading */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

#loading-canvas {
  position: absolute;
  width: 100%;
  height: 100%;
}

.loading-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1rem;
}

.loading-logo {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 900;
  color: #0f0;
  text-shadow: 0 0 30px #0f0;
  margin-bottom: 3rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.lang-btn {
  padding: 1rem 2rem;
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid #0f0;
  color: #0f0;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  cursor: pointer;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.3s;
  margin: 0.5rem;
}

.progress-bar {
  width: clamp(200px, 80vw, 400px);
  height: 4px;
  background: rgba(0, 255, 0, 0.2);
  border: 1px solid #0f0;
  margin: 0 auto;
}

.progress-fill {
  height: 100%;
  background: #0f0;
  width: 0%;
  transition: width 0.3s;
}

/* Sections */
.sections-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 10;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section {
  position: absolute;
  width: 100vw;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-bottom: 0;
}

/* Smooth animation during navigation */
@media (prefers-reduced-motion: no-preference) {
  .sections-container {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }
}

/* Mobile-specific optimization */
@media (max-width: 768px) {
  .sections-container {
    transition: transform 0.3s ease-out !important;
  }
}


#home { top: 0; left: 0; }
#about-exp { top: -100vh; left: 0; }
#contact { top: 0; left: -100vw; }
#certificates { top: 0; left: 100vw; }
#projects { top: 100vh; left: 0; }

#game-1 { top: 100vh; left: -100vw; }
#game-2 { top: 100vh; left: -200vw; }
#game-3 { top: 100vh; left: -300vw; }

#project-1 { top: 100vh; left: 100vw; }
#project-2 { top: 100vh; left: 200vw; }
#project-3 { top: 100vh; left: 300vw; }

/* Terminal */
.terminal-window {
  background: rgba(0, 20, 0, 0.95);
  border: 2px solid #0f0;
  border-radius: 12px;
  max-width: 1000px;
  width: 100%;
  box-shadow: 0 0 40px rgba(0, 255, 0, 0.4);
  height: 100%;
  max-height: calc(80vh - 3rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-bottom: 2px solid #0f0;
  flex-shrink: 0;
}

.terminal-buttons {
  display: flex;
  gap: 5px;
}

.terminal-btn {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.my-name {
  font-size: clamp(3em, 1vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #0f0;
  text-shadow: 
    0 0 10px #0f0,
    0 0 20px #0f0,
    0 0 40px #00ff00,
    0 0 80px rgba(0, 255, 0, 0.5),
    inset 0 0 20px rgba(0, 255, 0, 0.2);
  font-family: 'JetBrains Mono', monospace;
  animation: nameGlow 3s ease-in-out infinite;
  text-transform: uppercase;
  background: linear-gradient(90deg, #0f0, #00ff00, #0f0);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.terminal-btn:nth-child(1) { background: #f00; box-shadow: 0 0 5px #f00; }
.terminal-btn:nth-child(2) { background: #ff0; box-shadow: 0 0 5px #ff0; }
.terminal-btn:nth-child(3) { background: #0f0; box-shadow: 0 0 5px #0f0; }

.terminal-title {
  font-size: 0.75rem;
  color: #0ff;
  text-shadow: 0 0 10px #0ff;
  font-weight: 700;
}

.code-block {
  padding: 0.8rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #0f0;
  overflow-y: hidden;
  flex: 1;
}

#project-1 .code-block,
#project-2 .code-block,
#project-3 .code-block
#certificates {
  overflow-y: auto;
}

.code-block::-webkit-scrollbar {
  width: 5px;
}

.code-block::-webkit-scrollbar-track {
  background: rgba(0, 255, 0, 0.1);
}

.code-block::-webkit-scrollbar-thumb {
  background: #0f0;
  border-radius: 4px;
}

.prompt { color: #0ff; margin-right: 0.5rem; }
.comment { color: rgba(41, 223, 41, 0.916); }
.function { color: #ff0; }
.string { color: #f0f; }
.keyword { color: #0ff; }

.cmd-button {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  margin: 0.3rem 0.3rem 0.3rem 0;
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid #0f0;
  color: #0f0;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1.4; 
}

/* Responsive button group */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.button-group .cmd-button {
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 200px;
  text-align: center;
  transition: all 0.3s;
  padding : 0.6rem 1rem;
}

/* Desktop: 3 buttons in a row */
@media (min-width: 768px) {
  .button-group {
    gap: 1rem;
  }
  
  .button-group .cmd-button {
    min-width: 150px;
    flex: 1 1 calc(33.333% - 1rem);
  }
}

@media (max-width: 767px) and (min-width: 481px) {
  .button-group .cmd-button {
    flex: 1 1 calc(50% - 0.8rem);
    min-width: 140px;
  }
}

/* Mobile: wraps automatically */
@media (max-width: 480px) {
  .button-group {
    gap: 0.6rem;
  }
  
  .button-group .cmd-button {
    min-width: 110px;
    flex: 1 1 auto;
    font-size: 0.75rem;
    padding: 0.5rem 0.8rem;
  }
}

.typing-cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: #0f0;
  animation: blink 0.7s infinite;
  vertical-align: middle;
}

.red-color{
  color: red;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.game-canvas-center {
  display: flex;
  justify-content: flex-start;
  margin: 0.6rem 0;
}

#snake-canvas {
  border: 2px solid #0f0;
  border-radius: 4px;
  background: rgba(0,0,0,0.6);
  max-width: 280px;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.cert-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.cert-card {
  background: rgba(0, 20, 0, 0.6);
  border: 2px solid #0f0;
  border-radius: 6px;
  padding: 0.5rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.cert-icon {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

/* Project Split View */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none;
}

.project-split-view {
  display: none;
  width: 100%;
  max-width: 1000px;
  height: 100%;
  gap: 1rem;
}

.project-menu-terminal {
  flex: 1;
}

.project-content-terminal {
  flex: 1;
  min-width: 0;
}

.project-menu-btn {
  display: block;
  padding: 0.6rem 1rem;
  margin: 0.4rem 0;
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid #0f0;
  color: #0f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  width: 100%;
  text-align: left;
}

.project-content-section {
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Allow scrolling past bottom panel */
#project-1 .mobile-only .code-block,
#project-2 .mobile-only .code-block {
  overflow-y: auto;
  max-height: calc(80vh - 2rem - 10vh);
}

/* DESKTOP: Show split view */
@media (min-width: 1024px) {
  .mobile-only {
    display: none !important;
  }
  
  .desktop-only {
    display: flex !important;
  }
  
  .project-split-view {
    display: flex !important;
  }
  
  #project-1 .code-block,
  #project-2 .code-block {
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .my-name {
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
    letter-spacing: -0.08em !important;
    word-spacing: -0.15em;
  }
}

/* Bottom Panel */
.bottom-panel {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 8px;
  z-index: 1000;
  background: transparent;
  border: 1px solid #0f0;
  box-shadow: 0 -5px 30px rgba(0, 255, 0, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(0.3rem, 1.5vh, 1rem) 0;
  height: 20vh;
  width: 100%;
  max-width: 1000px;
}

.minimap-bottom,
.nav-compass {
  border: 2px solid #0f0;
  border-radius: 8px;
  background: transparent !important;
  padding: clamp(0.4rem, 1vh, 0.6rem);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
  flex: 1;
  max-width: 280px;
  height: calc(20vh - 1.5rem);
}

.minimap-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: clamp(0.3rem, 0.6vw, 0.4rem);
}

.minimap-games {
  display: none !important;
}

.minimap-grid {
  display: contents;
}

.minimap-cell {
  background: rgba(0, 255, 0, 0.1);
  border: 1.5px solid rgba(0, 255, 0, 0.5);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.65rem, 1.2vw, 0.8rem);
  color: #0f0;
  transition: all 0.3s;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.minimap-cell.empty {
  background: transparent;
  border: none;
  pointer-events: none;
}

.minimap-cell.active {
  background: #0f0;
  color: #000;
  box-shadow: 0 0 12px #0f0;
  animation: pulse-map 2s infinite;
}

@keyframes pulse-map {
  0%, 100% { box-shadow: 0 0 12px #0f0; }
  50% { box-shadow: 0 0 20px #0f0; }
}

.minimap-row-projects {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(0.2rem, 0.4vw, 0.3rem);
}

.minimap-cell.small {
  font-size: clamp(0.55rem, 1vw, 0.7rem);
}

/* COMPASS */
.nav-compass {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: clamp(0.3rem, 0.6vw, 0.4rem);
}

.nav-arrow {
  background: rgba(0, 30, 0, 0.8);
  border: 2px solid #0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #0f0;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.nav-arrow.home-btn {
  background: rgba(0, 255, 0, 0.15);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
}

.nav-arrow:empty {
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
}

/* Responsive adjustments */
@media (min-width: 1200px) {
  .bottom-panel {
    height: 22vh;
    padding: clamp(0.8rem, 2vh, 1.2rem) 0;
    gap: 5rem;
  }
  
  .minimap-bottom,
  .nav-compass {
    max-width: 300px;
    height: calc(25vh - 2.5rem);
  }
  
  .section {
    height: 78vh;
  }
  
  .terminal-window {
    max-height: calc(78vh - 2rem);
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .bottom-panel {
    height: 28vh;
    padding: 0.8rem 0;
    gap: 4rem;
  }
  
  .minimap-bottom,
  .nav-compass {
    max-width: 300px;
    height: calc(28vh - 2rem);
  }
  
  .section {
    height: 72vh;
  }
  
  .terminal-window {
    max-height: calc(72vh - 2rem);
  }
}

@media (max-width: 1023px) and (min-width: 769px) {
  .bottom-panel {
    height: 24vh;
    padding: 0.7rem 1rem;
    gap: 3rem;
    max-width: calc(100% - 2rem);
  }
  
  .minimap-bottom,
  .nav-compass {
    max-width: 380px;
    height: calc(24vh - 1.5rem);
  }
  
  .section {
    height: 76vh;
  }
  
  .terminal-window {
    max-height: calc(76vh - 2rem);
  }
}

@media (max-width: 768px) {
  .bottom-panel {
    height: 22vh;
    padding: 0.6rem 1rem;
    gap: 1.5rem;
    max-width: calc(100% - 2rem);
  }
  
  .code-block {
    flex: 1;
    overflow-y: auto !important;
    padding: 0.8rem;
    font-size: 0.8rem;
    line-height: 1.5;
  }
  
  #project-1 .code-block,
  #project-2 .code-block,
  #project-3 .code-block {
    overflow-y: auto !important;
  }

  .minimap-bottom,
  .nav-compass {
    max-width: 300px;
    height: calc(20vh - 1.2rem);
  }
  
  .section {
    height: 73vh;
    padding-bottom: 1rem;
  }
  
  .terminal-window {
    max-height: calc(71vh - 2rem);
    padding: -4rem;
  }

  .my-name {
    font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
    letter-spacing: -0.05em !important;
    font-weight: 900;
    word-spacing: -0.1em;
    white-space: nowrap;
  }

  .cmd-button {
    text-align: center;
    padding: 10px;
  }
  
  #home .code-block,
  #about-exp .code-block,
  #contact .code-block,
  #projects .code-block,
  #game-1 .code-block,
  #game-2 .code-block,
  #game-3 .code-block {
    overflow: hidden !important;
    overflow-y: hidden !important;
  }

  #project-1 .code-block,
  #project-2 .code-block,
  #project-3 .code-block,
  #certificates .code-block {
    overflow-y: auto !important;
  }

  /* Home section optimization */
#home {
  contain: layout style paint;
}

#home .terminal-window {
  will-change: auto;
  transform: translateZ(0);
}

#home canvas {
  will-change: auto;
}



#home #canvas-3d,
#home #matrix-canvas {
  display: block;
}


}

@keyframes nameGlow {
  0%, 100% {
    text-shadow: 
      0 0 10px #0f0,
      0 0 20px #0f0,
      0 0 40px #00ff00,
      0 0 80px rgba(0, 255, 0, 0.5);
    filter: brightness(1);
  }
  50% {
    text-shadow: 
      0 0 20px #0f0,
      0 0 40px #0f0,
      0 0 60px #00ff00,
      0 0 100px rgba(0, 255, 0, 0.8);
    filter: brightness(1.2);
  }
}

/* Game Control Buttons */
.game-control-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 0.3rem 0;
  flex-wrap: wrap;
}

.game-control-btn {
  padding: 0.6rem 1.5rem;
  background: rgba(0, 255, 0, 0.15);
  border: 1px solid #0f0;
  color: #0f0;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 120px;
  text-align: center;
}

/* Hide on desktop - only show on mobile */
@media (min-width: 769px) {
  .game-control-buttons {
    display: none;
  }
}

/* Certificate Terminal Styles */
.certificate-terminal-popup {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Mobile sizing */
@media (max-width: 768px) {
  .certificate-terminal-popup {
    max-height: 65vh !important;
  }
}

/* Loading Screen with Kali Logo */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #000000, #0a1a0a);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
  padding: 1rem;
  box-sizing: border-box;
}

#loading-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.loading-content {
  position: relative;
  z-index: 10;
  max-width: 650px;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-terminal-box {
  background: rgba(0, 25, 0, 0.95);
  border: 2px solid #0f0;
  border-radius: 10px;
  box-shadow: 
    0 0 25px rgba(0, 255, 0, 0.5),
    inset 0 0 20px rgba(0, 255, 0, 0.1);
  overflow: hidden;
  animation: terminalGlow 2.5s ease-in-out infinite;
  width: 100%;
  backdrop-filter: blur(10px);
}

@keyframes terminalGlow {
  0%, 100% { 
    box-shadow: 
      0 0 25px rgba(0, 255, 0, 0.5),
      inset 0 0 20px rgba(0, 255, 0, 0.1);
  }
  50% { 
    box-shadow: 
      0 0 45px rgba(0, 255, 0, 0.7),
      inset 0 0 20px rgba(0, 255, 0, 0.2);
  }
}

.loading-terminal-header {
  background: linear-gradient(90deg, rgba(0, 255, 0, 0.15), rgba(0, 255, 0, 0.05));
  padding: clamp(0.6rem, 3vw, 1rem) clamp(1rem, 4vw, 1.2rem);
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 3vw, 1.2rem);
  border-bottom: 1px solid rgba(0, 255, 0, 0.3);
}

.loading-terminal-dots {
  display: flex;
  gap: 0.5rem;
}

.loading-terminal-dots span {
  width: clamp(10px, 2vw, 14px);
  height: clamp(10px, 2vw, 14px);
  border-radius: 50%;
  background: #0f0;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
  animation: dotPulse 1.5s ease-in-out infinite;
}

.loading-terminal-dots span:nth-child(1) { animation-delay: 0s; }
.loading-terminal-dots span:nth-child(2) { animation-delay: 0.3s; }
.loading-terminal-dots span:nth-child(3) { animation-delay: 0.6s; }

@keyframes dotPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

.loading-terminal-body {
  padding: clamp(1.2rem, 4vw, 1.8rem);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: #0f0;
  font-size: clamp(0.75rem, 2.5vw, 1rem);
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.loading-line {
  margin-bottom: clamp(1rem, 3vw, 1.8rem);
  word-break: break-word;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-prompt {
  color: #0ff;
  opacity: 0.9;
  font-weight: bold;
}

.loading-typing {
  animation: typingAnimation 2s steps(35) infinite;
  display: inline-block;
  color: #0f0;
}

@keyframes typingAnimation {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.loading-progress-container {
  margin: clamp(1.2rem, 4vw, 1.8rem) 0;
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 3vw, 1.2rem);
  flex-wrap: nowrap;
}

.loading-progress-bar {
  flex: 1;
  min-width: 0;
  height: clamp(18px, 3vw, 24px);
  background: rgba(0, 255, 0, 0.1);
  border: 1.5px solid #0f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.2);
}

.loading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0f0, #0ff, #0f0);
  background-size: 200% 100%;
  width: 0%;
  transition: width 0.2s ease;
  animation: progressAnimation 2s linear infinite;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.8), inset 0 0 10px rgba(0, 255, 0, 0.5);
}

@keyframes progressAnimation {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-percentage {
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: #0ff;
  font-weight: bold;
  min-width: clamp(40px, 10vw, 50px);
  text-align: right;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

.loading-status {
  margin: clamp(1rem, 3vw, 1.3rem) 0;
  opacity: 0.9;
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  word-break: break-word;
  animation: fadeIn 0.5s ease-out;
}

#status-text {
  color: #0ff;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

.loading-cursor-line {
  margin-top: clamp(1rem, 3vw, 1.3rem);
}

.loading-cursor-blink {
  animation: cursorAnimation 0.8s infinite;
  color: #0f0;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

@keyframes cursorAnimation {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.3; }
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .loading-terminal-box { border-radius: 8px; }
  .loading-terminal-header { font-size: 0.7rem; }
  #loading-canvas { opacity: 0.7; }
}
