


/* === BODY E CANVAS === */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Courier New', monospace;
  background: #000;
  color: #fff;
}
* {
  font-family: 'Courier New', monospace;
}
#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* === TERMINALE CENTRATO CON VETRO E NEON === */
#terminal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) perspective(900px) rotateX(1deg);
  width: 800px;
  max-width: 90%;
  height: 600px;
  background: rgba(0, 0, 0, 0.85);
  border: 3px solid #330022; /* spento */
  border-radius: 18px;
  padding: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 0 25px #330022, inset 0 0 10px rgba(51,0,34,0.3);
  backdrop-filter: blur(6px) saturate(140%);
  overflow: hidden;
  z-index: 10;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95) skewY(1deg);
  transition: opacity 1s ease, transform 1s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}
.terminal-reveal {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) skewY(0deg) !important;
  animation: glitchReveal 1.2s steps(10) forwards;
}

/* === Effetto di rivelazione del logo === */
#seren-logo {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 1s ease, transform 1s ease;
}
#seren-logo.logo-reveal {
  opacity: 1;
  transform: scale(1);
  filter: drop-shadow(0 0 12px rgba(217, 0, 213, 0.4));
}

/* === Effetto glitch === */
@keyframes glitchReveal {
  0% { clip-path: inset(0 0 100% 0); opacity: 0; transform: translate(-50%, -50%) skewY(5deg) scale(0.95); filter: blur(6px) contrast(0.8); }
  30% { clip-path: inset(0 0 50% 0); transform: translate(-50%, -50%) skewY(-5deg) scale(0.97); filter: blur(2px) contrast(1.2); }
  60% { clip-path: inset(0 0 10% 0); transform: translate(-50%, -50%) skewY(3deg) scale(0.99); filter: blur(1px) contrast(1.1); }
  100% { clip-path: inset(0 0 0 0); opacity: 1; transform: translate(-50%, -50%) skewY(0deg) scale(1); filter: blur(0) contrast(1); }
}

/* === Riflessi interni === */
#terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 15px;
  background: radial-gradient(circle at 25% 10%, rgba(255,255,255,0.08), transparent 60%),
              radial-gradient(circle at 90% 90%, rgba(217,0,213,0.08), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}
#terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(217, 0, 213, 0.03) 40%, rgba(0, 0, 0, 0.6) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

/* === STATUS BAR === */
#status-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.game-icon {
  width: 18px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid #111;
  display: inline-block;
  box-shadow: 0 0 6px rgba(0,0,0,0.8);
  transition: all 0.3s ease-in-out;
}

/* === LED EFFECTS === */
@keyframes glow-purple {
  0%, 100% { box-shadow: 0 0 6px #D900D5; }
  50% { box-shadow: 0 0 16px #D900D5; }
}
#icon-on { background-color: #330022; }
#icon-on.active { 
  background-color: #D900D5; 
  animation: glow-purple 1.8s infinite; 
}

/* === TERMINAL OUTPUT === */
#terminal-output {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* === INPUT === */
#terminal-input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: #000;
  color: #ffff; /* spento */
  border: 2px solid #330022;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  outline: none;
  transition: all 0.3s ease-in-out;
}
#terminal-input::placeholder {
  color: #330022;
  opacity: 0.6;
}
#terminal-input:focus {
  border-color: #D900D5;
  box-shadow: 0 0 10px #D900D5;
}

/* === LOGO === */
#seren-logo {
  position: fixed;
  top: 25px;
  left: 35px;
  width: 85px;
  height: auto;
  z-index: 100;
  filter: drop-shadow(0 0 10px rgba(217,0,213,0.6));
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}
#seren-logo:hover {
  transform: scale(1.07);
}

/* === TERMINAL HEADER BUTTONS === */
#terminal-header-buttons {
  position: absolute;
  top: 10px;
  right: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 50;
}

