body {
    background-color: black;
    margin: 0;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: white;
}
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
}
.top-image {
    width: 100%;
    max-width: 600px;
}
.bottom-content {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}
.side-image {
    max-width: 300px;
    width: 40%;
}
.start-button {
    background-color: #ff4500; /* Orangey-red */
    color: white;
    border: 4px solid white;
    padding: 15px 30px;
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    cursor: pointer;
    text-shadow: 2px 2px #000000;
    box-shadow: 4px 4px 0px #ffffff;
    transition: all 0.1s ease-in-out;
}
.start-button:hover {
    background-color: #ff6347; /* Lighter orangey-red */
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #ffffff;
}
.start-button:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #ffffff;
}

/* Name Entry Screen Styles */
.prompt-text {
    font-size: 24px;
    margin-bottom: 30px;
    text-shadow: 2px 2px #000000;
}
.name-input-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}
.name-input {
    width: 60px;
    height: 80px;
    background-color: black;
    border: 4px solid white;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 48px;
    text-align: center;
    text-transform: uppercase;
    caret-color: white;
    padding: 0;
    line-height: 80px;
}
.name-input:focus {
    outline: none;
    border-color: #ff4500;
    box-shadow: 0px 0px 15px #ff4500;
}
.name-entry-image {
    max-width: 150px;
}

.name-entry-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px; /* To prevent layout shift */
    margin-bottom: 20px;
}

.kicker-image {
    position: absolute;
    width: 80px;
    display: none;
    right: -100px;
}

#username-display {
    font-size: 32px;
    color: #ff4500;
    text-shadow: 2px 2px #000;
    display: none;
}

@keyframes kick {
    0% { transform: translateX(0) rotate(0deg); }
    40% { transform: translateX(-30px) rotate(-15deg); }
    100% { transform: translateX(0) rotate(0deg); }
}

.kick-animation {
    display: block !important;
    animation: kick 0.5s ease-in-out;
}

@keyframes fly-away {
    0% { transform: translateX(0) rotate(0); opacity: 1; }
    100% { transform: translateX(100vw) rotate(720deg); opacity: 0; }
}

.fly-away-animation {
    animation: fly-away 0.8s ease-in forwards;
}

/* Final Screen Styles */
#final-screen {
    position: relative;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

#final-username {
    font-size: 32px;
    margin-top: 20px;
}

.final-screen-image {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#final-kris {
    width: 75px; /* 0.5x of original 150px */
}

#final-vessel {
    width: 150px; /* 2x size of kris image (150px) */
    position: absolute;
    /* Position it relative to the username div */
    bottom: 0;
    left: 100%;
    margin-left: 20px;
}

.visible {
    opacity: 1;
}

/* Chat Styles */
#chats-wrapper {
    margin-top: 30px;
    width: 100%;
    display: flex;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    justify-content: center;
    flex-wrap: wrap;
}
.chat-container {
    width: 100%;
    max-width: 400px;
    border: 2px solid white;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid white;
}
.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 5px;
}
.chat-header .name {
    font-size: 16px;
}
.chat-log {
    height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    padding-right: 10px; /* For scrollbar spacing */
    flex-grow: 1;
}
/* Simple scrollbar styling */
.chat-log::-webkit-scrollbar {
    width: 8px;
}
.chat-log::-webkit-scrollbar-track {
    background: #333;
}
.chat-log::-webkit-scrollbar-thumb {
    background: #888;
}
.chat-log::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.chat-input-container {
    display: flex;
}
.chat-input {
    flex-grow: 1;
    background-color: black;
    border: 2px solid white;
    color: white;
    font-family: 'Press Start 2P', cursive;
    padding: 10px;
    font-size: 14px;
}
.chat-input:focus {
    outline: none;
    border-color: #ff4500;
}
.send-button {
    background-color: #ff4500;
    color: white;
    border: 2px solid white;
    padding: 10px 15px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
}
.chat-message {
    margin-bottom: 10px;
    line-height: 1.4;
    max-width: 90%;
}
.user-message {
    color: lime; /* User message color */
    align-self: flex-start;
}
.vessel-message {
    color: #d8a2ff; /* Vessel message color */
    align-self: flex-end;
    text-align: right;
}
.kris-message {
    color: #6a9eff; /* Kris message color */
    align-self: flex-end;
    text-align: right;
    font-style: italic;
}