#shipWelcomeScreen{
    overflow-y: auto;
    
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;

    position: absolute;
    
    top: calc(var(--header-height) + 1rem);

    width: 70vw;
    left: 15vw;
    height: calc(100vh - var(--header-height) - var(--header-height) - 4rem);

    display: none;
    z-index: 4;
    box-shadow:  inset 0px -1px 100px 100px rgba(0, 0, 0, 0.7);
    
   

}




@keyframes driftAndZoom {
    0%, 100% {
        transform: translateX(0%) translateY(0%) translateZ(0) scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.439));
      }
      25% {
        transform: translateX(-10%) translateY(-1%) translateZ(0) scale(1.05);
        filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.439));
      }
      50% {
        transform: translateX(10%) translateY(1%) translateZ(0) scale(0.95);
        filter: drop-shadow(0 0 7px rgba(0, 255, 255, 0.439));
      }
      75% {
        transform: translateX(-3%) translateY(0.5%) translateZ(0) scale(1.02);
        filter: drop-shadow(0 0 11px rgba(0, 255, 255, 0.439))
      }
  }

#shipWelcomeScreenImg{
    height: 50%;
    width: auto;
    margin-inline: auto;
    animation: driftAndZoom 120s infinite alternate ease-in-out;
    position: relative;
    z-index: -1;

}

#shipWelcomeScreenContentWrapper {
    height: 50%;
}

#shipWelcomeScreenInnerWrapper{
    display: flex;
    flex-direction: column;
    
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    
    border-radius: 10px;
    color: black;

}

.shipWelcomeReward{
    cursor: pointer;
}


#shipWelcomeRewardText{
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 10px;
    width: 70%;
    color: white;
    
    
}

#shipWelcomeScreenTextWrapper{
    width: 90%;
}

    
#shipWelcomeScreenContentWrapper{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: -5rem;
}



#whiteLineheaderWrapper{
    display: flex;
    align-items: center;
    justify-content: space-around;
    text-shadow:
    -1px -1px 1px rgba(255, 255, 255, 1),
    /* Top left */
    1px -1px 1px rgba(255, 255, 255, 1),
    /* Top right */
    -1px 1px 1px rgba(255, 255, 255, 1),
    /* Bottom left */
    1px 1px 1px rgba(255, 255, 255, 1),
    /* Bottom right */
    -1px 0 1px rgba(255, 255, 255, 1),
    /* Left */
    1px 0 1px rgba(255, 255, 255, 1),
    /* Right */
    0 -1px 1px rgba(255, 255, 255, 1),
    /* Top */
    0 1px 1px rgba(255, 255, 255, 1),
    /* Bottom */
    0 0 5px rgba(255, 255, 255, 1)
}

#whiteLineheaderWrapper>hr{
    width: 20%;
    color: rgba(255, 255, 255, 0.531);
}

#whiteLineheaderWrapper > h2{
    margin-block: 0.3rem;
}


.spacedOutLetters{
    letter-spacing: 0.05em;
    line-height: 1.5em;
}


#shipWelcomeRewardWrapper{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 50%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.133);
    border-top: 1px solid rgba(255, 255, 255, 0.132);
    gap: 2rem;
}

#shipWelcomeRewardWrapper>*{
    height: 100%;
    aspect-ratio: 2/3;
    
}




.selectedReward{
    border: 2px solid white;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(220, 213, 1, 0.7);
}

.avatarCaptainCard{
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100%;
    border-radius: 10px;
    aspect-ratio: 2/3;
    /* border: 1px solid rgba(255, 255, 255, 0.445); */
}

.avatarCaptainCard>p{
    position: absolute;
    background-color: rgba(0, 0, 0, 0.95);
    bottom: 0;
    width: 100%;
    left: 0%;
    border-radius: 5px;
    padding: 0.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    overflow: hidden;
    color: white;
}

.avatarCaptainCard>h4{
    text-align: center;
    font-size: 1rem;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    margin: 0;
    padding: 0.5rem;
    border-radius: 10px;
    
}

.shipThemeCard{
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100%;
    border-radius: 10px;
    aspect-ratio: 2/3;
    background-size: 100%;
}

.shipThemeCard>p{
    position: absolute;
    background-color: rgba(0, 0, 0, 0.95);
    bottom: 0;
    width: 100%;
    left: 0%;
    border-radius: 5px;
    padding: 0.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    overflow: hidden;
    color: white;
}

