:root { --green: #00ff66; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  font-family: 'Perfect DOS VGA 437', monospace;
  color: var(--green);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 12px 14px;
  z-index: 100;
  transition: opacity 1s ease-out;
  overflow: hidden;
  position: relative;
}

.boot-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.ami-splash {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  color: #ffffff;
  font-family: 'Perfect DOS VGA 437', monospace;
  width: 100%;
  height: 100%;
  position: relative;
  padding: 20px 30px;
  overflow: hidden;
}

.ami-header {
  margin: 0 0 20px 0;
  width: 100%;
  max-width: 800px;
  text-align: left;
}

.ami-logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.ami-triangle-logo {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 20px 0 20px 35px;
  border-color: transparent transparent transparent #ff0000;
  position: relative;
  flex-shrink: 0;
}

.ami-triangle-logo::after {
  content: '';
  position: absolute;
  left: -35px;
  top: 5px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent #000000;
}

.ami-company-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffffff;
  font-family: serif;
}

.ami-system-info {
  margin: 0 0 20px 0;
  line-height: 1.6;
  text-align: left;
  width: 100%;
  max-width: 800px;
}

.ami-info-line {
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 2px;
  font-family: 'Perfect DOS VGA 437', monospace;
  white-space: pre;
}

.ami-section-title {
  margin-top: 10px;
  font-weight: bold;
}

.ami-instructions {
  margin: 20px 0 0 0;
  width: 100%;
  max-width: 800px;
  text-align: left;
}

.ami-press-key {
  font-size: 1rem;
  margin-top: 15px;
  color: #ffffff;
  animation: pressKeyPulse 1.5s ease-in-out infinite;
}

.ami-splash.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

@keyframes pressKeyPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.blink-cursor::after {
  content: '_';
  animation: blink 1s infinite;
}

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

.boot-log {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 5;
  width: auto;
  max-width: 900px;
  font-size: 1.05rem;
  line-height: 1.4;
  text-shadow: 0 0 3px var(--green);
  white-space: pre;
  color: var(--green);
  filter: contrast(1.1) brightness(1.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  margin: 0;
  padding: 0;
}

.boot-log::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 102, 0.03) 2px,
    rgba(0, 255, 102, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
  animation: scanline 0.15s linear infinite;
}

.boot-log::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(0, 255, 102, 0.02) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
  animation: screenFlicker 3s infinite;
}

@keyframes screenRipple {
  0%, 100% {
    transform: translateY(0) scaleY(1);
  }
  25% {
    transform: translateY(-1px) scaleY(1.001);
  }
  50% {
    transform: translateY(0) scaleY(1);
  }
  75% {
    transform: translateY(1px) scaleY(0.999);
  }
}

.boot-log.ripple-active {
  animation: screenRipple 0.08s infinite, rippleEffect 0.12s infinite, screenDistortion 0.2s infinite;
}

@keyframes rippleEffect {
  0%, 100% {
    filter: contrast(1.1) brightness(1.05) hue-rotate(0deg);
    transform: scale(1) translateY(0);
  }
  25% {
    filter: contrast(1.2) brightness(1.15) hue-rotate(2deg);
    transform: scale(1.002) translateY(-0.3px);
  }
  50% {
    filter: contrast(1.1) brightness(1.05) hue-rotate(0deg);
    transform: scale(1) translateY(0);
  }
  75% {
    filter: contrast(1.18) brightness(1.12) hue-rotate(-2deg);
    transform: scale(0.998) translateY(0.3px);
  }
}

@keyframes screenDistortion {
  0%, 100% {
    transform: perspective(1000px) rotateX(0deg);
    filter: blur(0px);
  }
  25% {
    transform: perspective(1000px) rotateX(0.2deg);
    filter: blur(0.3px);
  }
  50% {
    transform: perspective(1000px) rotateX(0deg);
    filter: blur(0px);
  }
  75% {
    transform: perspective(1000px) rotateX(-0.2deg);
    filter: blur(0.3px);
  }
}

@keyframes scanline {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(10px);
  }
}

@keyframes screenFlicker {
  0%, 100% {
    opacity: 0.1;
  }
  2% {
    opacity: 0.8;
  }
  4% {
    opacity: 0.2;
  }
  8% {
    opacity: 0.9;
  }
  70% {
    opacity: 0.1;
  }
  72% {
    opacity: 0.4;
  }
  77% {
    opacity: 0.1;
  }
}

.boot-log.hidden {
  display: none;
}

