/* index.css */

/* Modal styling */

html {
    font-size: 16px;
}
  
body {
    font-size: 1rem;
    line-height: 1.5;
}
  
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background-color: var(--container-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    transition: var(--transition);
}

.quiz-titlee {
    font-size: 2rem;
    color: var(--text-color);
    text-align: center;
    margin-top: 2rem;
}

.infinity-sign {
    font-size: 1.2em; /* Makes the infinity sign slightly larger */
    vertical-align: middle; /* Aligns it vertically with the text */
    margin-left: 5px; /* Adds a small space between the text and the sign */
}

:root {
    --transition: all 0.3s ease-in-out;
}

#aboutModal{
    display: none;
}

#aboutInfiniteModal{
    display: none;
}

#aboutTimedModal{
    display: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal content container */
.modal-content {
    background-color: #2e2e2e;
    color: #f1f1f1;
    margin: 4% auto;
    padding: 40px;
    border-radius: 15px;
    width: 80%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.7);
    animation: popup-bounce-in 0.4s ease-out;
    position: relative;
}

.modal-content * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Modal animation */
@keyframes popup-bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(-100px); /* Start smaller and move from top */
    }
    50% {
        opacity: 1;
        transform: scale(1.1) translateY(0); /* Slightly overshoot for bounce effect */
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0); /* Final state */
    }
}

/* Close button styling */
.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ccc;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #fff;
    cursor: pointer;
}

/* Style for titles and text inside modal */
.modal-content h2, .modal-content h3, .modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-content h2 {
    color: var(--icon-hover);
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.modal-content h3 {
    color: var(--icon-hover);
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-content button {
    background-color: #4CAF50; /* Green button */
    color: white;
    padding: 12px 25px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-content button:hover {
    background-color: #3a9441; /* Darker green on hover */
}

/* Game buttons */
button {
    background-color: #067506;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

button:hover {
    background-color: #28923f; /* Darker green on hover */
}

/* Common button styles */
#easBtn, #surahBtn, #medBtn, #hardButn, #veryHardBtn {
    margin-top: 1rem; /* Adds space from the top */
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Individual button gradients */
#easBtn, #surahBtn {
    background: linear-gradient(135deg, #28a745, #0b670b);
}

#medBtn {
    background: linear-gradient(135deg, #ffb347, #ff9500);
}

#hardButn {
    background: linear-gradient(135deg, #ff6a6a, #d6312b);
}

#veryHardBtn {
    background: linear-gradient(135deg, #e52d27, #b22222);
    padding: 20px 60px;
    font-size: 1.3rem;
}

/* Hover states */
#easBtn:hover, #surahBtn:hover,
#medBtn:hover, #hardButn:hover,
#veryHardBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Active states */
#easBtn:active, #surahBtn:active,
#medBtn:active, #hardButn:active,
#veryHardBtn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* Active button class */
.active-btn {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.8);
    animation: gentlePulse 2s infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.07);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    }
}

#notificationBanner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #4caf50; /* Green for success */
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 1rem;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(-100%);
}

#notificationBanner.error {
    background-color: #f44336; /* Red for errors */
}

#notificationBanner.show {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none;
}


/* Game container */
#gameContainer {
    width: 90%;
    margin: 0 auto;
    max-width: 1200px;
    display: flex;
    justify-content: space-around;
}

/* Verse styling */
#quranPage {
    background-color: var(--container-bg); /* Consistent background color */
    padding: 20px;
    border-radius: 10px;
    max-width: 100%;
    text-align: center;
    font-family: 'AmiriQuran', serif; /* Use Quranic font */
    font-size: 1.8em; /* Set a readable font size */
    line-height: 2em; /* Consistent line spacing */
    direction: rtl; /* Right-to-left for Arabic text */
    word-wrap: break-word;
    white-space: normal;
    margin: 20px 0; /* Add space between the container and inputs */
}

