@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-image: url('speak.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    font-size: 16px;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}

.main {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.container {
    background-color: rgba(255, 255, 255, 0.85); /* Lighter background */
    text-align: center;
    padding: 25px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    transition: transform 0.2s ease-in-out;
}

.container:hover {
    transform: scale(1.02); /* Slight hover effect for interaction */
}

.button {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 15px; /* Space between buttons */
}

/* Start Button Styling (Microphone) */
#startButton {
    margin-top: 20px;
    padding: 20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    background-color: darkgray;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    animation: pulse 2s infinite; /* Pulsing animation */
}

/* Hover effects for the Mic Button */
#startButton:hover {
    background-color: darkgrey;
    transform: scale(1.1) rotate(10deg); /* Adds a slight rotation on hover */
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
    animation: none; /* Stops pulsing when hovered */
}

/* Pulsing effect */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.9);
    }
    100% {
        transform: scale(1);
        box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.7);
    }
}

/* When the button is active/recording */
#startButton.active {
    background-color: #f1c40f; /* Yellow when active */
    animation: none; /* Stop pulsing when recording */
    transform: scale(1.1); /* Slight scale when active */
    box-shadow: 0px 6px 20px rgba(255, 204, 0, 0.7); /* Brighter shadow */
}

/* Mic Symbol - Listening Effect */
#listeningSymbol {
    display: none;
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background-color: darkgray;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    animation: pulseSymbol 2s infinite; /* Pulsing effect for symbol */
}

/* Pulse effect for listening symbol */
@keyframes pulseSymbol {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }
}

/* Microphone Animation when clicked (Bounce Effect) */
#startButton:active {
    animation: bounce 0.3s ease-out;
}

/* Bounce Effect when clicked */
@keyframes bounce {
    0% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}


/* Output text area */
#output {
    margin-top: 20px;
    border: 1px solid #ccc;
    padding: 15px;
    width: 100%;
    max-width: 450px;
    min-height: 150px;
    background-color: white;
    border-radius: 8px;
    overflow-y: auto;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    font-size: 1rem;
    color: #444;
    word-wrap: break-word; /* Ensures long words break properly */
}

/* Styling for the additional buttons (copy and clear) */
.buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.buttons button {
    padding: 12px 25px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 120px; /* Consistent button width */
    text-align: center;
}

/* Copy button styling */
#copyButton {
    background-color: green;
    color: white;
}

#copyButton:hover {
    background-color: green;
    transform: scale(1.05);
}

/* Clear button styling */
#clearButton {
    background-color: red;
    color: white;
}

#clearButton:hover {
    background-color: red;
    transform: scale(1.05);
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
        width: 90%;
    }

    #startButton {
        padding: 15px;
        width: 80px;
        height: 80px;
    }

    .buttons button {
        padding: 10px 20px;
    }

    #output {
        padding: 12px;
        min-height: 120px;
    }
}

nav {
    background: transparent;
    width: 80%; /* Adjust the width as per your design */
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align items to the left */
    position: fixed; /* Fix the nav at the top */
    top: 0; /* Align to the top of the viewport */
    left: 50%; /* Center the nav horizontally */
    transform: translateX(-50%); /* Adjust the position to be perfectly centered */
    z-index: 1000; /* Ensure it appears above other content */
}

.logo {
    width: 100px;
    /* You can also adjust margin or padding if needed for positioning */
}

.user-pic{
    width: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 30px; 
}
nav ul {
    width: 100%;
    text-align: right;
}

nav ul li {
    display: inline-block;
    list-style: none;
    margin: 10px 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: medium;
    padding: 5px 10px; /* Add padding to create space inside the box */
    border-radius: 20px; /* Round corners */
    transition: transform 0.3s ease, color 0.3s ease; /* Smooth transition for both transform and color */
}

nav ul li a:hover {
    background-color: #f44336; /* Red background on hover */
    color: white; /* White text color on hover */
    transform: scale(0.9); /* Zoom-out effect on text */
}
.sub-menu-wrap {
    position: absolute;
    top: 100%; /* Align it below the navigation bar */
    right: -10%;  /* Align to the right side of the parent container (the nav) */
    width: 320px; /* Adjust the width as needed */
    max-height: 0px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out; /* Smooth transition */
}
.sub-menu-wrap.open-menu{
    max-height: 400px;
    }
    .sub-menu{
        background: #fff;
        padding: 20px;
        margin: 10px;
    }
    .user-info{
        display: flex;
        align-items: center;
    }
    .user-info h3{
        font-weight: 500;
    }
    .user-info img{
        width: 60px;
        border-radius: 50%;
        margin-right: 15px;
    }
    .sub-menu hr{
        border: 0;
        height: 1px;
        width: 100%;
        background: #ccc;
        margin: 15px 0 10px;
    }
    .sub-menu-link{
        display: flex;
        align-items: center;
        text-decoration: none;
        color: #525252;
        margin: 12px 0 ;
    }
    .sub-menu-link p{
        width: 100%;
    }
    .sub-menu-link img{
        width: 40px;
        background: #e5e5e5;
        border-radius: 50%;
        padding: 8px;
        margin-right:  15px;
    }
    .sub-menu-link span{
        font-size: 22px;
        transition: transform 0.5s;
    }
    .sub-menu-link:hover span{
        transform: translateX(5px)
    }
    .sub-menu-link:hover p{
        font-weight: 600;
    }

 /* Logout Button Styles */
 #logout-button {
    position: absolute;
    top: 37px;
    right: 20px;
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 200px;
    cursor: pointer;
}

#logout-button:hover {
    background: #e53935;
}  




/* Dropdown Menu Styling */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 150%; /* Position it below the Features link */
    left: 50%;
    transform: translateX(-50%); /* Centers the dropdown */
    background-color: transparent;
    width: 250px; /* Smaller width */
    /* box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2); */
    z-index: 1;
    list-style: none;
    padding: 0; /* Reduce padding for a smaller block */
    margin: 0;
    text-align: -webkit-auto; /* Center the text inside the dropdown */
    border-radius: 60px; /* Rounded edges */
}

.dropdown-menu li {
    padding: 8px 15px; /* Adjust padding for better alignment */
    font-size: 18px; /* Adjust font size */
    line-height: 1.2; /* Ensure proper line spacing */
    white-space: nowrap; /* Prevent text wrapping */
}

.dropdown-menu li a {
    text-decoration: none;
    color: white;
    display: block;
    width: 100%; /* Ensure the link takes full width */
    text-align: left; /* Align text to the left */
}

.dropdown-menu li:hover {
    background-color: transparent; /* Highlight on hover */
    cursor: pointer;
}

/* Show dropdown when toggled */
.dropdown-menu.show {
    display: block;
}