.boot-log.intro-glitch {
  filter: contrast(1.4) brightness(1.1) saturate(1.3) blur(0.6px);
  animation: introFlash 0.08s steps(2) infinite, introShift 0.14s steps(2) infinite;
}

@keyframes introFlash {
  0% { opacity: 0.9; text-shadow: 2px 0 #0f0, -2px 0 #0f0, 0 0 4px #0f0; }
  50% { opacity: 0.5; text-shadow: -2px 0 #0f0, 2px 0 #0f0, 0 0 6px #0f0; }
  100% { opacity: 1; text-shadow: 2px 0 #0f0, -2px 0 #0f0, 0 0 4px #0f0; }
}

@keyframes introShift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-4px, -1px); }
  80% { transform: translate(2px, 3px); }
  100% { transform: translate(0, 0); }
}

@keyframes introSkew {
  0% { transform: skewX(0deg) skewY(0deg); }
  25% { transform: skewX(4deg) skewY(-2deg); }
  50% { transform: skewX(-5deg) skewY(3deg); }
  75% { transform: skewX(6deg) skewY(-4deg); }
  100% { transform: skewX(0deg) skewY(0deg); }
}

.boot-line {
  opacity: 0;
  position: relative;
  animation: textGlitch 0.3s infinite;
  width: auto;
  min-width: 100%;
  text-align: left;
  align-self: flex-start;
}

.boot-line.glitch {
  animation: typeAppear 0.4s forwards, textGlitch 0.3s infinite;
}

.boot-log.boot-glitch {
  filter: contrast(1.5) brightness(1.2) saturate(1.45);
  animation:
    introFlash 0.08s steps(2) infinite,
    introShift 0.12s steps(2) infinite,
    introSkew 0.14s steps(2) infinite,
    screenRipple 0.08s infinite,
    rippleEffect 0.12s infinite,
    screenDistortion 0.18s infinite;
}