/* Verse ID styling */
.top-text {
    display: block; /* Forces it to be on its own line */
    font-size: 1em; /* Adjust size if needed */
    margin-bottom: 20px; /* Adds space below the top text */
    text-align: center; /* Center-aligns the text */
    font-family: 'AmiriQuran', serif; /* Use Quranic font */
    color: var(--text-color);
}

/* Soft highlight for the current verse being read */
.current-verse {
    background-color: rgba(255, 235, 205, 0.5); /* Soft light yellow background */
    border-radius: 10px; /* Rounded corners for the highlight */
    box-shadow: 0 0 10px rgba(255, 235, 205, 0.8); /* Soft glow effect */
    transition: background-color 0.5s ease, box-shadow 0.5s ease; /* Smooth transition when highlighting */
    padding: 10px; /* Add padding for some breathing space */
    margin-left: 10px;
}

.verse-container {
    display: inline;
    background-color: var(--container-bg);
    color: var(--text-color);
    transition: background-color 0.5s ease, box-shadow 0.5s ease; /* Ensure a smooth transition when toggling */
}

/* Verse ID styled with End of Ayah symbol, integrated with better styling */
.verse-id {
    align-items: center;
    justify-content: center;
    width: 55px; /* Adjust width to give more space */
    height: 55px; /* Adjust height for better balance */
    margin-right: 25px; /* Increase margin to give space between the symbol and the following text */
    margin-left: 25px; /* Increase margin to give space between the symbol and the preceding text */
    font-size: 0.5em;
    font-family: 'AmiriQuran', serif;
    color: var(--text-color);
    background-color: var(--container-bg);
    position: relative;
    box-shadow: none;
    overflow: hidden; /* Ensures that any excess content is clipped */
}

.verse-id::before {
    content: "\06DD"; /* Arabic End of Ayah symbol */
    font-family: 'AmiriQuran', serif;
    font-size: 2.9em; /* Slightly larger to cover more space */
    color: var(--text-color);
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the symbol perfectly */
    opacity: 0.8; /* Add some transparency to blend better */
}

.verse-id-number {
    position: relative;
    z-index: 1; /* Ensures the number stays above the End of Ayah symbol */
    font-size: 0.8em; /* Larger font size for better readability */
    font-family: 'AmiriQuran', serif;
    background-color: var(--container-bg); /* No background for number */
    padding: 1 5px; /* Slight padding for positioning */
}

/* Blurred text effect */
.blurred {
    filter: blur(3px);
    opacity: 0.3;
}

/* Container for the attempt squares */
#attemptBar {
    display: flex;
    justify-content: center; /* Center the bar horizontally */
    margin-top: 20px;
    margin-bottom: 20px; /* Adjust the spacing */
}

/* Styling for each square */
.attemptSquare {
    width: 40px;
    height: 40px;
    border: 2px solid #555;
    border-radius: 10px; /* Slight rounding */
    background-color: transparent; /* Initially empty */
    margin: 0 5px; /* Spacing between squares */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-family: 'Arial', sans-serif;
    color: #fff; /* Text color */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

/* Different states for the squares */
.attemptSquare.incorrect {
    background-color: #d6312b; /* Red background for incorrect guess */
    color: #fff; /* White text for X */
}

.attemptSquare.correct {
    background-color: #067506; /* Green background for correct guess */
    color: #fff; /* White check mark */
}

/* Audio control buttons container */
#audioControls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 15px auto;
}

/* Audio control buttons */
#audioControls button {
    background-color: var(--button-bg);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 60px;
    height: 60px;
    margin-top: 10px;
    margin-bottom: 20px;
}

#audioControls button:hover {
    background-color: var(--button-hover);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

#audioControls i {
    font-size: 24px;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Default tooltip (hidden) */
#audioControls button .tooltip {
    visibility: hidden;
    width: 100px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 10px;
    padding: 5px 5px;
    position: absolute;
    z-index: 1;
    top: 105%; /* Position the tooltip below the button */
    left: 50%;
    transform: translateX(-50%); /* Centers the tooltip */
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
    font-size: 14px;
    pointer-events: none;
}

