/* Common styles for both pages */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    min-height: 100vh; /* Ensure the body takes up the entire viewport height */
}
body {
    background: linear-gradient(to right, rgba(255, 0, 0, 0.13), rgba(0, 0, 255, 0.126), rgba(255, 255, 0, 0.126), rgba(128, 0, 128, 0.112));
    background-size: 400% 100%; /* You can adjust the size as needed */
    animation: gradient 10s linear infinite; /* You can adjust the animation duration */
  }
  
/* Add this CSS to your existing styles or styles.css */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Style the input and submit button as needed */
#player-name {
    width: 80%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#submit-name {
    background-color: #3498db;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#submit-name:hover {
    background-color: #2980b9;
}

  /* Create an animation to make the gradient move */
  @keyframes gradient {
    0% {
      background-position: 0% 0%;
    }
    100% {
      background-position: 100% 0%;
    }
  }
  .container {
    background-color: white;
    margin: 20px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center; /* Center-align container content */
    border-radius: 20px;
    position: relative;
    animation: bounceIn 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.edit{
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
    grid-gap: 20px; /* Gap between grid items */
}

.opt_rank {
    animation: fadeInFromBottom 1.5s ease-in-out;
}

/* Apply the wiggle animation only to mobile screens */
@media screen and (max-width: 767px) {
    button[type="submit"] {
        font-weight: bold;
        font-size: 1.2rem;
        background-color: #3498db;
        color: white;
        padding: 10px 20px;
        border: none;
        cursor: pointer;
        animation: wiggle 1s ease-in-out infinite;
    }
}

/* CSS for footer positioning */
footer {
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2f80b7;
    color: white;
    padding: 10px 0;
}

/* Keyframes for fun animations */
@keyframes bounceIn {
    0% { transform: scale(0.1); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes fadeInFromBottom {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Keyframes for wiggle animation */
@keyframes wiggle {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(5px); }
}

h1 {
    background-color: #3498db;
    color: white;
    padding: 20px;
    margin: 0;
    font-size: 36px;
    text-align: center;
    transition: background-color 0.3s;
}

.opt_rank{
    margin-top: 20px;
}

h1:hover {
    background-color: #2980b9;
}

/* Landing Page styles */
#game-mode-form {
    text-align: center;
    margin-top: 30px;
}

label {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 20px;
}

#game-mode {
    padding: 10px;
    font-size: 18px;
    width: 100%;
    max-width: 300px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    color: #333;
}

#start-button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    margin-top: 20px;
    cursor: pointer;
    border: none;
    font-size: 18px;
    width: 100%;
    transition: background-color 0.3s;
}

#start-button:hover {
    background-color: #2980b9;
}

/* Quiz Page styles */
#quiz-container, #score-container {
    display: none;
}

#question {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

#options button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    margin: 10px 0;
    cursor: pointer;
    border: none;
    font-size: 18px;
    width: 100%;
    transition: background-color 0.3s;
    border-radius: 5px;
}

#options button:hover {
    background-color: #2980b9;
}

#score-container {
    margin-top: 20px;
}

#score {
    font-size: 24px;
    text-align: center;
}

#high-scores {
    list-style: none;
    padding: 0;
}

#high-scores li {
    font-size: 18px;
    margin: 5px 0;
}

/* Initially hide the High Scores section */
.high-scores-container {
    display: none;
}


#play-again-button, #go-home-button, #next-button {
    background-color: #6c6565a2;
    color: white;
    padding: 10px 20px;
    margin: 10px auto;
    cursor: pointer;
    border: none;
    font-size: 18px;
    display: block;
    width: 50%;
    max-width: 200px;
    transition: background-color 0.3s;
}

#play-again-button:hover, #go-home-button:hover, #next-button:hover {
    background-color: #2980b9;
}

/* Add this CSS to your existing styles or styles.css */
.logo {
    
    top: 0;
    left: 0;
    width: 50px; /* Adjust the width as needed */
    height: auto; /* To maintain aspect ratio */
    margin: 10px; /* Adjust margin as needed */
    z-index: 1000; /* Ensure the logo appears above other content */
    filter: saturate(50%);
}



/* Primary Action Button */
button[type="submit"] {
    background-color: #3498db; /* Blue */
    color: white;
    padding: 10px 20px;
    margin-top: 40px;
    cursor: pointer;
    border: none;
    font-size: 18px;
    width: 100%;
    border-radius: 5px; /* Add rounded corners */
    transition: background-color 0.3s ease; /* Smooth color transition on hover */
}

button[type="submit"]:hover {
    background-color: #2980b9; /* Darker blue on hover */
}

/* Secondary Buttons */
.secondary-button {
    background-color: #ccc; /* Light gray */
    color: #333; /* Dark gray text */
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    border: none;
    font-size: 18px;
    width: 100%;
    border-radius: 5px; /* Add rounded corners */
    transition: background-color 0.3s ease; /* Smooth color transition on hover */
}

.secondary-button:hover {
    background-color: #999; /* Slightly darker gray on hover */
}


/* CSS for the fade-in animation */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.question,
.options button {
    animation: fadeIn 0.5s ease-in-out; /* Apply the animation to questions and options */
}


/* Media Query for Mobile Devices */
@media screen and (max-width: 600px) {
    h1 {
        font-size: 28px;
    }

    label, #game-mode, button[type="submit"] {
        font-size: 16px;
        margin-bottom: 40px;
    }

    #question {
        font-size: 20px;
    }

    #options button {
        font-size: 16px;
    }

    #score {
        font-size: 20px;
    }

    #high-scores li {
        font-size: 16px;
    }

    #start-button, #play-again-button, #go-home-button, #next-button {
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }

    #game-mode {
        font-size: 16px;
        padding: 8px;
    }

    #game-mode option {
        font-size: 16px;
        padding: 8px;
        background-color: #f0f0f0;
        color: #333;
        border: 1px solid #ccc;
    }
}
