body {
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: linear-gradient(45deg,rgba(47, 31, 104, 1) 0%, rgba(9, 15, 29, 1) 53%, rgba(25, 29, 67, 1) 100%);
}
p#hint
{
    margin: 2px auto 0;
    font-size: .9rem ;
    color: #bebebe;
}
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,rgba(47, 31, 104, 1) 0%, rgba(9, 15, 29, 1) 53%, rgba(25, 29, 67, 1) 100%);
    /* Darker gradient for particles background */
    z-index: -1;
}

.container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* --- Shared Styles --- */
.header-icon {
    position: absolute;
    width: fit-content;
    height: 30px;
    border-radius: 50%;
    /* background-color: rgba(255, 255, 255, 0.1); */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.header-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.top-right {
    top: 20px;
    right: 20px;
}


/* --- Landing Page --- */
.landing-page {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.landing-page.active {
    display: flex;
    opacity: 1;
}

.title {
    font-size: 3.5em;
    font-weight: 700;
    color: #a7f0ba;
    /* Neon Green */
    text-shadow: 0 0 15px rgba(167, 240, 186, 0.6);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #b0c4de;
    /* Light Grayish Blue */
    margin-bottom: 40px;
}

#audioVisualizer {
    margin-bottom: 50px;
    filter: drop-shadow(0 0 10px rgba(135, 206, 235, 0.5));
    /* Light blue glow */
}

.cta-button {
    background: linear-gradient(90deg, #8a2be2, #00bfff);
    /* Purple to Blue */
    border: none;
    border-radius: 30px;
    color: white;
    padding: 15px 40px;
    font-size: 1.3em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 191, 255, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.6);
}

.footer-icons {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.footer-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.footer-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}


/* --- Chat Page --- */
.chat-page {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;

    /* Semi-transparent background */

    /* Frosted glass effect */
    border-radius: 20px;
    padding: 20px;

    opacity: 0;
    position: relative;
    
}



.chat-page.active {
    display: flex;
    opacity: 1;
}

.chat-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.chat-header h2 {
    font-size: 2em;
    color: #a7f0ba;
    margin: 0;
}

.chat-box {
    height: 100%;
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    margin: 0 10px;
    /* Custom scrollbar for modern look */
    scrollbar-width: thin;
    scrollbar-color: #892be272 #3333336e;
    animation: popup .5s forwards;
}
.text-chat
{
    background: #ffffff;
    background: linear-gradient(45deg, rgba(98, 98, 98, 0.2) 0%, rgba(101, 101, 101, 0.2) 53%, rgba(158, 158, 158, 0.2) 100%);
    border: solid 1px #ffffff6a;
    box-shadow: 3px 3px 10px 1px #00000052 , inset 3px 3px 10px 1px #89898952;
    border-radius: 20px;
    backdrop-filter: blur(7px);
    width: 100%;
    height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-box::-webkit-scrollbar {
    
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background: #333;
    border-radius: 10px;
    
}

.chat-box::-webkit-scrollbar-thumb {
    background-color: #8a2be2;
    border-radius: 10px;
    border: 2px solid #333;
}

.message {
    max-width: 50%;
    width: fit-content;
    padding: 12px 18px;
    border-radius: 20px;
    margin-bottom: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user {
    background: linear-gradient(135deg, #00bfff, #87ceeb);
    /* Light blue for user */
    color: #000;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    /* Tail for user message */
}

.message.ai {
    background: linear-gradient(135deg, #8a2be2, #4b0082);
    /* Purple for AI */
    color: #fff;
    margin-right: auto;
    border-bottom-left-radius: 5px;
    /* Tail for AI message */
}

#chatVisualizer {
    display: block;
    margin: 20px auto;
    /* filter: drop-shadow(0 0 8px rgba(0, 191, 255, 0.4)); */
    

}

.mic-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: solid #00bfff;
    background: none;
    /* Dynamic gradient */
    /* border: none; */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin: 5px auto;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.6) , inset 0 0 20px rgba(0, 191, 255, 0.6);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 191, 255, 0.8);
}

.mic-button.active {
    animation: pulse 1.5s infinite ease-out;
    /* Pulsing animation when active */
}

.mic-icon {
    width: 30px;
    height: 30px;
    background-color: #333;
    border-radius: 50%;
    position: relative;
}

.mic-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 25px;
    background-color: #fff;
    border-radius: 5px;
}

.mic-icon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 5px;
    background-color: #fff;
    border-radius: 3px;
}
footer
{
    height: 10px;
    direction: ltr;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 191, 255, 0.6) , inset 0 0 20px rgba(0, 191, 255, 0.6);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 40px rgba(0, 191, 255, 0.9) , inset 0 0 40px rgba(0, 191, 255, 0.9);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 191, 255, 0.6) , inset 0 0 20px rgba(0, 191, 255, 0.6);
    }
}
@keyframes popup {
    0% {
        height: 50%;
        opacity: 0;
    }

    100% {
        height: 90%;
        opacity: 1;
    }
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .title {
        font-size: 2.5em;
    }

    .subtitle {
        font-size: 1em;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 1.1em;
    }

    .footer-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
    }

    .top-right {
        top: 10px;
        right: 10px;
    }

    .chat-header h2 {
        font-size: 1.5em;
    }
}