/* 1. THE RESET & FONT */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* 2. THE BACKGROUND (Moving Orange/Sunset Gradient) */
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #ff512f, #f09819, #e73c7e, #7928ca);
    background-size: 400% 400%;
    animation: gradientBG 12s ease infinite;
    padding: 20px; 
}    

    @keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 3. THE GLASS CONTAINER (The center box) */
.game-container {
    background: rgba(255, 255, 255, 0.1); /* Transparent white */
    backdrop-filter: blur(20px);         
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* RESPONSIVENESS */
    width: 100%;           
    max-width: 400px;  
    padding: 2rem;
    text-align: center;
    color: white;

    /* GRID LAYOUT */
    display: grid;
    grid-template-rows: repeat(auto-fit, min-content); 
    gap: 1rem;
}

/* 4. THE ELEMENTS */
#head {
    font-size: 1.8rem;
    letter-spacing: 1px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

#display-emoji {
    font-size: 5rem;
    margin: 20px 0;
    display: block;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
/* 5. THE INPUT FIELD  */
#guess-input {
    width: 100%;
    padding: 1rem;
    border-radius: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

#guess-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

#guess-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.stats-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.stat-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Glass border */
    border-radius: 12px;
    padding: 10px;
    font-weight: bold;
    backdrop-filter: blur(10px); /* Blur effect */
}

#next-btn {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 8px;
    border: none;
    color: white;
    cursor: pointer;
    width: 100%;
}

#next-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#next-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px); /* Lifts up slightly */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#next-btn:active {
    transform: translateY(0); /* Sinks back when clicked */
}
#result {
    height: 20px; /* Fixed height so the layout doesn't jump */
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transition: opacity 0.3s ease;
}
/* Styling the Restart Button */
#restart-button {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: rgba(78, 228, 78, 0.2); /* Soft green glass */
    color: #4ee44e; /* Bright green text */
    border: 2px solid rgba(78, 228, 78, 0.5);
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(78, 228, 78, 0.2);
    display: none; /* Keep hidden until game ends */
}

#restart-button:hover {
    background: rgba(78, 228, 78, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(78, 228, 78, 0.4);
    color: white;
}

#restart-button:active {
    transform: translateY(0);
}