@keyframes typeAppear {
  0% { opacity: 0; transform: translateX(-5px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes textGlitch {
  0%, 100% {
    transform: translate(0) skewX(0deg);
    filter: brightness(1) hue-rotate(0deg);
    text-shadow: 0 0 3px var(--green);
  }
  10% {
    transform: translate(-2px, 1px) skewX(1deg);
    filter: brightness(1.2) hue-rotate(5deg);
    text-shadow: -1px 1px 5px var(--green), 1px -1px 3px rgba(0, 255, 102, 0.5);
  }
  20% {
    transform: translate(2px, -1px) skewX(-1deg);
    filter: brightness(0.8) hue-rotate(-5deg);
    text-shadow: 1px -1px 5px var(--green), -1px 1px 3px rgba(0, 255, 102, 0.5);
  }
  30% {
    transform: translate(-1px, -1px) skewX(0.5deg);
    filter: brightness(1.1) hue-rotate(3deg);
    text-shadow: -1px -1px 4px var(--green);
  }
  40% {
    transform: translate(1px, 1px) skewX(-0.5deg);
    filter: brightness(0.9) hue-rotate(-3deg);
    text-shadow: 1px 1px 4px var(--green);
  }
  50% {
    transform: translate(0) skewX(0deg);
    filter: brightness(1) hue-rotate(0deg);
    text-shadow: 0 0 3px var(--green);
  }
}

.boot-line.light-glitch {
  animation: lightGlitchAppear 0.5s forwards, textGlitch 0.4s infinite;
}

@keyframes lightGlitchAppear {
  0% {
    opacity: 0;
    transform: translateX(-10px) skewX(20deg) scaleY(1.1);
    filter: blur(1.5px) hue-rotate(90deg) brightness(1.3);
    text-shadow: -3px 3px 8px var(--green), 3px -3px 5px rgba(0, 255, 102, 0.6);
  }
  25% {
    opacity: 0.8;
    transform: translateX(6px) skewX(-15deg) scaleY(0.9);
    filter: blur(1px) hue-rotate(-60deg) brightness(1.1);
    text-shadow: 3px -3px 8px var(--green), -3px 3px 5px rgba(0, 255, 102, 0.6);
  }
  50% {
    opacity: 0.6;
    transform: translateX(-4px) skewX(8deg) scaleY(1.05);
    filter: blur(0.5px) hue-rotate(45deg) brightness(0.9);
    text-shadow: -2px 2px 6px var(--green);
  }
  75% {
    opacity: 0.9;
    transform: translateX(2px) skewX(-4deg) scaleY(0.98);
    filter: blur(0px) hue-rotate(-20deg) brightness(1.2);
    text-shadow: 2px -2px 6px var(--green);
  }
  100% {
    opacity: 1;
    transform: translateX(0) skewX(0) scaleY(1);
    filter: blur(0px) hue-rotate(0deg) brightness(1);
    text-shadow: 0 0 3px var(--green);
  }
}

.boot-line.medium-glitch {
  animation: mediumGlitchAppear 0.7s forwards, textGlitch 0.25s infinite;
}

@keyframes mediumGlitchAppear {
  0% {
    opacity: 0;
    transform: translateX(-12px) skewX(20deg) scaleY(1.1);
    filter: blur(1.5px) hue-rotate(90deg) brightness(1.3);
    letter-spacing: 3px;
  }
  20% {
    opacity: 0.7;
    transform: translateX(8px) skewX(-15deg) scaleY(0.9);
    filter: blur(1px) hue-rotate(-60deg) brightness(1.1);
    letter-spacing: 5px;
  }
  40% {
    opacity: 0.5;
    transform: translateX(-6px) skewX(12deg) scaleY(1.05);
    filter: blur(0.5px) hue-rotate(120deg) brightness(0.9);
    letter-spacing: 2px;
  }
  60% {
    opacity: 0.8;
    transform: translateX(4px) skewX(-8deg) scaleY(0.95);
    filter: blur(0px) hue-rotate(-45deg) brightness(1.2);
    letter-spacing: 4px;
  }
  80% {
    opacity: 0.6;
    transform: translateX(-2px) skewX(4deg) scaleY(1.02);
    filter: blur(0px) hue-rotate(30deg) brightness(1);
    letter-spacing: 3px;
  }
  100% {
    opacity: 1;
    transform: translateX(0) skewX(0) scaleY(1);
    filter: blur(0px) hue-rotate(0deg) brightness(1);
    letter-spacing: normal;
  }
}

.boot-line.severe-glitch {
  animation: severeGlitchAppear 0.9s forwards, textGlitch 0.2s infinite;
  position: relative;
}

.boot-line.severe-glitch::before,
.boot-line.severe-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.boot-line.severe-glitch::before {
  color: #ff00ff;
  animation: glitch-red 0.3s 0.3s infinite;
  z-index: -1;
}

.boot-line.severe-glitch::after {
  color: #00ffff;
  animation: glitch-blue 0.3s 0.5s infinite;
  z-index: -2;
}

@keyframes severeGlitchAppear {
  0% {
    opacity: 0;
    transform: translateX(-15px) skewX(25deg) scaleY(1.3);
    filter: blur(2px) hue-rotate(120deg) brightness(1.5);
    letter-spacing: 4px;
  }
  15% {
    opacity: 0.9;
    transform: translateX(12px) skewX(-20deg) scaleY(0.8);
    filter: blur(1.5px) hue-rotate(-90deg) brightness(1.8);
    letter-spacing: 6px;
  }
  30% {
    opacity: 0.4;
    transform: translateX(-9px) skewX(18deg) scaleY(1.2);
    filter: blur(1px) hue-rotate(180deg) brightness(0.7);
    letter-spacing: 2px;
  }
  45% {
    opacity: 0.8;
    transform: translateX(6px) skewX(-12deg) scaleY(0.9);
    filter: blur(0.5px) hue-rotate(-120deg) brightness(1.4);
    letter-spacing: 5px;
  }
  60% {
    opacity: 0.6;
    transform: translateX(-4px) skewX(8deg) scaleY(1.1);
    filter: blur(0px) hue-rotate(150deg) brightness(1);
    letter-spacing: 3px;
  }
  75% {
    opacity: 0.9;
    transform: translateX(2px) skewX(-4deg) scaleY(0.95);
    filter: blur(0px) hue-rotate(-60deg) brightness(1.2);
    letter-spacing: 4px;
  }
  90% {
    opacity: 0.7;
    transform: translateX(-1px) skewX(2deg) scaleY(1.02);
    filter: blur(0px) hue-rotate(45deg) brightness(1);
    letter-spacing: 2px;
  }
  100% {
    opacity: 1;
    transform: translateX(0) skewX(0) scaleY(1);
    filter: blur(0px) hue-rotate(0deg) brightness(1);
    letter-spacing: normal;
  }
}

@keyframes glitch-red {
  0% { transform: translate(0); opacity: 0.7; }
  20% { transform: translate(-3px, 1px); opacity: 0.8; }
  40% { transform: translate(-1px, -2px); opacity: 0.6; }
  60% { transform: translate(2px, 1px); opacity: 0.9; }
  80% { transform: translate(1px, -1px); opacity: 0.5; }
  100% { transform: translate(0); opacity: 0.7; }
}

@keyframes glitch-blue {
  0% { transform: translate(0); opacity: 0.6; }
  20% { transform: translate(2px, -1px); opacity: 0.7; }
  40% { transform: translate(-1px, 2px); opacity: 0.5; }
  60% { transform: translate(-2px, -1px); opacity: 0.8; }
  80% { transform: translate(1px, 1px); opacity: 0.4; }
  100% { transform: translate(0); opacity: 0.6; }
}

.boot-log::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 255, 102, 0.02) 50%,
    transparent 100%
  );
  animation: screenFlicker 8s infinite;
  pointer-events: none;
  z-index: 1;
}

