:root {
      --editor-font-size: 13px;
      --editor-line-height: 1.1;
      --line-number-font-size: 12px;
      --code-padding: 12px;
      --line-number-width: 70px;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    body {
      font-family: "Inter", "Segoe UI", sans-serif;
      background: #0f0f0f;
      color: #f5f5f5;
      min-height: 100vh;
      overflow-x: hidden;
      position: relative;
    }

    .main-container {
      display: flex;
      flex-direction: column;
      height: 100vh;
      padding: 20px;
      gap: .5rem;
      max-width: 1400px;
      margin: 0 auto;
      position: relative;
    }

    .header {
      text-align: center;
      padding: 20px 0;
      flex-shrink: 0;
    }

    h1 {
      font-size: 3rem;
      font-weight: 700;
      letter-spacing: 2px;
      margin-bottom: 0.5rem;
      background: linear-gradient(90deg, #00c6ff, #0072ff);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      position: relative;
      transition: all 0.3s ease;
    }
    
    .tagline {
      font-size: 1.2rem; 
      color: #aaa; 
      margin-bottom: 1rem; 
      transition: all 0.3s ease;
    }
    
    .line { 
      width: 100%; 
      height: 3px; 
      background: linear-gradient(90deg, #ffffffb9, #ffffffb9, #0072ff, #ffffffb9, #ffffffb9);
      background-size: 200% 200%;
      background-position: 0% 50%;
      margin: .5rem auto 0; 
      border-radius: 2px;
      animation: gradientFlow 6s ease-in-out infinite;
    }

    /* Контейнер редактора */
    .editor-container {
      flex: 2;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      position: relative;
    }

    .top-container {
        flex: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        z-index: 2;
        width: 100%;
        height: 100%;
        justify-content: center;
    }

    .editor-icon {
      color: #4ec9b0;
      font-size: 14px;
    }

    /* Контейнер для кода с нумерацией */
    #code-container {
        counter-reset: line-counter;
        flex: 1;
        padding: var(--code-padding) var(--code-padding) var(--code-padding) var(--line-number-width);
        white-space: pre;
        overflow: hidden;
        tab-size: 2;
        font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
        font-size: var(--editor-font-size);
        line-height: var(--editor-line-height);
        color: rgba(0, 255, 200, 0.5);
        width: 100%;
    }

    .code-line {
      font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
      font-size: var(--editor-font-size);
      line-height: var(--editor-line-height);
      min-height: calc(18px * var(--editor-line-height));
      position: relative;
      white-space: pre;
      word-wrap: normal;
      counter-increment: line-counter;
      font-weight: 400;
      margin: 0;
      padding: 0 0 1px 0;
      transition: all 0.3s ease;
    }

    .code-line::before {
      content: counter(line-counter);
      position: absolute;
      left: calc(-1 * var(--line-number-width) + 15px);
      width: calc(var(--line-number-width) - 20px);
      text-align: right;
      color: #6a737d;
      opacity: 0.7;
      font-size: var(--line-number-font-size);
      font-family: "JetBrains Mono", Consolas, monospace;
      user-select: none;
      font-weight: 300;
    }

    /* Консоль внизу */
    .console-container {
      flex: 1;
      display: flex;
      flex-direction: column;
      background: rgba(15, 15, 25, 0.9);
      border-radius: 8px;
      border: 1px solid rgba(100, 100, 150, 0.3);
      overflow: hidden;
      position: relative;
    }

    .console-header {
      background: rgba(30, 30, 40, 0.95);
      padding: 12px 20px;
      border-bottom: 1px solid rgba(100, 100, 150, 0.3);
      font-weight: 500;
      color: #9cdcfe;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }

    .console-icon {
      color: #4ec9b0;
      font-size: 14px;
    }

    #console-output {
      flex: 1;
      padding: var(--code-padding);
      overflow-y: auto;
      overflow-x: hidden;
      font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
      font-size: var(--editor-font-size);
      line-height: var(--editor-line-height);
      color: #d4d4d4;
      position: relative;
    }

    /* Стили для вывода консоли */
    .console-line {
      font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
      font-size: var(--editor-font-size);
      line-height: var(--editor-line-height);
      margin: 4px 0;
      padding: 2px 0;
      white-space: pre-wrap;
      word-wrap: break-word;
      opacity: 0;
      animation: fadeIn 0.5s ease forwards;
      position: relative;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(5px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .console-log { color: #d4d4d4; }
    .console-info { color: #569cd6; }
    .console-success { color: #4ec9b0; }
    .console-warning { color: #dcdcaa; }
    .console-error { color: #f44747; }
    .console-debug { color: #c586c0; }
    .console-emoji { color: #ffcc66; }
    .console-divider { color: #6a9955; font-style: italic; }
    .console-loading { color: #9cdcfe; }
    /* Подсветка синтаксиса */
    .keyword { color: rgba(86, 156, 214, 0.5); font-weight: 500; }
    .type { color: rgba(78, 201, 176, 0.5); font-weight: 400; }
    .string { color: rgba(206, 145, 120, 0.5); }
    .comment { color: rgba(106, 153, 85, 0.5); font-style: italic; }
    .number { color: rgba(181, 206, 168, 0.5); }
    .decorator { color: rgba(197, 134, 192, 0.5); }

    @keyframes gradientFlow {
      0%   { background-position: 0% 50%; }
      50%  { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    /* Технологии и контакты */
    .footer-content {
      display: flex;
      flex-direction: column;
      gap: 20px;
      margin-top: 20px;
      padding-top: 20px;
    }

    .tech-row {
      display: flex;
      justify-content: center;
      gap: 28px;
      align-items: flex-start;
      flex-wrap: wrap;
      background: linear-gradient(90deg, #ffffffb9, #ffffffb9, #0072ff, #ffffffb9, #ffffffb9);
      background-size: 200% 200%;
      background-position: 0% 50%;
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: gradientFlow 6s ease-in-out infinite;
    }
    
    .tech-item { 
      display: flex; 
      flex-direction: column; 
      align-items: center; 
      gap: 6px;
    }
    
    .tech-item i { 
      font-size: 36px; 
      color: #9cdcfe;
    }
    
    .tech-label { 
      font-size: 12px; 
      color: #9cdcfe;
      letter-spacing: 0.04em; 
      text-align: center; 
      min-width: 60px; 
    }
    
    .contacts {
        display: flex;
        gap: 1rem;
        justify-content: center;
        position: absolute;
        top: 0;
        right: 0;
        margin: 1rem;
        z-index: 2;
    }
    
    .contact-item a {
      display: flex; 
      flex-direction: column; 
      align-items: center; 
      gap: 6px;
      text-decoration: none; 
      font-size: 14px;
      background: linear-gradient(90deg, #00c6ff, #0072ff);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      transition: transform 0.3s ease;
    }
    
    .contact-item i { 
      font-size: 32px; 
      color: #4ec9b0;
    }
    
    .contact-label { 
      color: #4ec9b0;
      letter-spacing: 0.04em; 
      text-align: center; 
    }
    
    .contact-item a:hover { 
      transform: translateY(-2px);
    }
    
    footer { 
      font-size: 0.9rem; 
      color: #555; 
      text-align: center;
      margin-top: 20px;
      padding: 10px;
    }

    .typing::after {
      content: "▋";
      display: inline-block;
      margin-left: 1px;
      color: #cccccc;
      animation: blink 1s infinite;
      font-weight: normal;
      vertical-align: baseline;
    }
    @keyframes blink { 0%,100% {opacity:1;} 50% {opacity:0;} }

    /* Полоса прокрутки */
    ::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }

    ::-webkit-scrollbar-track {
      background: rgba(30, 30, 40, 0.5);
      border-radius: 5px;
    }

    ::-webkit-scrollbar-thumb {
      background: rgba(100, 100, 150, 0.5);
      border-radius: 5px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: rgba(120, 120, 170, 0.7);
    }

    /* Адаптивные стили */
    @media (max-width: 1600px) {
      :root {
        --editor-font-size: 12px;
        --line-number-font-size: 11px;
      }
      .main-container {
        padding: 15px;
      }
    }

    @media (max-width: 1200px) {
      :root {
        --editor-font-size: 11px;
        --line-number-font-size: 10px;
        --line-number-width: 60px;
      }
      .tech-row {
        gap: 20px;
      }
      .contacts {
        gap: 30px;
      }
    }

    @media (max-width: 900px) {
      :root {
        --editor-font-size: 10px;
        --line-number-font-size: 9px;
        --line-number-width: 50px;
        --code-padding: 10px;
      }
      h1 {
        font-size: 2.5rem;
      }
      .tech-row {
        gap: 15px;
      }
      .tech-item i {
        font-size: 28px;
      }
      .contacts {
        gap: 25px;
      }
      .contact-item i {
        font-size: 28px;
      }
    }

    @media (max-width: 600px) {
      :root {
        --editor-font-size: 9px;
        --line-number-font-size: 8px;
        --line-number-width: 45px;
        --code-padding: 8px;
      }
      .main-container {
        padding: 10px;
        gap: 15px;
      }
      h1 {
        font-size: 2rem;
      }
      .tagline {
        font-size: 1rem;
      }
      .tech-row {
        gap: 12px;
      }
      .tech-item i {
        font-size: 24px;
      }
      .tech-label {
        font-size: 10px;
        min-width: 50px;
      }
      .contacts {
        gap: 20px;
      }
      .contact-item i {
        font-size: 24px;
      }
      .contact-label {
        font-size: 10px;
      }
    }