@font-face {
  font-family: 'VNMMono';
  src: url('./assets/fonts/VNMMono-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

body {
    background: #282a36;
    color: #f8f8f2;
    font-family: 'VNMMono', 'Fira Mono', 'Consolas', 'Monaco', monospace;
    margin: 0;
    padding: 40px;
    overflow-x: hidden;
    width: 100%;
  }
  
  .terminal {
    background: #232634;
    border-radius: 8px;
    box-shadow: 0 8px 32px #0008;
    max-width: 1200px;
    width: 100%;
    margin: auto;
    overflow: hidden;
  }
  
  .terminal-header {
    background: #181a20;
    padding: 8px 16px;
    display: flex;
    align-items: center;
  }
  .terminal-nav {
    background: #181a20;
    display: flex;
    gap: 20px;
    text-align: left;
    padding: 8px 16px;
  }
  .terminal-nav-button {
    cursor: pointer;
  }

  .terminal-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: opacity 0.2s;
  }

  .terminal-button:hover {
    opacity: 0.8;
  }

  .terminal-button-minimize {
    background-color: #ffbd44;
  }

  .terminal-button-maximize {
    background-color: #00ca4e;
  }

  .terminal-button-close {
    background-color: #ff605c;
  }

  .terminal-button-minimize::after {
    content: '−';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .terminal-button-minimize:hover::after {
    opacity: 1;
  }

  .terminal-button-maximize::after {
    content: '□';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 8px;
    font-weight: bold;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .terminal-button-maximize:hover::after {
    opacity: 1;
  }

  .terminal-button-close::after {
    content: '×';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .terminal-button-close:hover::after {
    opacity: 1;
  }
  
  .terminal-title {
    /* margin-left: 16px; */
    color: #a6e22e;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
    flex: 1;
  }
  
  .terminal-body {
    padding: 16px;
    font-size: 1em;
    overflow-x: auto;
  }
  .ASCII {
    padding: 0px 20px 10px 0px;
    font-size: 1em;
    white-space: pre;
    overflow-x: auto;
    flex-shrink: 0;
  }
  .info {
    font-size: 1em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
    white-space: pre-line;
  }
  .result {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0px 0px 10px 0px;
    font-size: 1em;
    overflow-x: auto;
  }
  .command {
    color: #a6e22e;
    font-weight: bold;
  }
  .command-text {
    color: #f8f8f2;
    font-weight: normal;
    font-size: inherit;
  }
  .green {
    color: #a6e22e;
  }

/* Mobile responsive design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .terminal {
    border-radius: 4px;
    max-width: 100%;
  }

  .terminal-header {
    padding: 6px 12px;
    flex-wrap: wrap;
    min-width: 0;
  }

  .terminal-title {
    font-size: 0.85em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .terminal-button {
    width: 10px;
    height: 10px;
  }

  .terminal-buttons {
    gap: 6px;
  }

  .terminal-button-minimize::after {
    font-size: 8px;
  }

  .terminal-button-maximize::after {
    font-size: 6px;
  }

  .terminal-button-close::after {
    font-size: 10px;
  }

  .terminal-nav {
    padding: 6px 12px;
    gap: 10px;
    flex-wrap: wrap;
    overflow-x: auto;
  }

  .terminal-nav-button {
    font-size: 0.9em;
  }

  .terminal-body {
    font-size: 0.8em;
    padding: 12px;
    overflow-x: auto;
  }

  .command {
    display: block;
    margin-bottom: 8px;
  }

  .result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    overflow-x: auto;
    width: 100%;
  }

  .ASCII {
    float: none;
    text-align: left;
    font-size: 0.6em;
    margin-bottom: 15px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .info {
    float: none;
    text-align: left;
    font-size: 0.75em;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .info a {
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
  }

  .terminal-header {
    padding: 4px 8px;
  }

  .terminal-nav {
    padding: 4px 8px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .terminal-nav-button {
    font-size: 0.8em;
  }

  .terminal-title {
    font-size: 0.75em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .terminal-button {
    width: 8px;
    height: 8px;
  }

  .terminal-buttons {
    gap: 4px;
  }

  .terminal-button-minimize::after {
    font-size: 6px;
  }

  .terminal-button-maximize::after {
    font-size: 5px;
  }

  .terminal-button-close::after {
    font-size: 8px;
  }

  .terminal-body {
    font-size: 0.7em;
    padding: 8px;
  }

  .command {
    font-size: 0.75em;
    display: block;
    margin-bottom: 6px;
  }

  .result {
    width: 100%;
    overflow-x: auto;
  }

  .ASCII {
    font-size: 0.5em;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .info {
    font-size: 0.65em;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .info a {
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
  }
}