/* === BOTTONI (WHITEPAPER, BUY, X) === */
.terminal-btn {
  font-family: 'Monomaniac One', monospace;
  background: transparent;
  border: 1px solid #D900D5;
  color: #D900D5;
  height: 34px;
  min-width: 90px;
  padding: 6px 14px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 6px rgba(217, 0, 213, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-sizing: border-box;
}
.terminal-btn:hover {
  background: #D900D5;
  color: #0a000a;
  box-shadow: 0 0 12px #D900D5, 0 0 24px rgba(217, 0, 213, 0.6);
  transform: scale(1.05);
}

/* === ICONA X === */
.terminal-x svg {
  width: 16px;
  height: 16px;
  fill: #D900D5;
  transition: fill 0.25s ease;
}
.terminal-x:hover svg {
  fill: #0a000a;
}
#void-access-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(5, 0, 15, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.3s ease-in;
}

#void-access-popup {
  background: rgba(20, 0, 40, 0.95);
  border: 1px solid #a200ff;
  box-shadow: 0 0 20px #a200ff77, inset 0 0 10px #a200ff33;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  color: #d0b0ff;
  font-family: "VT323", monospace;
  width: 320px;
  animation: glitchFade 0.6s ease-in-out;
}

#void-access-popup h2 {
  color: #c480ff;
  font-size: 1.4rem;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

#void-password {
  width: 100%;
  background: #0a0017;
  border: 1px solid #a200ff;
  color: #cfaaff;
  padding: 10px;
  text-align: center;
  font-family: "VT323", monospace;
  letter-spacing: 2px;
  font-size: 1rem;
  border-radius: 6px;
}

#void-enter {
  margin-top: 15px;
  padding: 8px 30px;
  background: transparent;
  border: 1px solid #a200ff;
  color: #d0b0ff;
  cursor: pointer;
  font-family: "VT323", monospace;
  transition: all 0.2s ease-in-out;
}
#void-enter:hover {
  background: #a200ff22;
}

#void-error {
  color: #ff2e8e;
  font-size: 0.9rem;
  margin-top: 10px;
  letter-spacing: 1px;
  animation: glitchText 0.2s infinite alternate;
}

.hidden {
  display: none !important;
}

@keyframes glitchFade {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes glitchText {
  0% { text-shadow: 1px 0 red, -1px 0 blue; }
  100% { text-shadow: -1px 0 red, 1px 0 blue; }
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
  #terminal { width: 90%; height: 70vh; padding: 15px; }
  #terminal-input { font-size: 0.9rem; }
  .terminal-btn { padding: 5px 10px; font-size: 0.9rem; min-width: 70px; }
}
@media (max-width: 768px) {
  #terminal { width: 95%; height: 75vh; border-width: 2px; border-radius: 10px; }
  #terminal-output { font-size: 0.85rem; }
  .terminal-btn { padding: 4px 8px; font-size: 0.8rem; border-radius: 3px; }
  .terminal-x svg { width: 14px; height: 14px; }
}
@media (max-width: 480px) {
  #terminal { width: 96%; height: 80vh; padding: 12px; }
  #terminal-output { font-size: 0.8rem; }
  #terminal-input { font-size: 0.8rem; }
}
@media (max-width: 600px) {
  .awakening-title {
    font-size: 2rem;
  }
}

/* === MENU SECONDARIO (NUOVO, VERSIONE DEFINITIVA) === */
.sub-menu-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column-reverse; /* apre verso l'alto */
  align-items: flex-end;
  z-index: 1200;
}

/* Pulsante principale (simbolo ⟟⟒⟊) */
.sub-menu-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(217,0,213,0.5);
  background: rgba(10, 0, 30, 0.55);
  color: #D900D5;
  font-size: 1.9rem;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(217, 0, 213, 0.4);
  backdrop-filter: blur(6px);
  transition: all 0.35s ease;
  text-shadow: 0 0 10px rgba(217,0,213,0.6);
}
.sub-menu-toggle:hover {
  background: rgba(40, 0, 70, 0.8);
  box-shadow: 0 0 25px rgba(217, 0, 213, 0.7);
  transform: scale(1.05);
}

/* Contenitore bottoni (ora si apre verso l'alto) */
.sub-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px); /* parte dal basso */
  transition: all 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.sub-menu-container.active .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-10px); /* sale leggermente */
}
.sub-menu-title {
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  color: #D900D5;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-align: center;
  letter-spacing: 1px;
  pointer-events: none; /* il titolo non cliccabile */
}

