*{
    font-family: "Poppins", serif !important;
}

/* General Body Styling */
body {
    font-family: "Poppins", serif !important;
    -webkit-tap-highlight-color: transparent ; /* Remove tap highlight on touch devices */
    background-image: radial-gradient(circle at 99% 33%, hsla(235,0%,48%,0.03) 0%, hsla(235,0%,48%,0.03) 37%,transparent 37%, transparent 100%),radial-gradient(circle at 46% 16%, hsla(235,0%,48%,0.03) 0%, hsla(235,0%,48%,0.03) 43%,transparent 43%, transparent 100%),radial-gradient(circle at 99% 25%, hsla(235,0%,48%,0.03) 0%, hsla(235,0%,48%,0.03) 22%,transparent 22%, transparent 100%),radial-gradient(circle at 57% 88%, hsla(235,0%,48%,0.03) 0%, hsla(235,0%,48%,0.03) 86%,transparent 86%, transparent 100%),radial-gradient(circle at 82% 78%, hsla(235,0%,48%,0.03) 0%, hsla(235,0%,48%,0.03) 22%,transparent 22%, transparent 100%),linear-gradient(90deg, rgb(0,0,0),rgb(0,0,0));
    color: white;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 25px;
    cursor: default;
    -webkit-tap-highlight-color: transparent ; /* Remove tap highlight on touch devices */
}
::selection {
    background-color: #ffffff; /* Change the background color to yellow */
    color: black; /* Change the text color to black */
}
/* Container Styling */
.container {
    width: 85%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Flexbox container for the text areas and buttons */
.textarea-container {
    display: flex;
    gap: 20px; /* Space between the two text areas */
    margin-bottom: 20px;
}
/* Mobile screen adjustments */
@media (max-width: 768px) {
    .textarea-container {
        margin-right: 20px;
    }
}

/* Text area styling */
textarea {
    background-color: #1e1e1e; /* Dark background for the textareas */
    color: white;
    border: 1px solid #333;
    padding: 10px;
    font-size: 16px;
    resize: none;
    min-height: 150px;
    width: 100%; /* Make text areas take full width of their container */
}

textarea:focus {
    outline: none;
    border-color: #444;
}

/* Wrap the text areas and buttons in individual containers */
.textarea-wrapper {
    display: flex;
    flex-direction: column; /* Stack the textarea and button vertically */
    width: 48%; /* Each wrapper takes up 48% of the container's width */
}

/* Button Styling */
button {
    background-color: #ff0000;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px; /* Space between the textarea and the button */
}

button:hover {
    background-color: #555;
}

button:focus {
    outline: none;
}
.copy-from-btn , .speak-from-btn{
    width: 5px !important;
    font-size: 25px !important;
    margin-left: -10px;
    margin-top: -6px !important;
    border: none !important;
    background-color: #00000000 !important;
}
.speak-from-btn{
    font-size: 30px !important;
}
.speak-from-btn:hover , .copy-from-btn:hover{
    background-color: none !important;
}


.copy-to-btn , .speak-to-btn{
    width: 5px !important;
    font-size: 25px !important;
    margin-left: -10px;
    margin-top: -6px !important;
    border: none !important;
    background-color: #00000000 !important;
}
.speak-to-btn{
    font-size: 30px !important;
}
.speak-to-btn:hover , .copy-to-btn:hover{
    background-color: none !important;
}
/* Language Select Button Styling */
.language-select-btn {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid #444;
    transition: background-color 0.3s ease;
    margin-left: 1px !important;
}

.language-select-btn:hover {
    background-color: #555;
}

/* Language Modal */
#languageModal {
    display: none;
    position: fixed;
    top: 100%; /* Start at the bottom */
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    opacity: 0; /* Initially invisible */
    animation: slideIn 0.4s forwards; /* Adjusted speed for smoother animation */
}

/* Pop-up bottom-to-top animation */
@keyframes slideIn {
    0% {
        top: 100%; /* Start off the screen at the bottom */
        opacity: 0; /* Initially invisible */
    }
    100% {
        top: 0; /* End at the top (visible) */
        opacity: 1; /* Fully visible */
    }
}

#languageModal .modal-content {
    background-color: #333;
    border: 1px solid #555;
    padding: 20px;
    border-radius: 25px;
    width: 100%;
    max-width: 450px;
    min-height: 470px;
    max-height: 470px;
    min-width: 450px;
    box-shadow: 0px 10px 20px #00000080; /* Bottom shadow */
}

@media (max-width: 600px) {
    #languageModal .modal-content {
        max-width: 80%; /* Adjust the width for mobile screens */
        min-width: 0; /* Remove the minimum width */
        min-height: 470px; /* Optionally adjust height as well */
    }
}


#languageSearch {
    width: 100%;
    height: 45px;  /* A slightly taller input for a modern feel */
    padding: 0 15px;  /* Horizontal padding for more spacing */
    margin-bottom: 20px;
    background-color: #121212;  /* Darker black background */
    color: white;  /* White text */
    border: 1px solid #555;  /* Subtle dark border */
    border-radius: 25px;  /* Fully rounded corners for a sleek look */
    font-size: 16px;  /* Maintain readability */
    font-family: 'Arial', sans-serif;  /* Modern font */
    box-sizing: border-box;  /* Ensure padding and border are included in the width */
    transition: all 0.3s ease;  /* Smooth transition for all properties */
    outline: none;  /* Remove default outline */
}

#languageSearch::placeholder {
    color: #aaa;  /* Lighter color for placeholder */
    opacity: 1;  /* Ensure the placeholder text is fully visible */
}