/* Add a small arrow at the top of the tooltip */
#audioControls button .tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

/* Show the tooltip on hover */
#audioControls button:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Ensure the button has a relative position for absolute positioning of tooltip */
#audioControls button {
    position: relative;
}
.audio-label {
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--text-color);
}

/* Responsive styles */
@media (max-width: 600px) {
    input[type="text"], input[type="number"], button {
        width: 100%;
    }

    #audioControls button {
        width: 50px;
        height: 50px;
    }

    #audioControls i {
        font-size: 23px;
    }
}

/* Ensure the Quran page, audio controls, and guess container are properly aligned */
#quranPage, #audioContainer {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    text-align: center;
}

#guessContainer{
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    text-align: center;
}

/* Add this to your existing CSS file */

.difficulty-info {
    margin-top: 10px;
    font-size: 1em;
    color: var(--text-color);
    text-align: center;
    padding: 5px 10px;
    background-color: rgba(var(--button-bg-rgb), 0.1);
    border-radius: 5px;
    display: none;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .difficulty-info {
        font-size: 0.9em;
    }
}

/* Feedback text styling */
#feedback {
    margin-top: 10px;
    font-size: 1.2em;
    display: flex;
    justify-content: center;
    color: var(--bg-colorr);
}

/* Dark mode styles */
.verse-container {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.current-verse {
    background-color: rgba(74, 145, 226, 0.079); /* Soft blue background */
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.5); /* Blue glow effect */
    border-radius: 5px;
}

/* Light mode styles */
body.light-mode .current-verse {
    background-color: transparent; /* Lighter blue background for light mode */
    box-shadow: 0 0 0 2px rgba(235, 236, 236, 0.415), 0 0 10px rgba(74, 144, 226, 0.2); /* Softer glow for light mode */
}

/* Optional: Add a left border for additional emphasis */
.current-verse {
    border-left: 3px solid rgba(74, 144, 226, 0.7);
    border-right: 3px solid rgba(74, 144, 226, 0.5);
}

body.light-mode .current-verse {
    border-left: 3px solid rgba(134, 146, 160, 0.507);
    border-right: 3px solid rgba(134, 146, 160, 0.507);
}

#alreadyPlayedPopup .popup-content {
    background-color: var(--popup-bg);
    color: var(--popup-text);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    animation: popup-bounce-in 0.4s ease-out;
    max-width: 350px;
    margin: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#alreadyPlayedPopup h2 {
    color: var(--icon-hover);
    margin-bottom: 20px;
    font-size: 1.8em;
}

#alreadyPlayedPopup p {
    margin-bottom: 15px;
    line-height: 1.5;
}

#countdownTimer {
    font-size: 1.2em;
    font-weight: bold;
    margin: 20px 0;
    color: var(--icon-hover);
}

#alreadyPlayedPopup button {
    background-color: var(--popup-button-bg);
    color: var(--popup-button-text);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s, transform 0.2s;
}

#alreadyPlayedPopup button:hover {
    background-color: var(--popup-button-hover);
    transform: scale(1.05);
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.infinite-mode-button {
    background-color: var(--icon-hover) !important;
}

.infinite-mode-button:hover {
    background-color: var(--button-hover) !important;
}

#alreadyPlayedPopup button {
    flex: 1;
    max-width: 150px;
}

.infinite-mode-message {
    margin-top: 20px;
    font-size: 0.9em;
    color: var(--icon-hover);
    font-style: italic;
}

.infinity-symbol {
    font-size: 1.2em;
    vertical-align: middle;
}

#playedDifficulty {
    color: var(--icon-hover);
    font-weight: bold;
}

/* Add this utility class for resetting the animation */
.reset-animation {
    animation: none !important;
}