/* Bottoni del menu */
.sub-btn {
  background: rgba(15, 0, 25, 0.75);
  border: 1px solid rgba(217,0,213,0.7);
  color: #D900D5;
  font-family: 'Courier New', monospace;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease;
  min-width: 140px;
  box-shadow: 0 0 10px rgba(217,0,213,0.25);
  backdrop-filter: blur(6px) saturate(140%);
}
.sub-btn:hover {
  background: #D900D5;
  color: #0a000a;
  box-shadow: 0 0 20px #D900D5;
  transform: scale(1.06);
}
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(5, 0, 10, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #a100ff;
  font-family: 'VT323', monospace;
  z-index: 999;
}

.overlay.hidden { display: none; }

.overlay-content {
  width: 80%;
  max-width: 600px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #5e00a3;
  border-radius: 12px;
  box-shadow: 0 0 20px #5e00a3;
  padding: 2rem;
  text-align: center;
}

.glitch-title {
  font-size: 1.6rem;
  color: #ff00ff;
  text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff;
  animation: glitch 0.6s infinite;
  margin-bottom: 1rem;
}

/* === AURA OVERLAY === */
#aura-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 0, 20, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(12px) saturate(120%);
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#aura-overlay.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

/* === Terminal container === */
.aura-terminal {
  position: relative;
  background: rgba(8, 0, 16, 0.8);
  border: 1px solid rgba(255, 0, 255, 0.25);
  border-radius: 18px;
  box-shadow:
    0 0 25px rgba(255, 0, 255, 0.3),
    inset 0 0 25px rgba(255, 0, 255, 0.08);
  color: #f6d7ff;
  text-shadow: 0 0 6px #b700ffcc;
  font-family: "Share Tech Mono", monospace;
  padding: 28px;
  width: 80%;
  max-width: 720px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  animation: aura-boot 1s ease forwards, aura-pulse 4s ease-in-out infinite alternate;
  backdrop-filter: blur(14px) brightness(1.15);
  overflow: visible;
}

/* Overlay glow */
.aura-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 0, 255, 0.15), rgba(0, 255, 255, 0.05));
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Header */
.aura-terminal h2 {
  color: #ff9aff;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 12px #ff00ffcc, 0 0 25px #ff66ff55;
  margin-bottom: 4px;
  animation: aura-glow 3s ease-in-out infinite alternate;
}

/* === Input / select === */
#aura-action,
#aura-input {
  background: rgba(10, 0, 20, 0.55);
  color: #ffe6ff;
  border: 1px solid rgba(255, 0, 255, 0.4);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  width: 100%;
  box-shadow: inset 0 0 10px rgba(255, 0, 255, 0.15);
  outline: none;
  transition: all 0.3s ease;
}

#aura-action {
  padding: 8px 12px;
  cursor: pointer;
}

#aura-action:hover {
  border-color: #ff66ff;
  box-shadow: 0 0 12px #ff00ff66;
}

#aura-input {
  padding: 12px;
  height: 120px;
  resize: none;
  color: #ffd9ff;
}

#aura-input:focus {
  border-color: #ff66ff;
  box-shadow: 0 0 16px #ff00ff66;
}

#aura-input::placeholder {
  color: #ffccff88;
  text-shadow: 0 0 6px #ff00ff55;
}

/* === Buttons === */
.aura-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.aura-buttons button {
  border: 1px solid #ff66ff66;
  background: rgba(0, 0, 0, 0.4);
  color: #ffccff;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.25s ease;
}

.aura-buttons button:hover {
  background: rgba(255, 0, 255, 0.15);
  box-shadow: 0 0 20px #ff33ff66;
  color: #ffffff;
  transform: translateY(-2px);
}

/* === Response box stile terminale === */
.aura-response {
  height: 260px; /* o la dimensione che preferisci */
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap; /* mantiene gli a capo */
  word-wrap: break-word;
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 0, 255, 0.2);
  border-radius: 8px;
  color: #ffccff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  line-height: 1.4;
}



/* Nasconde scrollbar su Webkit ma mantiene lo scroll */
.aura-response::-webkit-scrollbar {
  width: 6px;
}

.aura-response::-webkit-scrollbar-thumb {
  background: rgba(255,0,255,0.3);
  border-radius: 3px;
}

.aura-tag {
  color: #ff66ff;
  font-weight: bold;
  text-shadow: 0 0 6px #ff00ff66;
}
