/* Global styles */ 
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styling */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: blueviolet;
    scrollbar-color: cyan blueviolet; /* thumb and track color */
    text-align: center;
    padding: 20px;
    display: flex;
    justify-content: center;  /* Align items horizontally in the center */
    align-items: center;  /* Align items vertically in the center */
    flex-direction: row; /* Stack items horizontally */
    flex-direction: column; /* Stack items vertically */
    min-height: 100vh;
    font-size: 16px;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Container styling */
.container {
    display: flex;
    flex-direction: row;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    text-align: center;
    margin-top: 120px; /* Adjusted to avoid overlap with fixed top content */
    margin-left: auto; /* Center horizontally */
    margin-right: auto; /* Center horizontally */
}

/* Heading styling */
h2 {
    font-size: 36px;
    color: cyan;
}

/* Paragraph styling */
p {
    font-size: 18px;
    color: lightgray;
    margin-top: 10px;
    line-height: 1.5;
}

.paragraph-1 {
    font-size: 20px;
    color: lightblue;
    font-weight: bold;
    margin-bottom: 20px;
}

.paragraph-2 {
    font-size: 18px;
    color: lightgreen;
    font-style: italic;
}

/* Button styling */
.button {
    background-color: blue;
    color: pink;
    padding: 15px 30px;
    font-size: 18px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    margin: 20px auto; /* Centers button */
}

.button:hover {
    background-color: purple;
    color: cyan;
}

.button1 {
    background-color: #b30000;
    color: greenyellow;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

.button1:hover {
    background-color: #4f0000;
    color: limegreen;
}

.button2 {
    background-color: #0000b3;
    color: limegreen;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

.button2:hover {
    background-color: #00004f;
    color: greenyellow;
}

  /* Base Styles */
body, ul, li {
    margin: 0;
    padding: 0;
    list-style: none;
}

header {
    position: relative; /* keeps hamburger aligned inside header */
    width: 100%;
}

/* Menu Styling */
.menu { 
    display: flex;
    gap: 20px;
    background: #333;
    padding: 10px 20px;
    justify-content: center; /* fills the header */
    width: 100%; /* ensures full width */
    transition: max-height 0.3s ease;
}

.menu li {
    position: relative;
}

/* Links */
.menu a {
    text-decoration: none;
    color: cyan;
    padding: 10px 15px;
    font-size: 16px;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.menu a:hover {
    background-color: #575757;
    transform: scale(1.05);
    border-radius: 5px;
}

/* Active Link */
.menu a.active {
    color: blueviolet;
    font-weight: bold;
    border-bottom: 2px solid blueviolet;
}

/* Hover underline */
.menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: cyan;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.menu a:hover::after {
    width: 100%;
}

/* Dropdown Styling */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #444;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.menu li:hover .dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    color: cyan;
    padding: 10px 20px;
    font-size: 14px;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown a:hover {
    background-color: #575757;
}

/* Hamburger Button */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: cyan;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    top: 5px;
    right: 20px;
    z-index: 1001;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        display: none;
        width: 100%;
    }

    .menu.active {
        display: flex;
    }

    .menu li {
        width: 100%;
    }

    .menu a {
        display: block;
        width: 100%;
        padding: 10px;
    }

    .dropdown {
        position: static;
        display: none;
    }

    .menu-item.active .dropdown {
        display: block;
    }

    .menu-toggle {
        display: block;
    }
}

/* Media Container Styles */
.media-container {
  gap: 1rem;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.list-view {
  display: flex;
  flex-direction: column;
}

.media-item {
  background: #f0f0f0;
  padding: 1rem;
  border-radius: 8px;
}

.media-item img,
.media-item video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Image Styling */
.img-responsive {
    width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

#time, #calendar {
    display: inline-block;
    font-size: 1rem; /* Smaller font for better scaling */
    color: violet;
    background-color: cyan;
    padding: 6px 10px;
    border-radius: 8px;
    margin: 5px;
    max-width: 90vw;
    text-align: center;
    box-sizing: border-box;
    word-wrap: break-word; /* Allows long words to break if needed */
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    /* Adjust container and text sizes for smaller screens */
    .container {
        margin-top: 120px; /* Avoid overlap with fixed content */
        width: 100%; /* Allow container to take up full width */
        padding: 15px;
    }

    h2 {
        font-size: 24px; /* Adjust heading size */
    }

    .button {
        padding: 10px 20px;
        font-size: 16px;
    }

    #time, #calendar {
        font-size: 1.1rem; /* Slightly smaller font size for mobile */
        width: 90%; /* Allow the time and calendar to adjust to screen */
        max-width: 90%; /* Keep it from getting too wide */
    }

    .img-responsive img {
        max-width: 200px; /* Adjust max-width for mobile */
    }
}

/* Larger Screens (Desktop & Tablets) */
@media (min-width: 768px) {
    body {
        font-size: 16px; /* Set default font size for desktop */
    }

    .container {
        margin-top: 120px; /* Space for the fixed top bar */
        padding: 40px; /* More padding on larger screens */
        width: 60%; /* Ensure container doesn't stretch too wide */
    }

    h2 {
        font-size: 40px; /* Larger heading for desktop */
    }

    .button {
        padding: 15px 30px;
        font-size: 18px;
    }

    /* Adjust size of clock and calendar on larger screens */
    #time, #calendar {
        font-size: 1.5rem; /* Larger font size for desktop */
        width: 40%; /* Make them narrower */
        max-width: 400px; /* Prevent stretching */
    }

    /* Image responsiveness */
    .img-responsive img {
        max-width: 300px; /* Larger max-width for desktop */
    }
}

