/* ==================================================
     CONTAINER PRINCIPAL
  ================================================== */

  #academify-compiler {
    width: 100%;
    margin: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background-color: #1e1e1e;
    border: 1px solid #383838;
    border-radius: 10px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

    font-family:
      "Segoe UI",
      Arial,
      sans-serif;

    box-sizing: border-box;
  }

  #academify-compiler *,
  #academify-compiler *::before,
  #academify-compiler *::after {
    box-sizing: border-box;
  }


  /* ==================================================
     CABEÇALHO
  ================================================== */

  #academify-compiler .academify-ide-header {
    position: relative;

    min-height: 54px;
    padding: 10px 18px;

    display: flex;
    align-items: center;

    background-color: #2d2d2d;
    border-bottom: 1px solid #383838;
  }

  #academify-compiler .academify-window-dots {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  #academify-compiler .academify-dot {
    width: 15px;
    height: 15px;

    display: block;

    border-radius: 50%;
  }

  #academify-compiler .academify-dot-red {
    background-color: #ff5f56;
  }

  #academify-compiler .academify-dot-yellow {
    background-color: #ffbd2e;
  }

  #academify-compiler .academify-dot-green {
    background-color: #27c93f;
  }

  #academify-compiler .academify-ide-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    max-width: 60%;

    overflow: hidden;

    color: #cccccc;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;

    pointer-events: none;
  }


  /* ==================================================
     CORPO DA IDE
  ================================================== */

  #academify-compiler .academify-ide-body {
    width: 100%;
    min-width: 0;

    display: flex;
    flex-direction: column;
  }

  #academify-compiler .academify-editor-section {
    width: 100%;
    min-width: 0;

    overflow: hidden;

    background-color: #1e1e1e;
  }


  /* ==================================================
     EDITOR CODEMIRROR
  ================================================== */

  #academify-compiler .CodeMirror {
    width: 100%;
    height: 260px;

    overflow: hidden;

    background-color: #1e1e1e !important;
    color: #d4d4d4 !important;

    font-family:
      Consolas,
      Monaco,
      "Courier New",
      monospace;

    font-size: 15px;
    line-height: 1.6;
  }

  #academify-compiler .CodeMirror-lines {
    padding: 12px 0;
  }

  #academify-compiler .CodeMirror pre.CodeMirror-line,
  #academify-compiler .CodeMirror pre.CodeMirror-line-like {
    padding-left: 8px;
  }

  #academify-compiler .CodeMirror-gutters {
    background-color: #1e1e1e !important;
    border-right: 1px solid #333333 !important;
  }

  #academify-compiler .CodeMirror-linenumber {
    padding-right: 8px;

    color: #858585 !important;
  }


  /* ==================================================
     REMOVE O SCROLL HORIZONTAL
  ================================================== */

  /*
   * O editor continuará quebrando visualmente as linhas,
   * mas não exibirá nenhuma barra horizontal.
   */

  #academify-compiler .CodeMirror-hscrollbar {
    display: none !important;
  }

  #academify-compiler .CodeMirror-scrollbar-filler,
  #academify-compiler .CodeMirror-gutter-filler {
    display: none !important;
  }

  #academify-compiler .CodeMirror-scroll {
    overflow-x: hidden !important;
  }

  #academify-compiler .CodeMirror-sizer {
    min-width: 0 !important;
    border-right: none !important;
  }


  /* ==================================================
     SCROLL VERTICAL
  ================================================== */

  /*
   * O scroll vertical só aparece quando o código
   * ultrapassa a altura disponível no editor.
   */

  #academify-compiler .CodeMirror-vscrollbar {
    overflow-x: hidden !important;

    scrollbar-width: thin;
    scrollbar-color: #555555 #1e1e1e;
  }

  #academify-compiler .CodeMirror-vscrollbar::-webkit-scrollbar {
    width: 8px;
  }

  #academify-compiler .CodeMirror-vscrollbar::-webkit-scrollbar-track {
    background-color: #1e1e1e;
  }

  #academify-compiler .CodeMirror-vscrollbar::-webkit-scrollbar-thumb {
    background-color: #555555;
    border-radius: 8px;
  }

  #academify-compiler .CodeMirror-vscrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #6b6b6b;
  }


  /* ==================================================
     CURSOR E SELEÇÃO
  ================================================== */

  /*
   * Cursor branco para permanecer visível
   * sobre o fundo escuro.
   */

  #academify-compiler .CodeMirror-cursor {
    border-left: 2px solid #ffffff !important;
    border-right: none !important;
  }

  #academify-compiler .CodeMirror-focused {
    box-shadow: inset 0 0 0 1px #3c3c3c;
  }

  #academify-compiler .CodeMirror-selected {
    background-color: rgba(38, 79, 120, 0.65) !important;
  }

  #academify-compiler .CodeMirror-focused .CodeMirror-selected {
    background-color: rgba(38, 79, 120, 0.9) !important;
  }


  /* ==================================================
     CORES DA SINTAXE PYTHON
  ================================================== */

  #academify-compiler .cm-s-default .cm-keyword {
    color: #569cd6 !important;
  }

  #academify-compiler .cm-s-default .cm-builtin {
    color: #4ec9b0 !important;
  }

  #academify-compiler .cm-s-default .cm-variable {
    color: #9cdcfe !important;
  }

  #academify-compiler .cm-s-default .cm-variable-2 {
    color: #9cdcfe !important;
  }

  #academify-compiler .cm-s-default .cm-variable-3 {
    color: #4ec9b0 !important;
  }

  #academify-compiler .cm-s-default .cm-def {
    color: #dcdcaa !important;
  }

  #academify-compiler .cm-s-default .cm-string,
  #academify-compiler .cm-s-default .cm-string-2 {
    color: #ce9178 !important;
  }

  #academify-compiler .cm-s-default .cm-number {
    color: #b5cea8 !important;
  }

  #academify-compiler .cm-s-default .cm-operator {
    color: #d4d4d4 !important;
  }

  #academify-compiler .cm-s-default .cm-comment {
    color: #6a9955 !important;
    font-style: italic !important;
  }

  #academify-compiler .cm-s-default .cm-property {
    color: #9cdcfe !important;
  }

  #academify-compiler .cm-s-default .cm-error {
    color: #f44747 !important;
  }


  /* ==================================================
     TERMINAL
  ================================================== */

  #academify-compiler .academify-terminal-section {
    width: 100%;
    min-width: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background-color: #1e1e1e;
    border-top: 1px solid #383838;
  }

  #academify-compiler .academify-terminal-header {
    min-height: 42px;
    padding: 6px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background-color: #252526;
    border-bottom: 1px solid #303030;

    color: #a0a0a0;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  #academify-compiler #academify-clear-btn {
    padding: 5px 9px;

    background: transparent;
    border: 1px solid transparent;
    border-radius: 50px;

    color: #929292;

    font-family: inherit;
    font-size: 12px;
    line-height: 1.2;

    cursor: pointer;

    transition:
      color 0.2s ease,
      background-color 0.2s ease,
      border-color 0.2s ease;
  }

  #academify-compiler #academify-clear-btn:hover {
    color: #ffffff;

    background-color: #333333;
    border-color: #444444;
  }

  #academify-compiler #academify-clear-btn:focus-visible {
    outline: 2px solid #4fc1ff;
    outline-offset: 2px;
  }

  #academify-compiler #academify-output-terminal {
    width: 100%;
    height: 150px;
    min-height: 150px;

    margin: 0;
    padding: 15px 18px;

    overflow-x: hidden;
    overflow-y: auto;

    background-color: #1e1e1e;
    color: #cccccc;

    font-family:
      Consolas,
      Monaco,
      "Courier New",
      monospace;

    font-size: 14px;
    line-height: 1.55;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;

    scrollbar-width: thin;
    scrollbar-color: #555555 #1e1e1e;
  }

  #academify-compiler #academify-output-terminal::-webkit-scrollbar {
    width: 8px;
  }

  #academify-compiler #academify-output-terminal::-webkit-scrollbar-track {
    background-color: #1e1e1e;
  }

  #academify-compiler #academify-output-terminal::-webkit-scrollbar-thumb {
    background-color: #555555;
    border-radius: 8px;
  }

  #academify-compiler #academify-output-terminal::-webkit-scrollbar-thumb:hover {
    background-color: #6b6b6b;
  }

  #academify-compiler .academify-terminal-error {
    color: #f44747;
  }

  #academify-compiler .academify-terminal-status {
    color: #858585;
    font-style: italic;
  }


  /* ==================================================
     RODAPÉ
  ================================================== */

  #academify-compiler .academify-ide-footer {
    padding: 10px;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;

    background-color: #1e1e1e;
    border-top: 1px solid #383838;
  }

  #academify-compiler .academify-shortcut {
    display: none;

    color: #858585;

    font-family:
      Consolas,
      Monaco,
      "Courier New",
      monospace;

    font-size: 12px;
  }


  /* ==================================================
     BOTÃO EXECUTAR
  ================================================== */

  #academify-compiler #academify-run-btn {
    width: 100%;
    min-height: 46px;
    padding: 11px 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    background-color: #0e639c;
    border: none;
    border-radius: 6px;

    color: #ffffff;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;

    cursor: pointer;

    transition:
      background-color 0.2s ease,
      transform 0.1s ease,
      opacity 0.2s ease;
  }
  
  #academify-run-btn{
      border-radius: 50px!important;
  }

  #academify-compiler #academify-run-btn:hover:not(:disabled) {
    background-color: #1177bb;
  }

  #academify-compiler #academify-run-btn:active:not(:disabled) {
    transform: translateY(1px);
  }

  #academify-compiler #academify-run-btn:focus-visible {
    outline: 2px solid #4fc1ff;
    outline-offset: 2px;
  }

  #academify-compiler #academify-run-btn:disabled {
    opacity: 0.65;
    cursor: wait;
  }

  #academify-compiler .academify-run-icon {
    font-size: 13px;
  }


  /* ==================================================
     DESKTOP
  ================================================== */

  @media (min-width: 768px) {
    #academify-compiler .academify-ide-body {
      flex-direction: row;
    }

    #academify-compiler .academify-editor-section {
      width: 60%;
      border-right: 1px solid #383838;
    }

    #academify-compiler .academify-terminal-section {
      width: 40%;
      border-top: none;
    }

    #academify-compiler .CodeMirror {
      height: 440px;
    }

    #academify-compiler #academify-output-terminal {
      height: 398px;
      min-height: 398px;
    }

    #academify-compiler .academify-ide-footer {
      min-height: 80px;
      padding: 12px 24px;

      flex-direction: row;
      align-items: center;
      justify-content: space-between;
    }

    #academify-compiler .academify-shortcut {
      display: inline-block;
    }

    #academify-compiler #academify-run-btn {
      width: auto;
      min-width: 212px;
    }
  }


  /* ==================================================
     MOBILE
  ================================================== */

  @media (max-width: 767px) {
    #academify-compiler .academify-ide-header {
      min-height: 48px;
      padding: 10px 14px;
    }

    #academify-compiler .academify-dot {
      width: 12px;
      height: 12px;
    }

    #academify-compiler .academify-window-dots {
      gap: 8px;
    }

    #academify-compiler .academify-ide-title {
      max-width: 52%;
      font-size: 13px;
    }

    #academify-compiler .CodeMirror {
      height: 280px;
      font-size: 14px;
    }

    #academify-compiler #academify-output-terminal {
      height: 170px;
      min-height: 170px;
      font-size: 13px;
    }
  }


  /* ==================================================
     TELAS MUITO PEQUENAS
  ================================================== */

  @media (max-width: 420px) {
    #academify-compiler .academify-ide-title {
      max-width: 48%;
      font-size: 12px;
    }

    #academify-compiler .CodeMirror {
      height: 250px;
      font-size: 13px;
    }

    #academify-compiler #academify-output-terminal {
      height: 150px;
      min-height: 150px;
      font-size: 13px;
    }
  }