/* ==== Base Reset and Layout ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: black; /* Changed background to black */
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
    flex-direction: column;
}

/* ==== Game Container ==== */
.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(255, 87, 51, 0.3);
    max-width: 450px;
    width: 100%;
    text-align: center;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ==== Heading ==== */
h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #00ff7f;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ==== Game Elements ==== */
p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #666;
}

/* ==== Input Field ==== */
input {
    padding: 12px;
    font-size: 1.1rem;
    width: 80%;
    max-width: 300px;
    margin-right: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: #000;
    transition: border-color 0.3s ease;
}

input:focus,
input:focus-visible {
    border-color: #ff5733;
    outline: none;
}

/* ==== Buttons ==== */
button {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    background-color: #4caf50;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    width: 100%;
    max-width: 250px;
    margin-top: 15px;
}

button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

#submitGuess {
    margin-top: 20px;
}

/* Result and Attempts Text */
#result {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00ff7f;
    margin-top: 20px;
}

#attempts {
    margin-top: 10px;
    font-size: 1rem;
    color: #777;
}

/* ==== Modal Styling ==== */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.custom-modal-content {
    background: #1e1e1e;
    color: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* Modal Button Actions */
.modal-actions button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-actions button:hover {
    background-color: #45a049;
}

/* Play Again Button */
#play-again {
    background-color: #007f00;
}

#play-again:hover {
    background-color: #005f00;
}

/* Close Modal Button */
#close-modal {
    background-color: #f44336;
}

#close-modal:hover {
    background-color: #e53935;
}

/* ==== Watermark ==== */
.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-20deg);
    font-size: 100px;
    font-family: 'Times New Roman', Times, serif;
    color: rgba(247, 251, 247, 0.05); /* Transparent watermark */
    pointer-events: none;
    white-space: nowrap;
    z-index: 1;
    user-select: none;
}

/* ==== Footer ==== */
.footer {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: orangered;
    background-color: rgba(0, 0, 0, 0.6); /* Transparent footer */
    border-top-left-radius: 10px;
    z-index: 3;
    backdrop-filter: blur(5px); /* Makes footer background slightly blurred */
}

.footer a {
    color: orangered;
    text-decoration: none;
}

/* ==== Responsive ==== */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    input {
        font-size: 1rem;
        width: 70%;
    }
    button {
        font-size: 14px;
        padding: 10px 20px;
    }
    #result,
    #attempts {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 1.3rem;
    }
    input {
        width: 100%;
        font-size: 1rem;
    }
    button {
        font-size: 14px;
        padding: 8px 16px;
    }
    #result,
    #attempts {
        font-size: 1rem;
    }
    .custom-modal-content {
        width: 85%;
    }
}