/* Ensure the layout is also good on extra large screens */
@media (min-width: 1200px) {
    .container {
        width: 50%; /* Reduce width on extra large screens */
    }

    h2 {
        font-size: 48px; /* Even larger heading */
    }
}

/* Container to hold the image and description */
.image-container {
    position: relative;
    width: 100%; /* Full width */
    max-width: 400px; /* Set max width for the image */
    margin: 0 auto; /* Center container */
}

/* Style for the image */
.image {
    width: 100%;
    height: auto;
}

/* Hidden text by default */
.text {
    position: absolute;
    bottom: 10px; /* Adjust position to where you want the text */
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    color: white;
    padding: 10px;
    opacity: 0; /* Text is hidden initially */
    transition: opacity 0.3s ease; /* Smooth transition */
    width: 90%; /* Optional, to control text width */
}

/* Show the text when hovering over the image container */
.image-container:hover .text {
    opacity: 1; /* Make text visible on hover */
}

/* Basic Styling */

h1 {
    color: cyan;
}

/* Button to open the modal */
#open-modal-btn {
    background-color: violet;
    color: cyan;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#open-modal-btn:hover {
    background-color: blueviolet;
}

/* The Modal */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 100px;
    width: 100%; /* Width */
    height: 100%; /* Height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4); /* Black background with transparency */
}

/* Modal Content */
.modal-content {
    background-color: blueviolet;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
}

/* Close Button */
.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Game Styling */
#answers-container button {
    background-color: cyan;
    color: blueviolet;
    padding: 10px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#answers-container button:hover {
    background-color: violet;
}

#score-container {
    margin-top: 20px;
    font-size: 18px;
}

#score-message-container img {
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* Wiggle effect */
.wiggle {
    transition: transform 0.3s ease;
}

.wiggle:hover {
    transform: translateX(-5px); /* Wiggle slightly left */
    animation: wiggle 0.5s ease infinite;
}

@keyframes wiggle {
    0% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    50% { transform: translateX(0); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* Zoom effect */
.zoom {
    transition: transform 0.3s ease-in-out;
}

.zoom:hover {
    transform: scale(1.05); /* Slightly zooms in */
}

/* Music Player Container */
#music-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    padding: 15px;
    max-width: 300px;
    background-color: lightgray;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

/* Styling the Audio Element */
#bg-music {
    width: 100%;
    margin-bottom: 15px;
}

/* Styling the Play/Pause Button */
#music-toggle-btn {
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

/* Hover Effect for the Button */
#music-toggle-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Button Active State */
#music-toggle-btn:active {
    background-color: #004080;
    transform: scale(0.95);
}

/* Styling for the Message */
#message {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
    text-align: center;
}

/* Style the progress bar */
#progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background-color: #ddd; /* Background of the progress bar */
    appearance: none;
    transition: background-color 0.3s ease;
}

/* Style the progress bar's color (left side) */
#progress-bar::-webkit-progress-value {
    background-color: cyan; /* Color for the left side */
    border-radius: 5px;
}

/* Mozilla Firefox */
#progress-bar::-moz-progress-bar {
    background-color: #4caf50;
    border-radius: 5px;
}

/* Animation for music player */
.music-animation {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.music-animation span {
    display: block;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    border-radius: 50%;
    background-color: #4caf50;  /* Color of the circles */
    animation: bounce 0.6s ease-in-out infinite alternate;
}

.music-animation span:nth-child(2) {
    animation-delay: 0.2s;  /* Delay for the second circle */
}

.music-animation span:nth-child(3) {
    animation-delay: 0.4s;  /* Delay for the third circle */
}

/* Keyframes for the bouncing effect */
@keyframes bounce {
    0% {
        transform: scale(1); /* Original size */
    }
    50% {
        transform: scale(1.5); /* Increase size for bounce effect */
    }
    100% {
        transform: scale(1); /* Return to original size */
    }
}

/* Grid View Styles */
.grid-view {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Auto columns */
    grid-template-rows: repeat(3, minmax(200px, auto)); /* Max 3 rows */
    grid-auto-rows: minmax(200px, auto); /* Ensures a min height for rows */
  }
  
  /* List View Styles */
  .list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .media-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }
  
  .media-item img, .media-item video {
    max-width: 100%;
    height: auto;
    display: block;
  }