/* Media queries */
@media (min-width: 768px) {
    html {
      font-size: 18px;
    }
  
    .banner h1 {
      font-size: 2rem;
    }
  
    #quranPage {
      font-size: 1.5rem;
    }
  
    #guessContainer {
      flex-wrap: nowrap;
      justify-content: center;
    }
  
    #guessContainer input {
      flex: 1;
      margin-bottom: 0;
      max-width: 70%;
    }
  
    #guessContainer button {
      flex: 0 0 auto;
      white-space: nowrap;
    }
  }
  
  @media (min-width: 1024px) {
    html {
      font-size: 20px;
    }
  
    .banner h1 {
      font-size: 2.5rem;
    }
  
    #quranPage {
      font-size: 1.8rem;
    }
  }
  
  /* Adjustments for very large screens */
  @media (min-width: 1600px) {
    .container {
      max-width: 1400px;
    }
  
    #quranPage {
      font-size: 2rem;
    }
  }
  
  /* Adjustments for very small screens */
  @media (max-width: 320px) {
    html {
      font-size: 14px;
    }
  
    .banner h1 {
      font-size: 1.2rem;
    }
  
    #quranPage {
      font-size: 1rem;
    }
  }

  /* Adjusted styles for better responsiveness */
@media (max-width: 768px) {
    .modal-content {
        width: 85%;
        padding: 30px;
        margin: 4% auto;
    }

    .modal-content h2 {
        font-size: 1.8rem;
    }

    .modal-content h3 {
        font-size: 1.3rem;
    }

    .modal-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 85%;
        padding: 20px;
        margin: 0 auto;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .modal-content p {
        font-size: 0.85rem;
    }

    .close {
        top: 10px;
        right: 15px;
        font-size: 20px;
    }
}

/* Center modal content vertically for taller screens */
@media (min-height: 700px) {
    .modal {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        align-items: center;
        justify-content: center;
        margin: 4% auto;
    }
}

@media (min-width: 1100px) {
    .verse-id {
        align-items: center;
        justify-content: center;
        width: 55px;
        height: 55px;
        margin: 0 10px; /* Adjust margin as needed */
        font-size: 0.5em;
        position: relative;
        margin: 20px 25px;
    }

    .verse-id::before {
        content: "\06DD"; /* Arabic End of Ayah symbol */
        font-size: 3em; /* Adjust size if needed */
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .verse-id-number {
        position: relative;
        font-size: 0.9em; /* Adjust font size for readability */
        z-index: 1; /* Ensure number appears above symbol */
    }
}

@media (min-width: 1600px) {
    #quranPage {
        font-size: 2.2rem;
    }

    .container {
        max-width: 1400px;
    }
}

@media (min-width: 500px) {
    .verse-id {
        align-items: center;
        justify-content: center;
        width: 55px;
        height: 55px;
        margin: 0 10px; /* Adjust margin as needed */
        font-size: 0.5em;
        position: relative;
        margin: 20px 25px;
    }

    .verse-id::before {
        content: "\06DD"; /* Arabic End of Ayah symbol */
        font-size: 3em; /* Adjust size if needed */
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .verse-id-number {
        position: relative;
        font-size: 0.9em; /* Adjust font size for readability */
        z-index: 1; /* Ensure number appears above symbol */
    }
}

@media (max-width: 600px) {
    .verse-id {
        align-items: center;
        justify-content: center;
        width: 55px;
        height: 55px;
        margin: 0 10px; /* Adjust margin as needed */
        font-size: 0.5em;
        position: relative;
        margin: 20px 25px;
    }

    .verse-id::before {
        font-size: 3em; /* Adjust size if needed */
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

}

@media (min-width: 900px) {
    .verse-id {
        align-items: center;
        justify-content: center;
        width: 55px;
        height: 55px;
        margin: 0 10px; /* Adjust margin as needed */
        font-size: 0.5em;
        position: relative;
        margin: 20px 25px;
    }

    .verse-id::before {
        content: "\06DD"; /* Arabic End of Ayah symbol */
        font-size: 3em; /* Adjust size if needed */
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .verse-id-number {
        position: relative;
        font-size: 0.9em; /* Adjust font size for readability */
        z-index: 1; /* Ensure number appears above symbol */
    }
}


















