body {
    margin: 0;
    background: #242424;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    transition: background 2s ease;
  }
  
  /* Удаляем стили для A-Frame, так как мы перешли на Three.js */
  #canvas-container {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 2000; 
    outline: none;
  }
  
  .label {
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 18px;
    position: absolute;
    bottom: 86px;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s, color 1s ease;
    z-index: 1000;
  }
  .icons {
    display: flex;
    gap: 36px;
    padding-bottom: 130px;
    z-index: 3000;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }
  .icon {
    cursor: pointer;
    transition: fill 1s ease;
    width: 50px;
    height: 50px;
  }
  #habr.icon {
    transform: scale(0.90);
    transform-origin: bottom;
  }
  #linkedin.icon {
    transform: scale(0.95);
    transform-origin: bottom;
  }
  
  .icon-link {
    display: inline-block;
  }
  .text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1001;
    pointer-events: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 20vw;
    text-align: center;
    transform: translateY(-100px);
  }
  .text-overlay span {
    display: inline-block;
    opacity: 0;
  }
  .text-overlay.active span {
    animation: bounceIn 0.6s ease-out forwards;
  }
  .text-overlay.leaving span {
    animation: bounceOut 0.6s ease-out forwards;
  }
  @keyframes bounceIn {
    0% { opacity: 0; transform: translateY(20px); }
    50% { opacity: 1; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
  }
  @keyframes bounceOut {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-10px); }
    100% { opacity: 0; transform: translateY(20px); }
  }
  .code-overlay {
    position: absolute;
    top: 30px;
    left: 30px;
    font-family: 'Source Code Pro', monospace;
    opacity: 0.5;
    color: #DCDCAA;
    white-space: pre-wrap;
    max-width: 600px;
    z-index: 0;
    pointer-events: none;
    box-sizing: border-box;
    padding-bottom: 30px;
  }
  .code-keyword { color: #FFFFFF; }
  .code-string { color: #E394DC; }
  .code-variable { color: #74C1FA; }
  .code-number { color: #EBC88D; }
  .code-comment { color: #6A9955; }
  .code-property { color: #E394DC; }
  
  @media (max-width: 600px) {
    .code-overlay {
      top: 30px;
      left: 30px;
      right: 30px;
      opacity: 0.3;
      padding-bottom: 30px;
    }
    body {
      overflow: hidden;
    }
    /* a-scene удален, но высоту контейнера можно регулировать тут если надо */
    #canvas-container { height: 100%; }
    
    .label { font-size: 14px; bottom: 72px; }
    .icons { gap: 26.4px; padding-bottom: 100px; }
    .icon { width: 40px; height: 40px; }
    .text-overlay {
        /* ВАЖНО: чтобы буквы переносились на 2–3 строки, а не “столбиком” */
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: flex-start;
        align-content: flex-start;
      
        height: 70%;
        font-size: calc(100vw / 2);
        padding: 10px 10px;
        box-sizing: border-box;
        transform: none;
        line-height: 0.9;
      }
      
      .text-overlay span {
        display: inline-block;
        width: auto;
        text-align: left;
        padding-left: 0;
        box-sizing: border-box;
      }
      
  }