:root {
    --primary-color: #8e44ad;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: white;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.18);
    --bot-bubble: #333333;
    --user-bubble: #0c8484;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comfortaa';
    background: url('https://i.pinimg.com/564x/d3/6b/cc/d36bcceceaa1d390489ec70d93154311.jpg'),
        linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    background-attachment: fixed;
    color: var(--dark-color);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow-y: auto;
    margin-left: 5px;
    margin-top: 5px;
    margin-bottom: 10px;
    border-radius: 15px;
}

.new-chat-btn {
    margin: 16px;
    padding: 12px;
    background: var(--user-bubble);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    font-family: 'Dosis';
    letter-spacing: 1px;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.new-chat-btn:active {
    transform: translateY(0);
}

.history-label {
    padding: 10px 16px;
    font-weight: bold;
    color: var(--dark-color);
    border-bottom: 1px solid var(--glass-border);
    font-family: 'Dosis';
    letter-spacing: 1px;
    font-size: 18px;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.history-item {
    font: "Dosis";
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
    margin: 4px 8px;
    transition: background-color 0.2s;
    position: relative;
}

.history-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.history-item.active {
    background-color: rgba(170, 154, 177, 0.2);
    font-weight: bold;
}

.history-item .delete-history {
    position: absolute;
    right: 10px;
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--accent-color);
}

.history-item:hover .delete-history {
    opacity: 1;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Doris";
}

.user-info img{
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.settings-btn {
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.settings-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.image-upload-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bot-bubble);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    transition: all 0.2s;
}

.image-upload-btn:hover {
    transform: translateY(-2px);
}

.image-preview-container {
    position: absolute;
    bottom: 104px;
    left: 16px;
    right: 16px;
    background: rgba(51, 51, 51, 0.95);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.image-preview {
    position: relative;
    display: inline-block;
}

.image-preview img {
    max-height: 100px;
    max-width: 100%;
    border-radius: 8px;
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.message-image {
    margin-top: 12px;
}

.message-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 2px solid white;
}

/* Bot Message Interaction Styles */

/* Popup Menu */
.message-options-popup {
    position: absolute;
    background: #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 10px;
    z-index: 1000;
    width: 160px;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        opacity 0.3s ease;
    border: 1px solid #444;
    overflow: hidden;
}

.popup-active {
    transform: scale(1);
    opacity: 1;
}

.popup-closing {
    transform: scale(0.8);
    opacity: 0;
}

.popup-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    transform: translateY(10px);
    opacity: 0;
    color: #eee;
}

.popup-option:last-child {
    margin-bottom: 0;
}

.option-active {
    transform: translateY(0);
    opacity: 1;
}

.popup-option:hover {
    background: #3a3a3a;
}

.popup-option i {
    margin-right: 10px;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.regenerate-option i {
    color: #4caf50;
}

.copy-option i {
    color: #2196f3;
}

.thumbs-up-option i {
    color: #4caf50;
}

.thumbs-down-option i {
    color: var(--accent-color);
}

.option-clicked {
    animation: pulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Feedback Icons */
.feedback-icon {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feedback-icon.positive {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.feedback-icon.negative {
    background: rgba(244, 67, 54, 0.2);
    color: var(--accent-color);
}

.feedback-active {
    transform: scale(1);
    opacity: 1;
}

.feedback-exit {
    transform: scale(1.5);
    opacity: 0;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1200;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.success {
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left: 4px solid var(--accent-color);
}

.toast-active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-exit {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
}

/* Regenerating Animation */
.message.bot.regenerating .message-text {
    opacity: 0.7;
}

.message.bot.regenerated .message-text {
    animation: highlight-new 1.5s ease;
}

@keyframes highlight-new {
    0% {
        background-color: rgba(33, 150, 243, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

/* Loading dots animation for regeneration */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background-color: #888;
    border-radius: 50%;
    display: inline-block;
    animation: dot-pulse 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dot-pulse {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Message header styling */
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.message-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.message-timestamp {
    font-size: 0.75rem;
    color: #888;
    margin-left: 10px;
}

/* Ensure message content has proper spacing */
.message-content {
    width: 100%;
}

.message-text {
    padding: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .message-header {
        flex-direction: row;
    }

    .message-timestamp {
        font-size: 0.7rem;
    }
}

.loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background: white;
    border-radius: 50%;
    animation: dot-pulse 1.4s infinite ease-in-out;
    animation-fill-mode: both;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-pulse {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Delete Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-container {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #444;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-icon {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.modal-title {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.modal-message {
    margin: 10px 0 0;
    color: #ccc;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.cancel-btn,
.confirm-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.cancel-btn {
    background-color: #444;
}

.cancel-btn:hover {
    background-color: #555;
}

.confirm-btn {
    background-color: var(--accent-color);
    font-weight: bold;
}

.confirm-btn:hover {
    background-color: #ff5252;
}

/* Chat Container Styles */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 260px);
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    margin-top: 5px;
    margin-right: 5px;
    margin-left: 5px;
    border-radius: 15px;
}

.current-chat-title {
    font-weight: bold;
    font-family: 'Dosis';
    font-size: 24px;
    letter-spacing: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--dark-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.message {
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.bot {
    align-items: flex-start;
}

.message-bubble {
    display: flex;
    max-width: 80%;
    position: relative;
}

.message.user .message-bubble {
    flex-direction: row-reverse;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 8px;
}

.message.bot .avatar {
    background: var(--bot-bubble);
    color: white;
}

.message.user .avatar {
    background: var(--user-bubble);
    color: white;
}

.message-content {
    position: relative;
}

.message-text {
    padding: 16px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.message.bot .message-text {
    background: var(--bot-bubble);
    color: white;
    border-top-left-radius: 4px;
}

.message.user .message-text {
    background: var(--user-bubble);
    color: white;
    border-top-right-radius: 4px;
}

.message-text h3 {
    margin-bottom: 8px;
    font-family: 'Dosis';
    font-size: larger;
    letter-spacing: 1px;
}

.message.user .message-timestamp{
    color: #ccc;
}

.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
}

.welcome-logo {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-logo h1 {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    color: #00bfff;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
    margin: 0;
    letter-spacing: 2px;
}

.welcome-logo p {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    color: #888;
    margin-top: 5px;
}

.welcome-message {
    width: 100%;
    max-width: 600px;
    margin-bottom: 30px;
}

.recommended-questions {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.recommended-questions h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.typewriter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 15px;
    margin: 0 auto;
    max-height: 45px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.typewriter-text {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    text-align: left;
    flex-grow: 1;
    min-height: 1.2em;
}

.typewriter-send-btn {
    background-color: var(--user-bubble);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.typewriter-send-btn:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--light-color);
    margin-left: 2px;
    animation: blink 0.7s infinite;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.fade-out {
    animation: fadeOut 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.animate-fade-in-delayed {
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) 0.4s forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) 0.2s forwards;
}

.animate-pop {
    animation: pop 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.animate-fade-out {
    animation: fadeOut 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.animate-click {
    animation: click 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes click {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .welcome-container {
        padding: 15px;
    }

    .welcome-logo {
        margin-bottom: 20px;
    }

    .welcome-message {
        margin-bottom: 20px;
    }

    .typewriter-container {
        padding: 10px 12px;
    }

    .chat-messages {
        padding: 10px 0 10px 0;
    }
}

@media (max-width: 480px) {
    .welcome-container {
        padding: 10px;
    }

    .welcome-logo {
        margin-bottom: 15px;
    }
}

/* Speech Bubble Tails */
.message.bot .message-text:before {
    content: '';
    position: absolute;
    left: -10px;
    top: 15px;
    border-width: 10px 15px 10px 0;
    border-style: solid;
    border-color: transparent var(--bot-bubble) transparent transparent;
}

.message.user .message-text:before {
    content: '';
    position: absolute;
    right: -10px;
    top: 15px;
    border-width: 10px 0 10px 15px;
    border-style: solid;
    border-color: transparent transparent transparent var(--user-bubble);
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Input Area */
.chat-input-container {
    padding: 16px;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-left: 5px;
    margin-right: 5px;
    margin-bottom: 10px;
    border-radius: 15px;
}

.chat-input-wrapper {
    display: flex;
    background: white;
    border-radius: 24px;
    padding: 8px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#userInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    resize: none;
    font-family: 'Comic Neue';
    font-size: 16px;
    padding: 8px 0;
    max-height: 120px;
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--user-bubble);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.send-btn:hover {
    transform: translateY(-2px);
}

.send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.input-info {
    margin-top: 8px;
    font-size: 12px;
    text-align: center;
    color: var(--dark-color);
    opacity: 0.7;
}

/* Responsive styles */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        left: -260px;
        z-index: 100;
        height: 98%;
        margin: 0;
    }

    .sidebar.open {
        left: 0;
        margin: 5px;
    }

    .chat-container {
        max-width: 100%;
    }

    .chat-header {
        padding: 12px;
    }

    .current-chat-title {
        display: flex;
        align-items: center;
    }

    .current-chat-title:before {
        content: '\f0c9';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        margin-right: 12px;
        cursor: pointer;
        display: block;
    }

    .message-text {
        min-width: 150px;
    }
}

/* Animation Effects */
@keyframes pop-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.message {
    animation: pop-in 0.3s ease forwards;
}

.code-block-container {
    position: relative;
    margin: 1em 0;
    border-radius: 6px;
    overflow: hidden;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2d2d2d;
    color: #fff;
    padding: 8px 15px;
    font-family: monospace;
    font-size: 0.9em;
}

.code-block-language {
    font-weight: bold;
}

.copy-button {
    background-color: #2c3e50;
    color: #ecf0f1;
    border: none;
    border-radius: 12px;
    padding: 6px 12px;
    font-family: "Dosis";
    font-size: 0.85em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.copy-button:hover {
    background-color: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.copy-button.copied {
    background-color: #2c3e50;
    color: #fff;
}

pre[class*="language-"] {
    margin: 0 !important;
    border-radius: 0 0 6px 6px !important;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6a9955 !important;
}

/* Command  */
.commands-drawer {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 100;
    display: none;
}

.commands-drawer.active {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 2px;
}

.command-item {
    padding: 10px 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.command-item:hover {
    background: #333;
}

.command-item strong {
    color: #7289da;
}

.command-description {
    color: #aaa;
    font-size: 0.9em;
}

.command-active {
    color: #7289da;
}

.message.user .message-text.command {
    color: #7289da;
    font-family: monospace;
}

.image-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.regenerate-image-btn,
.download-image-btn {
    background: #7289da;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.regenerate-image-btn:hover,
.download-image-btn:hover {
    background: #5a6db9;
}

.regenerate-image-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.download-image-btn {
    background: #43b581;
}

.download-image-btn:hover {
    background: #3a9d6e;
}

.no-results {
    color: #aaa;
    font-style: italic;
}

/* Download and regenerate */
/* Modern visual styling for image action buttons */
.image-response {
    position: relative;
}

.generated-image {
    display: block;
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-actions {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    z-index: 10;
}

/* Base button styles for icon buttons */
.image-actions button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.6);
    outline: 6px solid var(--bot-bubble);
    backdrop-filter: blur(4px);
    color: white;
    position: relative;
    overflow: hidden;
}

.image-actions button:active {
    transform: scale(0.95);
}

/* Button icons */
.image-actions button i {
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Download button specific styles */
.download-image-btn {
    background: rgba(52, 152, 219, 0.8) !important;
}

.download-image-btn:hover {
    background: rgba(41, 128, 185, 0.9) !important;
}

/* Download button success state */
.download-image-btn.success {
    background: rgba(46, 204, 113, 0.8) !important;
}

/* Regenerate button specific styles */
.regenerate-image-btn {
    background: rgba(155, 89, 182, 0.8) !important;
}

.regenerate-image-btn:hover:not([disabled]) {
    background: rgba(142, 68, 173, 0.9) !important;
}

.regenerate-image-btn[disabled] {
    background: rgba(189, 195, 199, 0.8) !important;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Tooltip styles */
.image-actions button::before {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.image-actions button:hover::before {
    opacity: 1;
    visibility: visible;
    top: -35px;
}

/* Circular progress for regenerate countdown */
.regenerate-image-btn .progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.regenerate-image-btn .progress-ring circle {
    fill: transparent;
    stroke-width: 3;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 0.1s linear;
}

.regenerate-image-btn .progress-ring .progress {
    stroke: white;
}

/* Image loading skeleton styles */
.image-loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 512px;
}

.prompt-skeleton {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 12px 16px;
    border-left: 3px solid #569cd6;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    position: relative;
}

.prompt-skeleton::before {
    content: "Prompt: ";
    color: #888;
    font-weight: 500;
}

.image-skeleton {
    padding-bottom: 100%;
    background: linear-gradient(110deg, #1a1a1a 8%, #2d2d2d 18%, #1a1a1a 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.image-skeleton::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'%3E%3C/circle%3E%3Cpolyline points='21 15 16 10 5 21'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.5;
}

/* Shimmer animation for skeleton loading */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Dots animation for the loading indicator */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background-color: #aaa;
    border-radius: 50%;
    display: inline-block;
    animation: dots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dots {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* Aspect ratio adjustment for non-square images */
.image-skeleton[data-ratio="wide"] {
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
}

.image-skeleton[data-ratio="tall"] {
    padding-bottom: 125%;
    /* 4:5 aspect ratio */
}

/* Loading spinner animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1.2s linear infinite;
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    animation: checkmark 0.5s ease-in-out;
}

/* Pulse animation for active state */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* prompt-container */
.prompt-container {
    background-color: #1e1e1e;
    color: #ce9178;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    border-radius: 4px;
    padding: 16px;
    margin: 12px 0;
    border-left: 3px solid #569cd6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
    position: relative;
    max-width: 512px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(12, 132, 132, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(12, 132, 132, 0.7);
}

.settings-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 98%;
    background: #2a2a2a;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: right 0.3s ease;
    color: #fff;
    overflow-y: auto;
    margin: 5px;
    border-radius: 15px;
}

.settings-drawer.open {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #444;
}

.settings-header h2 {
    margin: 0;
    font-size: 18px;
}

.close-settings {
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
}

.settings-content {
    padding: 20px;
}

.settings-section {
    margin-bottom: 25px;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #ccc;
}

.avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 5px;
}

.current-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.current-avatar:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay i {
    font-size: 24px;
    margin-bottom: 5px;
}

.username-section {
    margin-bottom: 15px;
}

.username-section label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.username-section input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #333;
    color: #fff;
}

.background-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.background-option {
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
}

.background-option.selected {
    border-color: var(--user-bubble);
}

.background-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-bg {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #333;
    color: #ccc;
}

.custom-bg i {
    font-size: 24px;
    margin-bottom: 5px;
}

.settings-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.settings-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid #333;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
}

#reset-settings {
    background: #555;
    color: #eee;
}

#save-settings {
    background: var(--user-bubble);
    color: #fff;
}

.settings-actions button:hover {
    transform: translateY(-2px);
    background-color: #666;
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.settings-overlay.open {
    opacity: 1;
}

/* Date header styling */
.date-header {
    display: flex;
    justify-content: center;
    /* margin: 20px 0; */
    position: relative;
    z-index: 1;
}

.date-header span {
    background-color: var(--glass-bg);
    color: #ccc;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Animation for date headers */
.date-header {
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInDown 0.5s forwards;
}

@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Adjust spacing between date headers and messages */
.date-header+.message {
    margin-top: 15px;
}

.message+.date-header {
    margin-top: 30px;
}

/* ad-guard */
img[src="https://tiiny.host/assets/img/ad.png"] {
    display: none !important;
}