  body {
    font-family: monospace;
  }

  .body-container {
    background: url("../img/background.png") no-repeat center center;
    background-size: cover;
    border:6px double #f5f5f5;
    box-shadow:inset 0 0 0 4px rgba(245,245,245,0.3);
    padding:20px;
  }

  .terminal-window {
    background: linear-gradient(180deg, #1a1a1a, #0d0d0d);
    border: 2px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,255,0,0.2);
    width: 90%;
    max-width: 800px;
    color: #00ff00;
    overflow: hidden;
  }

  .terminal-header {
    background: #222;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
  }

  .terminal-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    font-weight: bold;
    font-size: 14px;
  }

  .terminal-logo {
    height: 18px;
  }

  .terminal-buttons {
    display: flex;
    gap: 6px;
  }

  .terminal-btn { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
  .btn-red { background: #ff5f56; }
  .btn-yellow { background: #ffbd2e; }
  .btn-green { background: #27c93f; }

  .terminal-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: rgba(0,0,0,0.85);
    text-align: left;
  }

  .terminal-body img {
    width: 15%;
    max-width: 100px;
    min-width: 30px;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
  }

  .terminal-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
  }

  .terminal-text p {
    color: whitesmoke;
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
  }

  #title { font-size: clamp(1rem, 2.5vw, 1.8rem); }
  #subtitle { font-size: clamp(0.8rem, 2vw, 1.2rem); }
  #title::after, #subtitle::after {
    content: "_";
    animation: blink 1s step-end infinite;
    color: whitesmoke;
  }
  @keyframes blink { 50% { opacity: 0; } }

  .node {
    width: 40px;
    height: 40px;
    border: 2px solid #00ff00;
    border-radius: 50%;
    margin: auto;
    box-shadow: 0 0 10px #00ff00;
    background: transparent;
    z-index: 2;
  }
  @keyframes drawLine {
    to {
      stroke-dashoffset: 0;
    }
  }

  .active-node {
    background: #00ff00;
    animation: pulseNode 1s infinite;
    box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
  }
  @keyframes pulseNode {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00; }
    50% { opacity: 0.6; box-shadow: 0 0 5px #00ff00; }
  }

  .overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transition: opacity 0.3s ease-in-out;
  }

  .overlay.hidden {
    opacity: 0;
    pointer-events: none;
  }

  .popup-terminal {
    width: 90%;
    max-width: 500px;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
  }

  .popup-terminal .terminal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .popup-terminal .terminal-body::-webkit-scrollbar {
    width: 6px;
  }

  .popup-terminal .terminal-body::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 3px;
  }

  .popup-terminal .terminal-body::-webkit-scrollbar-track {
    background: #111;
  }

  .popup-text {
    font-size: 1rem;
    color: #00ff00;
  }

  .popup-question {
    font-size: 1.1rem;
    font-weight: bold;
    color: #00ff00;
  }

  #editor {
    width: 100%;
    height: 200px;
    background: #000;
    color: #00ff00;
    border: 1px solid #333;
    font-family: monospace;
    font-size: 14px;
    overflow: hidden;
  }

  .ace-monokai, .ace_editor {
    background: #000 !important;
    color: #00ff00 !important;
  }

  .ace_scrollbar {
    width: 6px !important;
  }

  .ace_scrollbar::-webkit-scrollbar {
    width: 6px;
  }

  .ace_scrollbar::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 3px;
  }

  .ace_scrollbar::-webkit-scrollbar-track {
    background: #111;
  }

  .ace_cursor {
    border-left: 2px solid #00ff00 !important;
  }

  .ace-monokai .ace_marker-layer .ace_active-line {
    background: rgba(0, 255, 0, 0.05) !important;
  }

  .ace-monokai .ace_gutter-active-line {
    background-color: rgba(0, 255, 0, 0.08) !important;
  }

  .btn-terminal {
    background: #00ff00;
    color: black;
    border: none;
    padding: 6px 50px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    align-self: center;
    flex-shrink: 0;
  }

  .btn-terminal:hover {
    background: #33ff33;
  }

  .btn-terminal:disabled {
    background: #33ff33;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
  }

  .btn-out {
    background: #ff5f56;
    color: white;
    border: none;
    padding: 6px 50px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    align-self: center;
    flex-shrink: 0;
  }
  
  .btn-out:hover {
    background: #ff7b7b;
  }

  #completionPopupOverlay .terminal-body {
    justify-content: center;
    align-items: center;
    gap: 15px;
    text-align: center;
  }

  #completionPopupOverlay .terminal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
  }

  #completionPopupOverlay .terminal-actions .btn-terminal {
    flex: 1 1 200px;
    padding: 10px 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  @keyframes popupAppear {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }