body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    color: black;
    transition: background-color 0.3s, color 0.3s;
    height: 100vh;
    overflow: hidden; /* Prevents body scroll, so only the queen list scrolls */
}

/* Dark mode styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: white;
}

.toggle-btn {
    opacity: 10%;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: auto; 
    margin-right: 0;
}

.toggle-btn:hover {
    transform: scale(1.02); /* Slight scale effect on hover */
    opacity: 90%;
    transition: transform 0.3s ease-in-out;
}

.dark-mode .toggle-btn {
    color:#1a1a1a;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: auto; 
    margin-right: 0;
}

/* Optional: Add dark mode styling for other elements */
.dark-mode .card {
    background-color: #2d2d2d;
    border-color: #404040;
}

.dark-mode .card p {
    color: white;
}


/* Main Container */
.container {
    text-align: center;
    width: 95%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 100vh;
    padding-top: 10px;
}

/* Card Wrapper */
#queen-card {
    display: flex;
    flex-direction: column-reverse; /* Newest cards on top */
    align-items: center;
    width: 100%;
    max-width: 400px;
    overflow-y: auto; /* Allows scrolling */
    flex-grow: 1; /* Takes up available space */
    padding-bottom: 90px; /* Prevents overlap with input field */
}

/* Card Styling */
.card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 12px;
    width: 100%;
    max-width: 350px;
    transition: transform 0.3s ease-in-out;
}

.card:hover {
    transform: scale(1.02); /* Slight scale effect on hover */
}

.card img {
    width: 75%;
    border-radius: 10px;
}

.card h2 {
    margin: 10px 0;
    color: #d90479;
    font-size: 1.4em;
}

.card p {
    font-size: 1em;
    color: #333;
    margin: 5px 0;
}

.allstars {
    font-weight: bold;
    color: #ff9800;
}

/* Sticky Input Field */
.input-container {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

input[type="text"] {
    width: 90%;
    height: 45px;
    padding: 0 15px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
    margin-bottom: 10px;
}

input[type="text"]:focus {
    border-color: #4CAF50;
}

datalist {
    display: none;
}

.text-container {
    position: relative;
}

#guessButton {
    width: 25%;
    height: 45px;
    background-color: #d90479;
    color: white;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

#guessButton:hover {
    background-color: #b90368;
}

#guessCounter {
    font-size: 1.2em;
    font-weight: bold;
    color: #d90479;
    margin-bottom: 10px;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .container {
        width: 100%;
    }

    .card {
        max-width: 95%;
        padding: 12px;
    }

    .input-container {
        width: 100%;
        padding: 10px;
    }

    input[type="text"] {
        width: 95%;
        height: 40px;
        font-size: 0.9em;
    }

    .card h2 {
        font-size: 1.2em;
    }

    .card p {
        font-size: 0.9em;
    }

    #guessButton {
        width: 30%;
        height: 40px;
        font-size: 0.9em;
    }
}

/* Overlay Screens (Win/Loss) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.overlay h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

.overlay p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.overlay button {
    padding: 10px 20px;
    font-size: 1.2em;
    border: none;
    background: #ff9800;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}

.overlay button:hover {
    background: #e68900;
}

/* Hide Overlays Initially */
.hidden {
    display: none;
}

#winMessage {
    padding-bottom: 10px;
}

/* RuPaul's Drag Race Inspired Styling */
#logo {
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: #ad1963;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.6), 0 0 25px #ff8c00, 0 0 50px #ff8c00, 0 0 100px #ff8c00;
    background: linear-gradient(45deg, #ff0080, #ff0044, #ff0022);
    -webkit-background-clip: text;
    color: transparent;
    padding: 10px 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: sparkle 2s infinite alternate;
}

@keyframes sparkle {
    0% {
        text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.6), 0 0 25px #ff8c00, 0 0 50px #ff8c00, 0 0 100px #ff8c00;
    }
    50% {
        text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8), 0 0 30px #ff0066, 0 0 60px #ff0066, 0 0 120px #ff0066;
    }
    100% {
        text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.6), 0 0 25px #ff8c00, 0 0 50px #ff8c00, 0 0 100px #ff8c00;
    }
}
