* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Be Vietnam Pro';
}
body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(to right, #f4f4f4, #eaeaea);
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
}
.chat-container {
    width: 483px;
    height: 632px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
}
.chat-header {
    background: #4a90e2;
    color: white;
    padding: 18px;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}
.theme-toggle {
    display: flex;
    align-items: center;
}
.theme-toggle input {
    width: 50px;
    height: 24px;
    border-radius: 50px;
    background-color: #ddd;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: background 0.3s ease-in-out;
    position: relative;
}
.theme-toggle input:checked {
    background-color: green;
}
.theme-toggle input:before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    transition: transform 0.3s ease-in-out;
}
.theme-toggle input:checked:before {
    transform: translateX(26px);
}
.chat-box {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
}
.message {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 20px;
    margin: 8px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 15px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.4s ease-in-out forwards;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.user {
    align-self: flex-end;
    background: #4a90e2;
    color: white;
}
.bot {
    align-self: flex-start;
    background: #e0e0e0;
}
.typing {
    display: flex;
    align-items: center;
    font-weight: bold;
}
.typing::after {
    content: "";
    display: inline-block;
    animation: dotsAnimation 1.5s infinite steps(1, end);
}
@keyframes dotsAnimation {
    0%{
        content: ".";
    }
    33%{
        content: "..";
    }
    66%{
        content: "...";
    }
}
.chat-input {
    display: flex;
    padding: 14px;
    border-top: 1px solid #ddd;
    background: white;
}
.chat-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 25px;
    outline: none;
    font-size: 15px;
    resize: none;
    min-height: 46px;
    max-height: 115px;
    overflow-y: auto;
}
.chat-input textarea:focus {
    border-color: #4a90e2;
    background: #f4faff;
}
.button-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 10px;
}
.button-container .tooltip {
    position: absolute;
    bottom: 110%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.button-container:hover .tooltip {
    opacity: 1;
}
.button-container .tooltip-send {
    position: absolute;
    bottom: 110%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    left: 50%;
}
.button-container:hover .tooltip-send {
    opacity: 1;
}
.chat-input button {
    padding: 12px 18px;
    border: none;
    background: #4a90e2;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}
.chat-input button:hover {
    background: #357abd;
    transform: scale(1.05);
}
@keyframes fadeIn {
    from{ 
        opacity: 0;
        transform: translateY(10px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}
.voice-icon {
    display: flex;
    gap: 3px;
    align-items: center;
    height: 20px;
}
.voice-icon span {
    width: 4px;
    height: 10px;
    background-color: white;
    display: inline-block;
    animation: voiceAnimation 1s infinite ease-in-out alternate;
    border-radius: 10px;
}
.voice-icon span:nth-child(1){
    animation-delay: 0s;
}
.voice-icon span:nth-child(2){
    animation-delay: 0.2s;}
.voice-icon span:nth-child(3){ 
    animation-delay: 0.4s;
}
.voice-icon span:nth-child(4){
    animation-delay: 0.6s;
}
@keyframes voiceAnimation {
    0%{
        height: 5.75px;
    }
    100%{
        height: 17.25px;
    }
}
body.dark {
    background: linear-gradient(to right, #2c3e50, #34495e);
    color: white;
}
.dark .chat-container {
    background: #1e272e;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}
.dark .chat-header {
    background: #0a74da;
}
.dark .chat-box {
    background: #2c3e50;
}
.dark .message.bot {
    background: #4b6584;
    color: white;
}
.dark .message.user {
    background: #0a74da;
}
.dark .chat-input {
    background: #1e272e;
    border-top: 1px solid #34495e;
}
.dark .chat-input textarea {
    background: #34495e;
    border-color: #4b6584;
    color: white;
}
.dark .chat-input textarea:focus {
    background: #4b6584;
}
.dark .chat-input button {
    background: #0a74da;
}
.dark .chat-input button:hover {
    background: #0652c0;
}
.dark .special-text {
    background-color: #2c3e50;
    border-left: 4px solid rgba(30, 30, 30, 0.6);
    color: white;
}
.dark .inline-code {
    color: white;
}
.special-text {
    background-color: #f4f4f4;
    border-left: 4px solid #ccc;
    padding: 10px 12px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: black;
    border-radius: 10px;
    line-height: 1.45;
}
.code-block {
    background-color: #ffffff;
    border-left: 4px solid #ccc;
    padding: 12px 14px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: #000;
    border-radius: 10px;
    margin: 8px 0;
    line-height: 1.45;
    margin-bottom: 0;
}
.inline-code {
    font-family: "Courier New", monospace;
    padding: 2px 5px;
    border-radius: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}
.header-text {
    display: block;
    font-weight: bold;
    font-size: 1.5em;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 10px 0;
}
#uploadBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #4a90e2;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}
#uploadBtn:hover {
    background: #357ABD;
    transform: scale(1.1);
}
#uploadBtn:active {
    transform: scale(0.95);
}
.file-preview-box {
    position: absolute;
    bottom: 125px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    display: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #4a90e2;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
}
.suggestion-inline {
    color: #1e90ff;
    cursor: pointer;
    margin: 6px 0;
    font-weight: 500;
}
.suggestion-inline:hover {
    text-decoration: underline;
}
.bot-suggest-title {
    margin-top: 8px;
    font-weight: 600;
}
.bot-text-main {
    margin-bottom: 6px;
}
#learnMoreBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #4a90e2;
    color: white;
    font-size: 28px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    z-index: 1000;
}
@media (max-width: 768px) {
    #learnMoreBtn {
        bottom: 100px;
    }
}
#learnMoreBtn:hover {
    transform: scale(1.1);
}
/*<==========settings==========>*/
.settings-wrapper {
    position: relative;
}
.settings-wrapper > .tooltip {
    position: absolute;
    top: 120%;
    right: 0;
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}
.settings-wrapper:hover > .tooltip {
    opacity: 1;
    transform: translateY(0);
}
.settings-panel {
    position: absolute;
    top: 36px;
    right: 0;
    min-width: 180px;
    background: var(--panel-bg, #ffffff);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    z-index: 999;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: all 0.2s ease;
}
.settings-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.setting-group {
    margin-bottom: 10px;
}
.setting-group:last-child {
    margin-bottom: 0;
}
.setting-title {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 6px;
    color: #374151;
    transition: color 0.25s ease;
}
.setting-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
}
.setting-options button {
    position: relative;
    flex: 1 1 48%;
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    background: #e5e7eb;
    color: #111;
    white-space: nowrap;
    overflow: visible;
    text-overflow: ellipsis;
    transition: all 0.25s ease;
    z-index: 1;
}
.setting-options button:hover {
    transform: scale(1.05);
}
.setting-options button.active {
    background: #111;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}
.setting-options button::after {
    content: attr(data-model);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}
.setting-options button:hover::after {
    opacity: 1;
}
body.dark .setting-options button {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}
body.dark .setting-options button:hover {
    background: rgba(255, 255, 255, 0.15);
}
body.dark .setting-options button.active {
    background: #fff;
    color: #000;
}
body.dark .settings-panel {
    --panel-bg: #1f1f1f;
    color: #eee;
}
#settingsBtn {
    background: transparent;
    border: none;
    outline: none;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
}
#settingsBtn:hover {
    background: rgba(255, 255, 255, 0.2);
}
#settingsBtn:active {
    transform: scale(0.9);
}
#settingsBtn + .tooltip {
    position: absolute;
    top: 120%;
    right: 0;
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}
#settingsBtn:hover + .tooltip {
    opacity: 1;
    transform: translateY(0);
}