.app {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: appFadeIn 1.5s ease 0.5s forwards;
}
@keyframes appFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
.hidden { display: none !important; }

.crt {
  width: 92vw;
  height: 86vh;
  border: 3px solid var(--green);
  position: relative;
  background: radial-gradient(ellipse at center,
      rgba(0, 40, 30, 0.15),
      rgba(0, 20, 16, 0.6));
  box-shadow: 0 0 40px rgba(0,255,102,0.14),
              inset 0 0 20px rgba(0,255,102,0.06);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 1s ease, transform 1s ease;
}
.crt.visible {
  opacity: 1;
  transform: scale(1);
}
.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,255,100,0.05) 0px,
    rgba(0,255,100,0.05) 2px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.3;
  animation: scan 6s linear infinite;
  mix-blend-mode: screen;
}
@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.brand {
  margin: 15px;
  font-size: 2.2rem;
  letter-spacing: 3px;
  text-align: center;
  transition: transform 0.35s ease, text-shadow 0.35s ease;
}
.brand.blink {
  animation: brandFlash 700ms ease;
}
@keyframes brandFlash {
  0% { transform: scale(1); text-shadow: 0 0 2px rgba(0,255,102,0.25); }
  30% { transform: scale(1.08); text-shadow: 0 0 18px rgba(0,255,102,0.9); }
  60% { transform: scale(0.98); text-shadow: 0 0 6px rgba(0,255,102,0.45); }
  100% { transform: scale(1); text-shadow: none; }
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  padding: 25px;
  height: calc(100% - 80px);
  align-items: stretch;
}

.links-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.neofetch-terminal {
  border: 2px solid var(--green);
  background: rgba(0, 20, 10, 0.8);
  box-shadow: 0 0 20px rgba(0,255,102,0.1);
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background: rgba(0,255,102,0.1);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--green);
}

.terminal-title {
  font-size: 1rem;
  color: var(--green);
  font-family: 'Perfect DOS VGA 437', monospace;
  font-weight: bold;
}

.terminal-controls {
  display: flex;
  gap: 10px;
}

.control-btn {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: rgba(0,255,102,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: rgba(0, 20, 10, 0.9);
}

.control-btn:hover {
  transform: scale(1.1);
}

.control-btn.minimize:hover {
  background: #ffcc00;
}

.control-btn.maximize:hover {
  background: #00ccff;
}

.control-btn.close:hover {
  background: #ff4444;
}

.terminal-body {
  padding: 20px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.3;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.neofetch-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 15px;
}

.ascii-art {
  color: var(--green);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.7rem;
  line-height: 1.1;
  white-space: pre;
  text-shadow: 0 0 2px var(--green);
}

.system-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 0.9rem;
}

.label {
  color: var(--green);
  font-weight: bold;
  min-width: 90px;
  text-align: right;
  font-size: 0.9rem;
}

.separator {
  color: var(--green);
  font-weight: bold;
}

.terminal-prompt {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 15px;
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 1rem;
}

.prompt-user {
  color: #00ff66;
  font-weight: bold;
}

.prompt-path {
  color: #66ff99;
  font-weight: bold;
}

.prompt-symbol {
  color: var(--green);
  font-weight: bold;
}

.cursor {
  color: var(--green);
  animation: blink 1s infinite;
  font-weight: bold;
}

.inner-frame {
  border: 2px solid var(--green);
  background: rgba(0,255,102,0.02);
  padding: 30px;
  margin: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: visible;
}
.frame-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
  letter-spacing: 1px;
}
.frame-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  width: 100%;
  max-height: 100%;
  overflow: visible;
}