#languageSearch:focus {
    border-color: #555;  /* White border on focus for contrast */
    background-color: #222;  /* Slightly lighter background on focus */
}


#languageList {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #555;
    border-radius: 15px;
}

#languageList li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #555;
}

#languageList li:hover {
    background-color: #555;
}
h1 {
    text-align: center;
    font-size: 40px;
    position: relative;
    font-weight: 500; /* Lighter font weight */
  }
  
  .text-p {
    width: 85%;
    margin: 0 auto;
    text-align: center;
    font-size: 15px;
  }
  #closeModalBtn {
    position: absolute;
    top: 1px;
    right: 3px;
    background-color: transparent;
    color: white;
    border: none;
    font-size: 30px;
    cursor: pointer;
    border: 1px solid #00000000 !important;
    width: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    z-index: 1; /* Ensures the icon is on top */
    transition: color 0.3s ease, transform 0.3s ease; /* Smooth transition for color and transform */
}

#closeModalBtn::before {
    content: "";
    position: absolute;
    width: 20px; /* Adjust the size as needed */
    height: 20px;
    background-color: #ff0000; /* Semi-transparent black */
    border-radius: 50%; /* Makes it circular */
    z-index: -1; /* Places the background behind the icon */
    transition: background-color 0.3s ease; /* Smooth transition for background color */
}

#closeModalBtn:hover {
    color: #ff0000;
}

#closeModalBtn:hover::before {
    background-color: #ffffff; /* Change color on hover */
}


/* Language Selection Container Styling */
.language-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.language-container button {
    width: 48%; /* Make both buttons take nearly half the space */
    padding: 10px;
    font-size: 16px;
    background-color: #1e1e1e;
    color: white;
    border: 1px solid #333 !important;
    transition: background-color 0.3s ease;
}

.language-container button:hover {
    background-color: #1e1e1e;
    border: 1px solid #444 !important;
}

/* Language Swap Button */
#swapLangBtn {
    background-color: #444;
    color: white;
    padding: 10px;
    font-size: 18px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0 20px;
}

#swapLangBtn:hover {
    background-color: #555;
}
/* General Button Styling for Speak button */
button {
    background-color: #333;
    border: 1px solid #555 !important;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px; /* Space between the textarea and the button */
    margin-left: 10px; /* Space between buttons */
    width: 40% !important;
}
::-webkit-scrollbar {
    width: 15px; /* Width of the scrollbar */
    background-color: #333; /* Background of the scrollbar track */
}

::-webkit-scrollbar-thumb {
    background-color: #555; /* Color of the draggable part of the scrollbar */
    border-radius: 10px; /* Rounded corners for the scrollbar thumb */
    border: 3px solid #2e2e2e; /* Adds space between thumb and track */
}

::-webkit-scrollbar-thumb:hover {
    background-color: #666; /* Darker color on hover */
}
button:hover {
    background-color: #555;
}
.translate-btn {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 35px; /* Keep your existing margin-top if you want */
    width: auto !important;
    padding: 10px 20px; /* Optional: add some padding for better appearance */
    background-color: #1e1e1e; /* Optional: change background color */
    border: 1px solid #333 !important;
    color: white; /* Optional: text color */
    border: none; /* Optional: remove border */
    border-radius: 50px; /* Optional: rounded corners */
    font-size: 15px; /* Optional: text size */
    cursor: pointer; /* Optional: cursor change on hover */
    transition: background-color 0.3s; /* Optional: smooth background color change */
}

.translate-btn:hover {
    background-color: #1e1e1e; /* Optional: change color on hover */
    border: 1px solid #444 !important;
}

button:focus {
    outline: none;
}

/* Text area button positioning */
.textarea-wrapper {
    display: flex;
    flex-direction: column;
    width: 48%;
}

/* Button placement next to textarea */
.speak-from-btn, .speak-to-btn {
    margin-top: 10px;
}

/* Container for buttons in a row */
.button-container {
    display: flex; /* Aligns the buttons in a row */
    justify-content: flex-start; /* Optional: space buttons to the left */
    gap: 10px; /* Space between the buttons */
    margin-top: 3px; /* Optional: space from any element above */
    margin-left: -10px !important; /* Move it a bit to the left */
}

.clipboard-alert {
    position: fixed;
    top: 20px; /* Position it at the top */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #555;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    animation: fadeInOut 2s forwards;
    font-size: 15px;
    width: 15%;
    text-align: center;
  }
  /* Media query for mobile screens */
@media screen and (max-width: 768px) {
    .clipboard-alert {
      width: 55%;  /* 50% width on screens smaller than 768px */
    }
  }
  /* Animation for showing and hiding the alert */
  @keyframes fadeInOut {
    0% {
      opacity: 0;
    }
    10% {
      opacity: 1;
    }
    90% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  button {
    position: relative;
  }
  
  .tooltip {
    visibility: hidden;
    position: absolute;
    top: -25px; /* Adjust this value to position the tooltip above the icon */
    left: 90%;
    transform: translateX(-50%); /* Center the tooltip horizontally */
    background-color: #000000b9;
    border: 1px solid #111;
    color: white;
    padding: 6px;
    border-radius: 50px;
    font-size: 12px;
    white-space: nowrap;
    cursor: default;
  }
  
  button:hover .tooltip {
    visibility: visible;
  }
  
  /* Media Query for Mobile Devices */
  @media (max-width: 768px) {
    .tooltip {
      visibility: hidden; /* Hide the tooltip on mobile */
    }
  
    button:hover .tooltip {
      visibility: hidden; /* Ensure it's hidden on hover too */
    }
  }
  