/* General styles */
body {
    font-family: 'Press Start 2P', cursive;
    background-color: #000;
    margin: 0;
    padding: 0;
    text-align: center;
    color: white;
}

/* Fullscreen overlay screens */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}

/* Grass and Sky Background */
.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#87CEEB, #87CEEB 70%, #4caf50 70%, #4caf50); /* Blue sky and green grass */
    z-index: -1;
}

/* Hide screens by default */
#game-choice-screen, 
#name-screen, 
#cosmetic-screen,
#loading-screen, 
#main-content {
    display: none;
}

/* Loading screen transition */
#loading-screen {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* Buttons */
button {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    background-color: #FF7F27; /* Fiery orange */
    color: black;
    border: 4px solid black;
    padding: 10px 20px;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
    box-shadow: 0 0 10px #FF7F27;
    transition: all 0.2s ease-in-out;
    margin-top: 40px;
  }
  
  button:hover {
    background-color: black;
    color: #FF7F27;
    box-shadow: 0 0 20px #FF7F27;
  }
  
  button:active {
    transform: scale(0.95);
  }

/* Stats & Actions */
.status p {
    font-size: 20px;
    margin: 10px 0;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.actions button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
}

.actions button:hover {
    background-color: #0056b3;
}

/* Twinkling Stars */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2.5s infinite ease-in-out;
    opacity: 0.2;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Fancy Input Boxes */
.fancy-input {
    padding: 10px;
    font-size: 16px;
    border: 2px solid #FF7F27;
    border-radius: 5px;
    background-color: #333;
    color: white;
    margin: 10px 0;
}

.fancy-input:focus {
    outline: none;
    border-color: #87CEEB;
}

/* Cosmetic Grid */
.cosmetic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.cosmetic-item {
    padding: 15px;
    background-color: #444;
    border: 2px solid #FF7F27;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cosmetic-item:hover {
    background-color: #555;
}

.cosmetic-item.selected {
    background-color: #FF7F27;
    border-color: #87CEEB;
}

.name-generator {
    margin-top: 20px;
}

#random-name-btn {
    background-color: #FF7F27;
    border: 3px solid white;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 8px 15px;
    cursor: pointer;
    box-shadow: 3px 3px 0px #000000;
    transition: all 0.2s ease-in-out;
}

#random-name-btn:hover {
    background-color: #ffae00;
}

/* Speech Bubble */
.speech-bubble {
    position: absolute;
    background-color: white;
    color: black;
    border-radius: 10px;
    padding: 10px 15px;
    max-width: 200px;
    text-align: center;
    font-size: 14px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transform: translate(-50%, -120%);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 0 10px;
    border-color: white transparent transparent transparent;
    transform: translateX(-50%);
}

.hidden {
    display: none;
}
