* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background: #000;
}

.title-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.title-screen-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: -2rem;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo {
    width: 60%;
    max-width: 600px;
    animation: float 2s ease-in-out infinite;
}

.play-button {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.play-button:hover {
    transform: scale(1.1);
}

.play-button:active {
    transform: scale(0.95);
}

.play-button img {
    width: 120px;
    height: 120px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
}

.pause-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.pause-menu button {
    padding: 10px;
    font-family: 'Pusab', sans-serif;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pause-menu .title-screen-button {
    background-color: #FF5722;
}

.pause-menu button:hover {
    background-color: #45a049;
}

.pause-menu .title-screen-button:hover {
    background-color: #F44336;
}

.attempts-counter {
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: 'Pusab', sans-serif;
    color: white;
    font-size: 24px;
    z-index: 5;
}

.attempts-counter, .pause-menu button {
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

.death-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Pusab', sans-serif;
    z-index: 20;
}

.death-screen h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 
        -2px -2px 0 #000,  
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000;
}

.death-screen p {
    font-size: 24px;
    text-align: center;
    max-width: 80%;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

.control-hints {
    font-family: 'Pusab', sans-serif;
    color: white;
    font-size: 18px;
    text-align: center;
    margin-top: 10px;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

.mobile-pause-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    border-radius: 5px;
    display: none;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

.icon-change-button {
    width: 120px;  
    height: 120px; 
    cursor: pointer;
    transition: transform 0.2s;
    background: none;
    border: none;
}

.icon-change-button:hover {
    transform: scale(1.1);
}

.icon-selection-container {
    display: flex;
    align-items: center;
    position: relative;
}

.icon-selection-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.icon-selection-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    text-align: center;
    position: relative;
}

.icon-selection-content h2 {
    margin-bottom: 20px;
    font-family: 'Pusab', sans-serif;
    color: #4CAF50;
}

.icon-selection-content .icon-grid {
    gap: 30px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
}

.icon-selection-content .icon-option {
    width: 100px;
    height: 100px;
    cursor: pointer;
    transition: transform 0.2s;
}

.icon-selection-content .icon-option:hover {
    transform: scale(1.1);
}

.icon-selection-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;  
    transform: translateX(-50%);  
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center;
}

.icon-option {
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: transform 0.2s;
}

.icon-option:hover {
    transform: scale(1.1);
}

.icon-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.player-icon-preview {
    display: none;
}

.title-screen-bottom {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.websim-edition {
    font-family: 'Pusab', sans-serif;
    color: white;
    font-size: 18px;
    text-align: center;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

.ship-mode-toggle {
    margin-top: 20px;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 5px;
}

.ship-mode-label {
    font-family: 'Pusab', sans-serif;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.ship-mode-label input {
    width: 20px;
    height: 20px;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('/BG_titlescreen/game.png') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-screen .logo {
    width: 60%;
    max-width: 600px;
}

.progress-bar-container {
    width: 60%;
    max-width: 400px;
    height: 30px;
    border: 3px solid yellow;
    background: #000;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: lightblue;
    transition: width 0.5s ease-in-out;
}

.loading-tip {
    color: white;
    font-family: 'Pusab', sans-serif;
    text-align: center;
    font-size: 18px;
}

.coming-soon-button {
    width: 120px;
    height: 120px;
    background-color: #03A9F4;  
    border: 4px solid #2196F3;  
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.coming-soon-cross {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.coming-soon-cross::before,
.coming-soon-cross::after {
    content: '';
    position: absolute;
    background-color: #4CAF50;  
    width: 20px;  
    height: 120px;  
}

.coming-soon-cross::before {
    transform: rotate(90deg);
}

.coming-soon-button span {
    position: absolute;
    top: 50%;  
    left: 50%;  
    transform: translate(-50%, -50%);  
    font-family: 'Pusab', sans-serif;
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    z-index: 1;  
    text-align: center;  
    width: 100%;  
}

.coming-soon-button:hover {
    transform: scale(1.1);
    background-color: #00BCD4;  
}

.coming-soon-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.coming-soon-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    text-align: center;
    position: relative;
}

.coming-soon-content h2 {
    margin-bottom: 20px;
    font-family: 'Pusab', sans-serif;
    color: #4CAF50;
}

.coming-soon-content ul {
    list-style-type: none;
    padding: 0;
    margin-bottom: 20px;
}

.coming-soon-content li {
    background-color: #f1f1f1;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Pusab', sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close-popup-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #FF5722;
}

.close-popup-button:hover {
    color: #F44336;
}

.feature-status {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 10px;
}

.achievements-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.achievements-screen-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    text-align: center;
    position: relative;
}

.achievements-screen-content h2 {
    margin-bottom: 20px;
    font-family: 'Pusab', sans-serif;
    color: #4CAF50;
}

.achievements-list {
    display: grid;
    gap: 15px;
}

.achievement-item {
    background-color: #f1f1f1;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    font-family: 'Pusab', sans-serif;
}

.achievement-item .emoji {
    font-size: 40px;
    margin-right: 15px;
}

.achievement-item .achievement-details {
    text-align: left;
    flex-grow: 1;
}

.achievement-item .achievement-name {
    font-size: 18px;
    color: #333;
}

.achievement-item .achievement-description {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.achievement-item .achievement-status {
    width: 30px;
    height: 30px;
}

.locked-achievement {
    opacity: 0.5;
}

.version-label {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-family: 'Pusab', sans-serif;
    color: white;
    font-size: 14px;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

.icon-name {
    font-family: 'Pusab', sans-serif;
    font-size: 12px;
    color: #333;
    margin-top: 5px;
    text-align: center;
}

.icon-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