.link-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  padding: 20px 25px;
  font-size: 1.3rem;
  border: 2px solid rgba(0,255,102,0.4);
  border-radius: 8px;
  color: var(--green);
  background: rgba(0,255,102,0.05);
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 20;
  position: relative;
  opacity: 0;
  transform: translateY(15px) scale(0.95);
  min-height: 70px;
  pointer-events: none;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.link-block.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.link-block:hover,
.link-block:focus-visible {
  background: rgba(0,255,102,0.1);
  transform: translateY(-8px) scale(1.05);
  outline: none;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, z-index 0s;
}

.button-disabled {
  pointer-events: none !important;
  opacity: 0.6 !important;
  transition: opacity 0.3s ease;
}

.mobile-menu-btn {
  display: none;
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1000;
  color: var(--green);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
  border: 1px solid rgba(0,255,102,0.3);
  border-radius: 5px;
  background: rgba(0,0,0,0.7);
  transition: all 0.3s ease;
}

.mobile-terminal-btn {
  display: none;
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1000;
  color: var(--green);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
  border: 1px solid rgba(0,255,102,0.3);
  border-radius: 5px;
  background: rgba(0,0,0,0.7);
  transition: all 0.3s ease;
}

.mobile-terminal-btn:hover {
  background: rgba(0,255,102,0.1);
  transform: scale(1.05);
}

.mobile-terminal-btn.button-disabled {
  opacity: 0.4;
  transform: scale(0.95);
}

.mobile-menu-btn.button-disabled {
  opacity: 0.4;
  transform: scale(0.95);
}

.bottombar {
  position: absolute;
  bottom: 8px;
  right: 12px;
}
.sound-btn {
  border: 1px solid rgba(0,255,102,0.3);
  background: transparent;
  color: var(--green);
  cursor: pointer;
  padding: 10px 15px;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  border-radius: 5px;
}
.sound-btn:hover {
  background: var(--green);
  color: #000;
}

.sound-btn.button-disabled {
  opacity: 0.5;
  transform: scale(0.95);
}

.terminal-input {
  background: transparent;
  border: none;
  color: var(--green);
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 1rem;
  width: 100%;
  outline: none;
  caret-color: var(--green);
  flex: 1;
}

.terminal-output {
  margin-top: 10px;
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 0.9rem;
  color: var(--green);
  white-space: pre-wrap;
  max-height: 150px;
  overflow-y: auto;
  flex-shrink: 0;
}

.command-hint {
  position: absolute;
  bottom: 40px;
  left: 12px;
  font-size: 0.8rem;
  color: rgba(0, 255, 102, 0.6);
  font-family: 'Perfect DOS VGA 437', monospace;
}

.shutdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--green);
  font-family: 'Perfect DOS VGA 437', monospace;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.shutdown-text {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.shutdown-progress {
  width: 300px;
  height: 20px;
  border: 1px solid var(--green);
  background: rgba(0, 20, 10, 0.8);
  position: relative;
  overflow: hidden;
}

.shutdown-progress-bar {
  height: 100%;
  background: var(--green);
  width: 0%;
  transition: width 0.5s ease;
}

@media (min-width: 768px) and (max-width: 1200px) {
  .crt {
    width: 94vw;
    height: 88vh;
  }
  .frame-body {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  .neofetch-content {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .ascii-art {
    font-size: 0.65rem;
    text-align: center;
  }
  .terminal-body {
    padding: 18px;
  }
  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .links-section {
    order: 1;
  }
  .neofetch-terminal {
    order: 2;
  }
  .boot-screen {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 15px 15px 15px 15px;
  }
  .ami-splash {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 15px 20px;
  }
  .ami-company-name {
    font-size: 1.3rem;
  }
  .ami-info-line {
    font-size: 0.85rem;
  }
  .boot-log {
    width: auto;
    max-width: 900px;
    font-size: 1.02rem;
    align-items: flex-start;
    justify-content: flex-start;
    position: absolute;
    top: 12px;
    left: 14px;
    transform: none;
  }
}

@media (min-width: 1200px) {
  .crt {
    width: 92vw;
    height: 86vh;
  }
  .main-content {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  .frame-body {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .neofetch-content {
    grid-template-columns: auto 1fr;
    gap: 20px;
  }
  .boot-screen {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px 20px 20px 20px;
  }
  .ami-splash {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px 30px;
  }
  .boot-log {
    width: auto;
    max-width: 900px;
    font-size: 1.05rem;
    align-items: flex-start;
    justify-content: flex-start;
    position: absolute;
    top: 12px;
    left: 14px;
    transform: none;
  }
}

@media (min-width: 768px) and (max-width: 992px) {
  .crt {
    width: 96vw;
    height: 90vh;
  }
  .frame-body {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  .link-block {
    font-size: 1.2rem;
    padding: 18px 22px;
  }
  .brand {
    font-size: 2rem;
    margin: 12px;
  }
  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .neofetch-terminal {
    order: 2;
  }
  .links-section {
    order: 1;
  }
  .ascii-art {
    font-size: 0.6rem;
  }
  .terminal-body {
    padding: 16px;
  }
  .boot-screen {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 12px 15px;
  }
  .ami-splash {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 12px 15px;
  }
  .ami-header {
    margin: 0 0 15px 0;
  }
  .ami-system-info {
    margin: 0 0 15px 0;
  }
  .ami-instructions {
    margin: 15px 0 0 0;
  }
  .ami-triangle-logo {
    border-width: 15px 0 15px 25px;
  }
  .ami-triangle-logo::after {
    border-width: 11px 0 11px 18px;
    left: -25px;
    top: 4px;
  }
  .ami-company-name {
    font-size: 1.1rem;
  }
  .ami-info-line {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  .ami-press-key {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .crt {
    width: 98vw;
    height: 94vh;
    margin: 10px;
  }
  .inner-frame {
    padding: 25px 20px;
    margin: 15px 10px;
    max-height: calc(100% - 80px);
  }
  .frame-body {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .link-block {
    font-size: 1.2rem;
    padding: 18px 20px;
    min-height: 65px;
    justify-content: center;
    width: 100%;
  }
  .brand {
    font-size: 1.8rem;
    margin: 10px;
  }
  .frame-title {
    font-size: 1.2rem;
    margin-bottom: 18px;
  }
  .bottombar {
    bottom: 6px;
    right: 8px;
  }
  .sound-btn {
    padding: 8px 12px;
    font-size: 1rem;
  }
  .main-content {
    padding: 20px;
    gap: 15px;
    grid-template-columns: 1fr;
  }
  .neofetch-terminal {
    margin: 0 10px;
    order: 2;
  }
  .links-section {
    order: 1;
  }
  .terminal-body {
    padding: 15px;
  }
  .ascii-art {
    font-size: 0.55rem;
  }
  .info-line {
    font-size: 0.85rem;
  }
  .label {
    min-width: 80px;
  }
  .terminal-header {
    padding: 8px 12px;
  }
  .terminal-title {
    font-size: 0.9rem;
  }
  .mobile-menu-btn {
    display: block;
  }
  .mobile-terminal-btn {
    display: block;
  }
  .main-content {
    position: relative;
  }
  .neofetch-terminal.mobile-hidden,
  .links-section.mobile-hidden {
    display: none;
  }
  .terminal-output {
    max-height: 100px;
  }
  .command-hint {
    bottom: 30px;
    left: 10px;
    font-size: 0.7rem;
  }
  .shutdown-text {
    font-size: 1.2rem;
  }
  .shutdown-progress {
    width: 250px;
    height: 15px;
  }
  .boot-screen {
    align-items: center;
    justify-content: center;
    padding: 10px;
  }
  .ami-splash {
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
  }
  .ami-header {
    margin: 0 auto 15px auto;
    width: 100%;
    max-width: 100%;
  }
  .ami-logo-container {
    gap: 10px;
    margin-bottom: 10px;
  }
  .ami-triangle-logo {
    border-width: 12px 0 12px 20px;
  }
  .ami-triangle-logo::after {
    border-width: 9px 0 9px 14px;
    left: -20px;
    top: 3px;
  }
  .ami-company-name {
    font-size: 1rem;
  }
  .ami-system-info {
    margin: 0 auto 15px auto;
    width: 100%;
    max-width: 100%;
  }
  .ami-info-line {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 1px;
  }
  .ami-instructions {
    margin: 15px auto 0 auto;
    width: 100%;
    max-width: 100%;
  }
  .ami-press-key {
    font-size: 0.85rem;
    margin-top: 10px;
  }
  .boot-log {
    font-size: 0.9rem;
    width: 95%;
    text-align: left;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .boot-line {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .crt {
    width: 99vw;
    height: 96vh;
    border-width: 2px;
  }
  .inner-frame {
    padding: 20px 15px;
    margin: 10px 5px;
    border-width: 1px;
  }
  .link-block {
    font-size: 1.1rem;
    padding: 16px 18px;
    min-height: 60px;
    gap: 12px;
    width: 100%;
  }
  .brand {
    font-size: 1.6rem;
    margin: 8px;
  }
  .frame-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
  .frame-body {
    gap: 12px;
  }
  .bottombar {
    bottom: 4px;
    right: 6px;
  }
  .sound-btn {
    padding: 7px 10px;
    font-size: 0.9rem;
  }
  .main-content {
    padding: 15px;
    gap: 12px;
  }
  .neofetch-terminal {
    margin: 0 5px;
  }
  .terminal-body {
    padding: 12px;
  }
  .ascii-art {
    font-size: 0.5rem;
    line-height: 1;
  }
  .info-line {
    font-size: 0.8rem;
  }
  .label {
    min-width: 70px;
  }
  .terminal-header {
    padding: 6px 10px;
  }
  .terminal-title {
    font-size: 0.85rem;
  }
  .terminal-output {
    max-height: 80px;
    font-size: 0.8rem;
  }
  .command-hint {
    bottom: 25px;
    left: 8px;
    font-size: 0.65rem;
  }
  .shutdown-text {
    font-size: 1rem;
  }
  .shutdown-progress {
    width: 200px;
    height: 12px;
  }
  .boot-screen {
    align-items: center;
    justify-content: center;
    padding: 8px;
  }
  .ami-splash {
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    width: 100%;
    max-width: 100%;
  }
  .ami-header {
    margin: 0 auto 10px auto;
    width: 100%;
    max-width: 100%;
  }
  .ami-system-info {
    margin: 0 auto 10px auto;
    width: 100%;
    max-width: 100%;
  }
  .ami-instructions {
    margin: 10px auto 0 auto;
    width: 100%;
    max-width: 100%;
  }
  .ami-triangle-logo {
    border-width: 10px 0 10px 16px;
  }
  .ami-triangle-logo::after {
    border-width: 7px 0 7px 11px;
    left: -16px;
    top: 3px;
  }
  .ami-company-name {
    font-size: 0.9rem;
  }
  .ami-info-line {
    font-size: 0.7rem;
    line-height: 1.2;
  }
  .ami-press-key {
    font-size: 0.8rem;
  }
  .boot-log {
    font-size: 0.8rem;
    width: 98%;
    text-align: left;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .boot-line {
    text-align: left;
  }
  .mobile-menu-btn,
  .mobile-terminal-btn {
    padding: 8px;
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .boot-screen {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 10px !important;
  }
  .boot-log {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    transform: none !important;
    width: calc(100% - 20px) !important;
    max-width: none !important;
    font-size: 0.95rem !important;
    align-items: flex-start !important;
  }
  .ami-splash {
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 360px) {
  .link-block {
    font-size: 1rem;
    padding: 14px 16px;
    min-height: 55px;
  }
  .brand {
    font-size: 1.4rem;
  }
  .inner-frame {
    padding: 18px 12px;
  }
  .ascii-art {
    font-size: 0.45rem;
  }
  .info-line {
    font-size: 0.75rem;
  }
  .boot-screen {
    padding: 5px;
  }
  .ami-splash {
    padding: 5px 8px;
  }
  .boot-log {
    width: 99%;
    font-size: 0.75rem;
  }
}

@media (min-height: 1000px) {
  .crt { height: 80vh; }
  .inner-frame { max-height: calc(100% - 120px); }
}

@media (max-width: 768px) and (orientation: portrait) {
  .crt {
    height: 92vh;
    width: 98vw;
  }
  .inner-frame {
    padding: 22px 16px;
    max-height: calc(100% - 70px);
  }
  .neofetch-terminal {
    max-height: 350px;
    overflow-y: auto;
  }
  .main-content {
    grid-template-columns: 1fr;
  }
  .boot-screen {
    align-items: center;
    justify-content: center;
    padding: 10px;
  }
  .boot-log {
    width: 95%;
    font-size: 0.9rem;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .crt {
    height: 88vh;
    width: 98vw;
  }
  .inner-frame {
    padding: 18px 14px;
    max-height: calc(100% - 60px);
  }
  .link-block {
    padding: 14px 16px;
    min-height: 55px;
  }
  .main-content {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .neofetch-content {
    grid-template-columns: 1fr;
  }
  .ascii-art {
    font-size: 0.5rem;
  }
  .boot-screen {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 8px 15px;
  }
  .boot-log {
    width: 90%;
    font-size: 0.85rem;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .ami-splash {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 8px 15px;
    overflow-y: auto;
    max-height: 100vh;
  }
  .ami-header {
    margin: 0 0 10px 0;
  }
  .ami-system-info {
    margin: 0 0 10px 0;
  }
  .ami-instructions {
    margin: 10px 0 0 0;
  }
  .ami-info-line {
    font-size: 0.7rem;
    line-height: 1.2;
  }
}

@media (hover: none) and (pointer: coarse) {
  .link-block {
    padding: 18px 20px;
    min-height: 70px;
  }

  .link-block:active {
    background: rgba(0,255,102,0.15);
    transform: scale(0.98);
  }

  .sound-btn:active {
    background: var(--green);
    color: #000;
  }

  .mobile-menu-btn:active,
  .mobile-terminal-btn:active {
    background: rgba(0,255,102,0.2);
    transform: scale(0.95);
  }
}

@media (max-width: 768px) {
  .boot-screen {
    padding: 10px;
    align-items: flex-start;
    justify-content: flex-start;
    transform: none !important;
  }

  .boot-log {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 96vw;
    max-width: none;
    font-size: 0.95rem;
    align-items: flex-start;
  }

  .main-content {
    flex-direction: column;
    align-items: center;
  }

  .links-section {
    width: 90%;
  }

  .neofetch-terminal {
    width: 95%;
    font-size: 0.85rem;
  }

  .frame-body a.link-block {
    padding: 10px;
    font-size: 1rem;
  }
}

.main-monitor {
  width: 95vw;
  height: 90vh;
  border: 3px solid var(--green);
  background: #000;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  box-shadow: 0 0 30px rgba(0,255,102,0.3);
}

.main-monitor-screen {
  width: 98%;
  height: 96%;
  background: #001a00;
  border: 1px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.main-monitor-stand {
  width: 100px;
  height: 25px;
  background: #333;
  position: absolute;
  bottom: -25px;
  border-radius: 0 0 5px 5px;
}

.main-monitor-base {
  width: 150px;
  height: 12px;
  background: #555;
  position: absolute;
  bottom: -37px;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .main-monitor {
    width: 98vw;
    height: 92vh;
    margin-bottom: 20px;
  }

  .main-monitor-stand {
    width: 80px;
    height: 20px;
    bottom: -20px;
  }

  .main-monitor-base {
    width: 120px;
    height: 10px;
    bottom: -30px;
  }
}

.terminal-body {
  position: relative;
}

.command-hint {
  position: absolute;
  bottom: 5px;
  left: 20px;
  font-size: 0.8rem;
  color: rgba(0, 255, 102, 0.6);
  font-family: 'Perfect DOS VGA 437', monospace;
}

@media (max-width: 480px) {
  .main-monitor {
    width: 99vw;
    height: 94vh;
  }
}

@media (max-width: 768px) {

  html, body {
    overflow: hidden;
  }

  .app {
    padding: 0;
  }


  .crt {
    width: 100vw;
    height: 100svh;
    margin: 0;
    border-width: 2px;
    border-radius: 0;
  }


  .brand {
    font-size: 1.5rem;
    margin: 10px 0 6px;
    letter-spacing: 2px;
  }


  .main-content {
    padding: 12px;
    gap: 12px;
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
  }


  .inner-frame {
    margin: 0;
    padding: 14px;
    border-width: 1px;
    flex: 1;
    overflow-y: auto;
  }


  .frame-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .frame-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .link-block {
    width: 100%;
    font-size: 1.05rem;
    padding: 14px 16px;
    min-height: 56px;
    justify-content: center;
    border-width: 1px;
  }


  .neofetch-terminal {
    width: 100%;
    max-height: 38vh;
    margin: 0;
    border-width: 1px;
  }

  .terminal-header {
    padding: 6px 10px;
  }

  .terminal-title {
    font-size: 0.85rem;
  }

  .terminal-body {
    padding: 10px;
    font-size: 0.8rem;
  }

  .ascii-art {
    font-size: 0.48rem;
    line-height: 1;
  }

  .terminal-output {
    max-height: 90px;
    font-size: 0.75rem;
  }


  .mobile-menu-btn,
  .mobile-terminal-btn {
    display: block;
    padding: 8px;
    font-size: 1.3rem;
  }


  .bottombar {
    bottom: 6px;
    right: 6px;
  }

  .sound-btn {
    padding: 7px 10px;
    font-size: 0.9rem;
  }
}