/* Container styling */
#game-container,
#results-container {
    text-align: center;
    width: 80%;
    max-width: 600px;
    margin: auto;
    font-family: 'Arial', sans-serif; /* Clean, modern font */
    background-color: #f4d1f7; /* Soft pastel pink background */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Button styles */
button {
    padding: 12px 25px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin: 8px;
    border-radius: 10px;
    transition: background-color 0.3s, transform 0.2s ease;
    font-weight: bold;
}

/* Difficulty buttons */
button#easy-btn {
    background-color: #a4e3b5; /* Soft mint green */
    color: #3d4f33; /* Dark green text for contrast */
}

button#normal-btn {
    background-color: #f9e84e; /* Light pastel yellow */
    color: #4a3a00; /* Darker yellow for text */
}

button#hard-btn {
    background-color: #f1a7c7; /* Light pink */
    color: #9b3d62; /* Deep pinkish-purple for contrast */
}

button:hover {
    transform: scale(1.05);
}

button:active {
    background-color: #c1a3c0; /* Darker shade on click */
}

/* Game grid */
#game-grid {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-gap: 15px;
    justify-content: center;
    margin: 25px 0;
}

/* Cells */
.cell {
    width: 100px;
    height: 100px;
    background-color: #f4d1f7; /* Soft pastel pink */
    border: 3px solid #b69acc; /* Light purple border */
    cursor: pointer;
    transition: background 0.3s, transform 0.2s ease;
    border-radius: 10px;
}

/* Mole appearance */
.cell.mole {
    background-image: url('IMG_6281.JPG'); /* Replace with your actual mole image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cell.bad-mole {
    background-image: url('IMG_4161.JPG'); /* Choose a different image to represent the 'bad' mole */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Game results section */
#game-result {
    display: none;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#result-image {
    width: 100px;
    height: 100px;
    margin-top: 10px;
    border-radius: 8px;
}

/* Results gallery */
#results {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.result-item {
    padding: 12px;
    border: 2px solid #b69acc; /* Soft purple border */
    background-color: #f9e84e; /* Light yellow background for contrast */
    text-align: center;
    border-radius: 10px;
}

.result-item img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    border-radius: 50%;
}

#player-name {
    padding: 8px;
    font-size: 18px;
    margin: 10px 0;
    color: #4a3a00; /* Dark green text */
}

#timer {
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
    color: #9b3d62; /* Deep pinkish-purple text */
}

#download-btn {
    margin-top: 20px;
    background-color: #c4a2d9; /* Soft purple */
    color: white;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: bold;
    transition: background-color 0.3s;
}

#download-btn:hover {
    background-color: #9b3d62; /* Darker purple on hover */
}

.difficulty-selector {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.difficulty-selector label {
  display: inline-block;
  padding: 8px 16px;
  border: 2px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.difficulty-selector input[type="radio"] {
  display: none; /* Hide default radio */
}

.difficulty-selector label span {
  display: inline-block;
  font-weight: bold;
}

/* EASY */
.difficulty-selector input[value="easy"] + span {
  background-color: #66BB6A; /* brighter green */
  border-color: #66BB6A;
  color: white;
}
.difficulty-selector input[value="easy"]:hover + span {
  background-color: #4CAF50; /* darker green */
}
.difficulty-selector input[value="easy"]:checked + span {
  background-color: #2E7D32; /* even darker green */
}

/* NORMAL */
.difficulty-selector input[value="normal"] + span {
  background-color: #FFD54F; /* bright yellow */
  border-color: #FFD54F;
  color: black;
}
.difficulty-selector input[value="normal"]:hover + span {
  background-color: #FFC107; /* darker yellow */
}
.difficulty-selector input[value="normal"]:checked + span {
  background-color: #FF8F00; /* even darker yellow-orange */
  color: white;
}

/* HARD */
.difficulty-selector input[value="hard"] + span {
  background-color: #E57373; /* bright red */
  border-color: #E57373;
  color: white;
}
.difficulty-selector input[value="hard"]:hover + span {
  background-color: #F44336; /* darker red */
}
.difficulty-selector input[value="hard"]:checked + span {
  background-color: #B71C1C; /* even darker red */
}
