body {
    margin: 0;
    overflow: hidden;
    background-color: #00001a;
    font-family: 'Inter', sans-serif;
}

canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

#project-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46vw;
    max-width: 800px;
    height: 80vh;
    max-height: 90vh;
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: white;
    z-index: 100;
    
    display: flex;
    flex-direction: column;
    padding: 32px 0 24px 24px;
    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;

    overflow: visible;

    scrollbar-width: thin;
    scrollbar-color: #888 rgba(0, 0, 0, 0.9);
}

#project-modal-content {
    position: relative;
    flex: 1 1 auto;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    border-radius: 15px;
    padding: 0 18px 0 18px;
    box-sizing: border-box;
}

#project-modal-content::-webkit-scrollbar {
    width: 12px;
    background: transparent;
    border-radius: 15px;
}

#project-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 15px;
    border: 3px solid rgba(0,0,0,0.9);
}

#project-modal-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.9);
    border-radius: 15px;
    margin: 12px 4px;
}

#project-modal-content {
    scrollbar-width: thin;
    scrollbar-color: #888 rgba(0,0,0,0.9);
}

#project-modal.modal-visible {
    opacity: 1;
    visibility: visible;
}

.modal-close-button {
    position: absolute;
    top: 0px;
    right: 0px;
    z-index: 10;
    background: none;
    border: none;
    color: #888;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    padding-right: 8px;
}

.modal-close-button:hover {
    color: white;
}

#modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
}

#modal-subtext {
    font-size: 1.6rem;
    font-weight: 500;
    color: #ccc;
    margin-top: 0;
    margin-bottom: 2rem;
    line-height: 1.6;
}

#modal-body {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
    color: #aaa;
    max-width: 44vw;
    overflow: hidden;
    word-break: break-word;
    margin-bottom: 0.5rem;
    padding: 0 8px 0 0;
}

.modal-wide {
    max-width: 700px;
    width: 90vw;
}

#modal-footer {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 68px;
    padding-bottom: 12px;
}

.modal-footer-icon {
    width: 40px;
    height: 40px;
    opacity: 0.85;
    transition: opacity 0.2s;
    filter: invert(1) brightness(2);
}

.modal-footer-icon:hover {
    opacity: 1;
    cursor: pointer;
}

.modal-arrows-container {
    position: absolute;
    right: 30px;
    bottom: 30px;
    display: flex;
    gap: 8px;
    z-index: 102;
}

.modal-arrow {
    background: none;
    border: none;
    color: #888;
    font-size: 1.4rem;
    opacity: 0.5;
    cursor: pointer;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, color 0.2s;
}

.modal-arrow.active {
    color: #fff;
    opacity: 1;
    cursor: pointer;
}

.modal-arrow.inactive {
    color: #888;
    opacity: 0.5;
    cursor: default;
}

#floating-profile-box {
    position: fixed;
    top: 50%;
    left: calc(50% + 420px);
    transform: translateY(-50%);
    z-index: 101;
    background: rgba(20, 20, 40, 0.85);
    border-radius: 18px;
    padding: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    max-width: 20vw;
    max-height: 70vh
}

#floating-profile-box img {
    max-width: 350px;
    max-height: 700px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

#project-modal {
    height: 80vh;
    max-height: 90vh;
    overflow-y: auto; 
}

@media (max-width: 900px) {
    #project-modal {
        width: 95vw;
        max-width: 98vw;
        padding: 18px;
        font-size: 1rem;
    }
    .modal-content {
        padding: 0;
    }
    #modal-title {
        font-size: 2rem;
    }
    #modal-subtext {
        font-size: 1.2rem;
    }
    #modal-body {
        font-size: 1rem;
        max-width: 90vw;
    }
}

@media (max-width: 600px) {
    #project-modal {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 8px;
    }
    #modal-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    #modal-subtext {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    #modal-body {
        font-size: 0.95rem;
        max-width: 98vw;
        margin-bottom: 0.5rem;
    }
    .modal-footer-icon {
        width: 32px;
        height: 32px;
    }
}

#modal-body, #modal-title, #modal-subtext {
    word-break: break-word;
    overflow-wrap: break-word;
}

#galaxy-help-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  max-width: 90vw;
  background-color: rgba(0, 0, 0, 0.92);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 15px;
  color: white;
  z-index: 101;
  display: flex;
  flex-direction: column;
  padding: 32px 24px 24px 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#galaxy-help-modal.modal-visible {
  opacity: 1;
  visibility: visible;
}

#galaxy-help-modal .modal-content {
  padding: 0;
}

#galaxy-help-modal .modal-close-button {
  position: absolute;
  top: 10px;
  right: 18px;
  background: none;
  border: none;
  color: #888;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

#galaxy-help-modal .modal-close-button:hover {
  color: white;
}

#galaxy-help-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-family: 'Inter', monospace, sans-serif;
  text-align: center;
}

#galaxy-help-body {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: #cce;
  text-align: center;
  font-family: 'Inter', monospace, sans-serif;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

#pixi-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}