* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f23;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-100%);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.new-chat-btn {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 0.5rem;
    color: #6366f1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.new-chat-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.new-chat-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conversation-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.conversation-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.conversation-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-preview {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.conversation-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    position: absolute;
    top: 0.75rem;
    right: 1rem;
}

.conversation-rename {
    position: absolute;
    top: 0.5rem;
    right: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.25rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.conversation-item:hover .conversation-rename {
    opacity: 1;
}

.conversation-rename:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.conversation-rename svg {
    width: 0.75rem;
    height: 0.75rem;
}

.toggle-sidebar {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 0.75rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toggle-sidebar:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.toggle-sidebar svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Hamburger Menu Styles */
.hamburger-menu {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 101;
}

.hamburger-button {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 0.75rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hamburger-button:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hamburger-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.hamburger-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 0.5rem;
    min-width: 180px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.menu-item.logout {
    color: #ef4444;
}

.menu-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.menu-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.menu-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* Profile Edit Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 1) 0%, rgba(139, 92, 246, 1) 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Menu Conversations Section */
.menu-conversations-section {
    margin: 0.5rem 0;
}

.menu-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.menu-section-header svg {
    width: 0.875rem;
    height: 0.875rem;
}

.menu-conversations-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.menu-conversations-list::-webkit-scrollbar {
    width: 4px;
}

.menu-conversations-list::-webkit-scrollbar-track {
    background: transparent;
}

.menu-conversations-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.menu-conversations-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.menu-conversation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    text-align: left;
    width: 100%;
    position: relative;
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
}

.menu-conversation-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.menu-conversation-item.active {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.menu-conversation-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-conversation-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.menu-conversation-preview {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.menu-conversation-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-conversation-item:hover .menu-conversation-actions {
    opacity: 1;
}

.menu-conversation-action {
    padding: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.menu-conversation-action:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.menu-conversation-action.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.menu-conversation-action svg {
    width: 0.75rem;
    height: 0.75rem;
}

.menu-conversations-loading,
.menu-conversations-empty {
    padding: 1rem 0.75rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-style: italic;
}

.menu-conversation-rename-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 16px;
    padding: 0.25rem 0.5rem;
    color: #fff;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
}

.menu-conversation-rename-input:focus {
    border-color: rgba(99, 102, 241, 0.8);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Conversation History Modal */
.modal-content {
    max-height: 400px;
    overflow-y: auto;
}

.history-conversations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-conversation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-conversation-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.history-conversation-content {
    flex: 1;
    min-width: 0;
}

.history-conversation-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #fff;
}

.history-conversation-preview {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.history-conversation-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.history-conversation-actions {
    display: flex;
    gap: 0.5rem;
}

.history-conversation-action {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.history-conversation-action:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.history-conversation-action.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.history-conversation-action svg {
    width: 1rem;
    height: 1rem;
}

.history-conversations-loading,
.history-conversations-empty {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Inline editing for conversation titles */
.history-conversation-title {
    position: relative;
}

.history-conversation-title .title-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 16px;
    padding: 2px 6px;
    color: #fff;
    font-size: inherit;
    font-weight: inherit;
    width: 100%;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    outline: none;
}

.history-conversation-title .title-input:focus {
    border-color: rgba(99, 102, 241, 0.8);
    background: rgba(255, 255, 255, 0.15);
}

/* Password Change Section */
.password-change-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.section-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
}

.section-title {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 0;
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.strength-feedback {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.2;
}

.btn-warning {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
    margin-top: 1rem;
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
}

/* Main Content Adjustment */
.main-content {
    flex: 1;
    transition: margin-left 0.3s ease;
}

.sparkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Homepage container - centered */
body:not(.chat-page) {
    display: flex;
    align-items: center;
    justify-content: center;
}

body:not(.chat-page) .container {
    max-width: 800px;
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Chat page container - input at bottom */
body.chat-page {
    display: flex;
}

body.chat-page .container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(to bottom, #ffffff, #a0a0a0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
    position: relative;
    z-index: 10;
}

.description {
    font-size: 1.2rem;
    color: #a0a0a0;
    font-weight: 300;
    position: relative;
    z-index: 10;
}

/* Chat Container */
.chat-container {
    width: 100%;
    max-width: 600px;
}

/* Chat page specific layout - input at bottom, history above */
body.chat-page .chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

body.chat-page .chat-history {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 1rem 0;
    padding-bottom: 120px; /* Add space for fixed input */
    display: flex;
    flex-direction: column;
}

body.chat-page .ai-input-container {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
    padding: 1rem;
    margin: 0 !important;
    margin-bottom: 0 !important;
    border-top: none;
    width: 100%;
}

/* AI Input Component Styles */
.ai-input-container {
    width: 100%;
    padding: 1rem 0;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.ai-input-wrapper {
    max-width: 36rem;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: start;
    flex-direction: column;
    gap: 0.5rem;
}

.textarea-container {
    position: relative;
    max-width: 36rem;
    width: 100%;
    margin: 0 auto;
}

.ai-textarea {
    max-width: 36rem;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    width: 100%;
    border-radius: 16px;
    padding: 1rem 1.5rem 1rem 1.5rem;
    padding-right: 4rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    resize: none;
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.2;
    min-height: 56px;
    max-height: 200px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ai-textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.ai-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.ai-textarea:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 16px;
    padding: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.submit-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.submit-button:disabled {
    background: none;
    cursor: not-allowed;
}

.submit-icon {
    width: 1rem;
    height: 1rem;
    color: #fff;
    transition: opacity 0.3s ease;
}

.submit-icon.has-value {
    opacity: 1;
}

.submit-icon.no-value {
    opacity: 0.3;
}

.loading-spinner {
    width: 1rem;
    height: 1rem;
    background: #fff;
    border-radius: 0.125rem;
    animation: spin 3s linear infinite;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.status-text {
    padding-left: 1rem;
    height: 1rem;
    font-size: 0.75rem;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chat History */
.chat-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 1rem;
    border-radius: 16px;
    max-width: 85%;
    word-wrap: break-word;
}

.user-message {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    position: relative;
    z-index: 10;
}

.ai-message {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    align-self: flex-start;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
    line-height: 1.6;
    white-space: pre-line;
}

.loading {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0a0;
    align-self: flex-start;
    font-style: italic;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

/* Loading and Empty States */
.loading-conversations {
    padding: 2rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.empty-conversations {
    padding: 2rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 100%;
        max-width: 350px;
    }
    
    body.chat-page .container {
        max-width: 100%;
        padding: 1.5rem;
    }
    
    .chat-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 320px;
    }
    
    .container {
        padding: 1rem;
    }
    
    body.chat-page .container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .toggle-sidebar {
        top: 1rem;
        left: 1rem;
    }
    
    /* Optimize chat messages for mobile */
    .message {
        max-width: 95%;
        font-size: 1rem;
        line-height: 1.5;
        padding: 0.875rem 1rem;
        margin-bottom: 1rem;
    }
    
    .user-message {
        margin-left: auto;
        margin-right: 0;
    }
    
    .ai-message {
        margin-left: 0;
        margin-right: auto;
    }
    
    /* Mobile chat history spacing */
    body.chat-page .chat-history {
        padding: 0.5rem 0;
        padding-bottom: 140px; /* More space for mobile input */
    }
    
    /* Mobile hamburger improvements */
    .hamburger-menu {
        top: 1rem;
        left: 1rem;
        z-index: 102;
    }
    
    .hamburger-button {
        width: 3rem;
        height: 3rem;
        padding: 0.75rem;
    }
    
    .hamburger-dropdown {
        top: 100%;
        left: 0;
        min-width: 250px;
        margin-top: 0.5rem;
    }
    
    .menu-item {
        padding: 1rem;
        font-size: 1rem;
        min-height: 3rem;
    }
    
    .menu-item svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Mobile specific optimizations */
@media (max-width: 480px) {
    body.chat-page .container {
        padding: 0.5rem;
    }
    
    /* Full width input area on mobile */
    body.chat-page .ai-input-container {
        padding: 1rem 0.5rem;
        background: transparent;
    }
    
    .ai-input-wrapper {
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .textarea-container {
        max-width: 100%;
    }
    
    .ai-textarea {
        max-width: 100%;
        font-size: 1rem;
        padding: 1rem;
        padding-right: 4rem;
        min-height: 3rem;
        border-radius: 1rem;
    }
    
    /* Mobile message optimization */
    .message {
        font-size: 0.9rem;
        padding: 0.75rem;
        border-radius: 1rem;
        max-width: 98%;
    }
    
    /* Mobile sidebar full overlay */
    .sidebar {
        max-width: 100%;
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Mobile conversation list optimization */
    .conversation-item {
        padding: 1rem;
        min-height: 3.5rem;
    }
    
    .menu-conversation-title {
        font-size: 0.9rem;
        max-width: 200px;
    }
    
    .menu-conversation-preview {
        font-size: 0.8rem;
        max-width: 200px;
    }
    
    /* Mobile title improvements */
    .title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .subtitle {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }
    
    /* Mobile modal improvements */
    .modal {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .form-input {
        font-size: 1rem;
        padding: 0.875rem;
        min-height: 3rem;
    }
    
    .form-button {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-height: 3rem;
    }
}

/* Feedback Modal Styles */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.feedback-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.feedback-modal-content {
    position: relative;
    background: rgba(15, 15, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.feedback-modal-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.feedback-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.feedback-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.feedback-modal-body {
    padding: 1.5rem;
}

.feedback-field {
    margin-bottom: 1.5rem;
}

.feedback-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
}

.feedback-field select,
.feedback-field textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-field select:focus,
.feedback-field textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.feedback-field textarea {
    resize: vertical;
    min-height: 80px;
}

.feedback-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Star Rating Styles */
.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.rating-stars input[type="radio"] {
    display: none;
}

.rating-stars .star {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.rating-stars .star:hover,
.rating-stars .star.highlighted {
    color: #fbbf24;
    transform: scale(1.1);
}

.rating-stars .star.selected {
    color: #fbbf24;
}

.rating-stars input[type="radio"]:checked ~ .star,
.rating-stars .star.selected {
    color: #fbbf24;
}

/* Feedback Actions */
.feedback-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feedback-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 100px;
}

.feedback-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.feedback-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5856eb 0%, #7c3aed 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.feedback-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.feedback-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feedback-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Success and Error States */
.feedback-success,
.feedback-error {
    text-align: center;
    padding: 2rem 1rem;
}

.feedback-success-icon,
.feedback-error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feedback-success-icon {
    color: #10b981;
}

.feedback-error-icon {
    color: #ef4444;
}

.feedback-success h4,
.feedback-error h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #fff;
}

.feedback-success p,
.feedback-error p {
    margin: 0 0 1rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Floating Feedback Icon */
.feedback-icon {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(99, 102, 241, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.feedback-icon:hover {
    background: rgba(99, 102, 241, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

.feedback-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.feedback-icon.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Touch-friendly button improvements */
@media (max-width: 768px) {
    /* Ensure all buttons are touch-friendly (min 44px) */
    button, .btn, .form-button, .feedback-btn {
        min-height: 3rem;
        min-width: 3rem;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 0.75rem;
        touch-action: manipulation;
    }
    
    /* Input elements touch optimization */
    input, textarea, select {
        font-size: 1rem; /* Prevents zoom on iOS */
        padding: 0.875rem;
        min-height: 3rem;
        border-radius: 0.75rem;
        touch-action: manipulation;
    }
    
    /* Send button optimization */
    .send-button {
        min-width: 3rem;
        min-height: 3rem;
        padding: 0.75rem;
        border-radius: 50%;
    }
    
    .send-button svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Mobile Responsive for Feedback */
@media (max-width: 600px) {
    .feedback-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .feedback-modal-header,
    .feedback-modal-body {
        padding: 1rem;
    }
    
    .feedback-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .feedback-btn {
        width: 100%;
        min-height: 3rem;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .rating-stars .star {
        font-size: 2rem;
        padding: 0.5rem;
        min-width: 3rem;
        min-height: 3rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .feedback-icon {
        right: 1rem;
        bottom: 5rem;
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .feedback-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    .title {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    body.chat-page .ai-input-container {
        padding: 0.75rem 0.25rem;
    }
    
    .ai-input-wrapper {
        padding: 0 0.25rem;
    }
    
    .message {
        font-size: 0.85rem;
        padding: 0.625rem;
        max-width: 100%;
    }
    
    .hamburger-dropdown {
        min-width: 200px;
        left: -50px;
    }
}