.shipThemeCard>h4{
    text-align: center;
    font-size: 1rem;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    background-color: rgba(0, 0, 0, 0.7);
    margin: 0;
    padding: 0.5rem;
    border-radius: 10px;
    
}




#shipWelcomeRewardWrapper>*> :first-child {
    transition: transform 0.2s
}
#shipWelcomeRewardWrapper>*> :first-child>p {
    display: none;
    font-size: 0.3rem;
}

#shipWelcomeRewardWrapper>*:hover> :first-child {
    transform: scale(2) translateY(-25%);
    z-index: 6;
}

#shipWelcomeRewardWrapper>*:hover> :first-child>p {
    transform: scale(2) translateY(-25%);
    display: block;
    z-index: 6;
}

#shipWelcomeScreenCloseBtn{
    font-size: large;
    padding: 0.5rem;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    margin-top: 1rem;
}

#shipWelcomeScreenCloseBtn:hover{
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

#shipWelcomeScreenDismissBtn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.1rem;
    line-height: 1;
    color: white;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#shipWelcomeScreenDismissBtn:hover {
    background: rgba(200, 0, 0, 0.75);
}

/* Undo the mobile mathProfile.css fixed-position override for card descriptions
   inside the ship reward screen — they should behave like the avatar/theme cards. */
@media (orientation: portrait), (max-width: 1000px), (max-height: 800px) {
    #shipWelcomeScreen .profileCardDesc {
        position: absolute;
        width: 75%;
        max-width: unset;
        left: 12.5%;
        top: 25%;
        transform: none;
        font-size: xx-small;
        padding: 0.2rem;
    }
}

/* ── Medium screens ────────────────────────────────────────────────────── */
@media screen and (max-width: 1450px) {
    #shipWelcomeScreen {
        top: calc(var(--header-height) + 2rem + 1vh);
        width: 90vw;
        max-width: 95%;
        left: 2.5vw;
        height: 80vh;
    }

    #shipWelcomeScreenImg {
        height: 40%;
    }

    #shipWelcomeRewardText {
        font-size: 0.8rem;
    }

    #shipWelcomeScreenTextWrapper {
        width: 90%;
    }

    .spacedOutLetters {
        letter-spacing: 0.05em;
        line-height: 1.5em;
    }

    #shipWelcomeRewardWrapper {
        width: 70%;
    }
}

/* ── Mobile / portrait ─────────────────────────────────────────────────── */
@media (orientation: portrait), (max-width: 700px), (max-height: 600px) {

    #shipWelcomeScreen {
        top: var(--header-height, 0px);
        left: 0;
        width: 100vw;
        max-width: 100%;
        height: calc(100vh - var(--header-height, 0px));
        border-radius: 0;
        overflow-y: auto;
    }

    #shipWelcomeScreenInnerWrapper {
        flex-direction: column;
        justify-content: flex-start;
        height: auto;
        min-height: 100%;
        padding-bottom: 1rem;
    }

    /* Shrink ship image significantly on mobile */
    #shipWelcomeScreenImg {
        height: 22vh;
        max-height: 180px;
    }

    #shipWelcomeScreenContentWrapper {
        height: auto;
        margin-top: 0;
        width: 100%;
        padding-inline: 0.75rem;
        box-sizing: border-box;
    }

    #whiteLineheaderWrapper > h2 {
        font-size: 1rem;
    }

    #shipWelcomeRewardText {
        font-size: 0.75rem;
        width: 95%;
        padding: 0.6rem;
    }

    /* Reward row: fixed height cards, allow scroll if very small */
    #shipWelcomeRewardWrapper {
        width: 100%;
        height: auto;
        gap: 0.75rem;
        padding-block: 0.75rem;
        flex-wrap: nowrap;
        justify-content: center;
    }

    #shipWelcomeRewardWrapper > * {
        height: 140px;
        aspect-ratio: 2/3;
        flex-shrink: 0;
    }

    /* Disable scale-on-hover for touch; keep transition for tap feedback */
    #shipWelcomeRewardWrapper > *:hover > :first-child,
    #shipWelcomeRewardWrapper > *:hover > :first-child > p {
        transform: none;
    }

    #shipWelcomeScreenCloseBtn {
        margin-top: 0.75rem;
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
}

