:root {
    --primary: #9E6129;
    --secondary: #E6AF73;
    --background: #3E1E13;
    --surface: #673F1F;
    --text: #ffffff;
  }
  
  body {
    margin: 0;
    padding: 0;
    background: var(--background);
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
  }
  
  #unity-container {
    background: var(--surface);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: fit-content; /* Changed from 90% to fit-content */
    max-width: 1320px;
    margin: 20px auto; /* Added auto for horizontal centering */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center children horizontally */
}

#unity-canvas {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #231F20;
    transition: transform 0.3s ease;
    margin: 0 auto; /* Center canvas */
    display: block; /* Remove extra space */
}
  
  #unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    text-align: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
  
  #unity-logo {
    width: 154px;
    height: 130px;
    margin: 0 auto 15px;
    background: url('unity-logo-dark.png') no-repeat center;
    animation: pulse 2s infinite;
  }
  
  #unity-progress-bar-empty {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
  }
  
  #unity-progress-bar-full {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
  }
  
  #unity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    width: 90%;
  }
  
  #unity-build-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  
  #unity-fullscreen-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#unity-fullscreen-button::before {
    content: "⤢";
    color: white;
    font-size: 24px;
    line-height: 1;
}

#unity-fullscreen-button:hover {
    transform: scale(1.1);
    background: var(--secondary);
}
  
  .info-button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-left: 15px;
  }
  
  .info-button:hover {
    background: var(--secondary);
    transform: scale(1.1);
  }
  
  .info-button:hover::after {
    content: "Proyecto para la asignatura Diseño de Videojuegos realizado por Jordi Beltran, Enrique Morcillo, Sofia Principi, Pau Torrelles y Mario Gil.";
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 300px;
    background: rgba(0, 0, 0, 0.95);
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
    z-index: 1000;
  }
  
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @media (max-width: 768px) {
    #unity-container {
        margin: 0;
        padding: 10px;
        width: 100%; /* Full width on mobile */
        border-radius: 0;
    }
    
    #unity-canvas {
        width: 100% !important; /* Force full width on mobile */
        height: auto !important;
    }
    
    #unity-footer {
      flex-wrap: wrap;
      gap: 10px;
    }
    
    .info-button:hover::after {
      width: 250px;
      font-size: 12px;
    }
  }