body{
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
a{
    color:#0357df;
}
a:hover{
    color:#003d9f;
}
hr{
    margin: 10px 0;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;  /* ~19px */
}

h4 {
  font-size: 16px;     /* Обычно как базовый текст */
}

h5 {
  font-size: 14px;  /* ~13px */
}

h6 {
  font-size: 12px;  /* ~11px */
}

ul{
    list-style: square;
    padding-left: 16px;
    margin: 10px 0;
}
ul:has(> li > .math-formula) {
    list-style: none;
}

.v-toast {
    padding: 0px 15px !important;
}
.v-toast__text a{
    color: #fff;
    text-decoration: underline;
}
.flex-center{
    display: flex;
    justify-content: center;
}
.color-red{
    color:red;
}

/* ----- auth ---------*/
.btn-primary {
    background: #1d4ed8;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.box-brand-icon{
font-size: 50px;
text-align: center;
}
.box-brand-icon > .fa, .box-brand-icon > .fas{
    cursor: pointer;
}
.fa-telegram {
    color: #0088cc;
}

.math-formula {
  margin: 1em 0;
  overflow-x: auto;
}

.md-table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
    font-size: 16px;
}
.md-table th, .md-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    min-width: 100px;
}
.md-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}
.md-table tr:nth-child(even) {
    background-color: #f9f9f9;
}


.box-table {
    max-width: 740px;
    margin: 10px auto;
    padding: 10px;
    font-family: Arial, sans-serif;
    overflow-x: scroll;
}

.custom-sidebar {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 320px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 40;
}

.custom-sidebar.collapsed {
    width: 80px;
}

.custom-sidebar-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 8px;
    padding: 12px 16px;
    position: relative;
    display: flex;
    align-items: center;
}

.custom-sidebar-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(4px);
}

.custom-sidebar-item.active {
    background: rgba(59, 130, 246, 0.1);
}

.custom-sidebar-item.collapsed {
    justify-content: center;
    padding: 12px 8px;
}

.custom-sidebar-item.collapsed > i {
    margin-right: 0;
}

.collapsed .sidebar-text {
    display: none;
}

.custom-main-area {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transition: margin-left 0.3s ease;
    margin-left: 320px;
}

.custom-main-area.expanded {
    margin-left: 80px;
}

.custom-welcome-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.custom-input-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}
.custom-input-container.disabled {
    pointer-events: none;
    opacity: 0.7;
}

.custom-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.custom-textarea {
    resize: none;
    min-height: 24px;
    max-height: 200px;
    line-height: 1.3;
    font-size: 14px;
    margin-left: 10px;
    overflow: auto;
}
.is-ios .custom-textarea{
    font-size: 16px;
}

.custom-icon-button {
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.custom-icon-button:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.custom-send-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    transition: all 0.2s ease;
}

.custom-send-button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: scale(1.05);
}

.custom-send-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: scale(1);
}

.custom-voice-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transition: all 0.2s ease;
}

.custom-voice-button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: scale(1.05);
}

.custom-mobile-menu {
    backdrop-filter: blur(10px);
    background: rgba(31, 41, 55, 0.95);
}

.custom-voice-recording {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.custom-file-upload {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.custom-file-upload input[type="file"] {
    position: absolute;
    left: -9999px;
}

.custom-disclaimer {
    color: #6b7280;
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
}

.is-ios .mb-safe {
    margin-bottom: env(safe-area-inset-bottom);
}

/* Или лучше для padding */
.is-ios .pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
    position: sticky;
    bottom: 0px;
    left: 0;
    right: 0;
}

.is-mobile .btn-voice {
    display: none;
}


/* ============== loader ================= */
.loader-overlay {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.loader {
  text-align: center;
}

.loader i {
  font-size: 48px;
  color: #fff;
  margin-bottom: 10px;
}

.loader span {
  display: block;
  font-size: 16px;
  color: #fff;
}

/* ///============== loader ================= */

.ai-message-container {
    display: flex;
    justify-content: left;
    width: 100%;
    min-width: 888px;
    margin-bottom: 20px;
}

.ai-message {
    background: white;
    border-radius: 12px;
    padding: 20px;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
    max-width: 896px;
    width: 100%;
    margin-right: 50px;
    border: 1px solid #ededed;
}

.user-message-container {
    display: flex;
    justify-content: right;
    width: 100%;
    min-width: 888px;
    margin-bottom: 20px;
}

.user-message {
    background: #3b82f6;
    color: white;
    border-radius: 12px;
    padding: 16px;
    max-width: 896px;
    width: fit-content;
    margin: 25px 10px 0 60px;
}
.user-avatar{
    width: 32px; 
    height: 32px;
}

.user-message .text-row{
    margin-bottom: 20px;
}

.no-select {
    user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.user-message .file-row .fa-close{
    color:red; 
    cursor:pointer; 
    margin-right: 10px;
    display: none;
}

.col-msg{
    display: flex;
    align-items: center;
    min-height: 32px;
    min-width: 270px;
}
.col-msg > div{
    height: auto;
    max-width: 47rem;
}


.code-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 12px 0;
    overflow: hidden;
    overflow-x: auto;
}

.code-header {
    background: #e9ecef;
    padding: 8px 16px;
    border-bottom: 1px solid #dee2e6;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-content {
    padding: 16px;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    background: none;
    padding: 0;
}

.copy-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-button:hover {
    background: #5a6268;
}


.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1000;
    border: 1px solid #e5e7eb;
}

.dropdown-content a {
    color: #374151;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f3f4f6;
}

.dropdown-content a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-content a:last-child {
    border-radius: 0 0 8px 8px;
}

/*
.dropdown:hover .dropdown-content {
    display: block;
}*/

.model-dropdown .dropdown-content {
    right: 0;
    left: auto;
}

.user-dropdown .dropdown-content {
    right: 0;
    left: auto;
}


.tokens-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    margin: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(59, 130, 246, 0.1);
}

.tokens-info:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(4px);
}

.tokens-info.collapsed {
    justify-content: center;
    margin: 4px;
    display: none;
}

.tokens-info.collapsed .tokens-text {
    display: none;
}

.tokens-word {
    color: #10b981 !important;
    font-weight: 600;
}


.fixed-clear-section {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #131b2a;
    padding: 20px 16px 16px;
    text-align: center;
    z-index: 100;
    border-top: 1px solid #2b2d32;
}
.fixed-clear-section.collapsed{
    display:none;
}

.fixed-clear-button {
    background: rgba(107, 114, 128, 0.2);
    color: #d1d5db;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    width: 100%;
    max-width: 200px;
}

.fixed-clear-button:hover {
    background: rgba(107, 114, 128, 0.3);
    border-color: rgba(107, 114, 128, 0.5);
    transform: translateY(-2px);
}

.fixed-clear-button.collapsed {
    padding: 8px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.fixed-clear-button.collapsed > i {
    margin-right: 0;
}

.fixed-clear-button.collapsed .clear-text {
    display: none;
}


.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    /*box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);*/
    animation: modalFadeIn 0.3s ease;
    position: relative;
    min-height: fit-content;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.close-modal {
    color: #9ca3af;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #6b7280;
}


.payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-input.pasw{
    padding: 12px 40px 12px 16px;
}

.payment-info {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

.payment-button {
    background: #1d4ed8;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.payment-button:hover {
    background: #1e40af;
}


.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-right: 10px;
}

.profile-value {
    font-size: 16px;
    color: #111827;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.profile-value.pasw{
    display: flex; 
    justify-content: space-between; 
    align-items: center;

}

.change-password-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.change-password-link:hover {
    text-decoration: underline;
    
}
.input-new-pasw{
    width: 200px;
    margin-right: 10px;
    border: 1px solid #ccc;
    padding: 4px 6px;
    outline: none;
}


.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 8px;
}

.sidebar-header.collapsed {
    justify-content: center;
}

.sidebar-toggle-btn {
    background: rgba(107, 114, 128, 0.2);
    color: #d1d5db;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin-left: 10px;
}

.sidebar-toggle-btn:hover {
    background: rgba(107, 114, 128, 0.3);
    border-color: rgba(107, 114, 128, 0.5);
}

.sidebar-header.collapsed .sidebar-toggle-btn {
    margin-left: 0;
}


.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}


.chat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.chat-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(4px);
}
.chat-item.active {
    background: rgba(59, 130, 246, 0.1);
}

.chat-item:hover .chat-options {
    opacity: 1;
}

.chat-item.collapsed {
    justify-content: center;
    padding: 12px 8px;
    margin: 4px;
}

.chat-item.collapsed .chat-title {
    display: none;
}

.chat-item.collapsed .chat-options {
    display: none;
}

.chat-title {
    flex: 1;
    color: #d1d5db;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.chat-options {
    opacity: 1;
    transition: opacity 0.2s ease;
    position: relative;
    z-index: 1;
}

.chat-options-btn {
    background: none;
    border: none;
    color: #9ca3af;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-options-btn:hover {
    background: rgba(156, 163, 175, 0.2);
    color: #d1d5db;
}


.chat-options-menu {
    display: none;
    position: absolute;
    right: 25px;
    top: 40px;
    background: white;
    width: 200px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 200 !important;
    border: 1px solid #e5e7eb;
    pointer-events: auto;
    overflow: hidden;
}

.chat-options-menu.show {
    display: block;
}

.chat-options-menu a {
    color: #374151;
    padding: 10px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    font-size: 13px;
    position: relative;
}

.chat-options-menu a:hover {
    background-color: #f3f4f6;
}

.chat-options-menu a.hidden{
    display: none;
}

.chat-options-menu a i {
    margin-right: 8px;
    width: 14px;
}

#chatMessages{
    display: flex;
    height: 100%;
}

.logo-ai{
   
   display: flex;
   top: 0;
   justify-content: center;
    align-items: center;
    color:#fff;
   width: 100%;
   height: 100%;
   background-size: contain;
   background-repeat: no-repeat;
   position: relative;
   
}


#sel-files{
    display: flex;
    justify-content: right;
    
}

.list-files{
    padding: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    
}
.list-files .files{
    max-height: 300px;
    overflow-y: auto;
}

.bottom-phone{
    display:none;
}

.sidebar-section {
    transition: all 0.3s ease;
}

.sidebar-section.collapsed {
    display: none;
}

.sidebar-section.collapsed.main-nav {
    display: block;
}


.voice-mode-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.voice-mode-container.active {
    display: flex;
}

.voice-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.voice-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.voice-avatar.recording {
    animation: voicePulse 2s infinite;
}

@keyframes voicePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.voice-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.voice-avatar-placeholder {
    font-size: 4rem;
    color: white;
}

.voice-mode-controls {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.voice-control-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.voice-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.voice-upload-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.voice-upload-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}


.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(156, 163, 175, 0.1);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.8);
}


.sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
}

.sidebar-scrollable.collapsed {
    padding-bottom: 60px;
}

.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 20px;
}

.dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
  animation: bounce 1.4s infinite ease-in-out both;
}

.dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.dots span:nth-child(2) {
  animation-delay: -0.16s;
}

#app-nc-widget #nc-box-icon.lb {
        left: 10px;
        bottom: 10px;
}

@keyframes bounce {
  0%, 80%, 100% { 
    transform: scale(0);
  }
  40% { 
    transform: scale(1);
  }
}

@media (max-width: 460px) {

    
}

@media (max-width: 768px) {
   
    .text-row{
        overflow-x: scroll;
    }

    .mobile-menu-btn {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 50;
        background: #1f2937;
        color: white;
        border: none;
        padding: 12px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        transition: all 0.3s ease;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-btn:hover {
        background: #374151;
        transform: scale(1.05);
    }

    
    .md\:hidden {
        display: block !important;
    }

   
    .custom-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 45;
    }

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

    .custom-sidebar.collapsed {
        width: 70px;
    }

   
    .custom-main-area {
        margin-left: 0;
        width: 100%;
    }

    .custom-main-area.expanded {
        margin-left: 0;
    }

   
    header {
        padding: 12px 16px;
        padding-left: 72px;
       
    }

    .header-title {
        display: none !important;
       
    }

    .header-model {
        font-size: 18px;
    }

   
    #userEmail {
        display: none !important;
        
    }


    .dropdown-content {
        min-width: 140px;
        font-size: 14px;
    }

    .dropdown-content a {
        padding: 10px 12px;
    }

   
    #messagesContainer{
        padding: 0;
    }

    #chatMessages {
        gap: 16px;
    }

    .col-msg > div{
        max-width: 17rem;
    }
  
    .ai-message,
    .user-message {
        max-width: 22rem !important;
        margin: 0 !important;
    }

    .ai-message {
        padding: 16px;
        border-radius: 8px;
    }

    .user-message {
        padding: 12px 16px;
        border-radius: 8px;
    }

    .ai-message-container {
        padding: 0 8px;
        min-width: 0;
    }

    .user-message-container {
        padding: 0 8px;
        min-width: 0;
    }
    .box-table{
        
        max-width: calc(100vw - 102px);
    }

   
    .custom-input-container {
        margin: 8px !important;
        border-radius: 12px;
        padding: 2px;
        max-width: none !important;
    }

    .custom-input-container .flex {
        padding: 8px 12px;
        gap: 8px;
    }

    .custom-textarea {
        font-size: 16px;
        min-height: 20px;
        max-height: 120px;
    }

    .custom-icon-button {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    
    .modal-content {
        width: 95%;
        margin: 5vh auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 16px 20px 12px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-title {
        font-size: 18px;
    }

    .form-input {
        font-size: 16px;

    }


    .voice-avatar {
        width: 150px;
        height: 150px;
    }

    .voice-avatar-placeholder {
        font-size: 3rem;
    }

    .voice-mode-controls {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 20px;
    }

    .voice-control-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }

    .voice-upload-btn {
        bottom: 100px;
        right: 20px;
    }

   
    .sidebar-header {
        padding: 12px;
        flex-direction: row;
        justify-content: space-between;
    }

    .tokens-info {
        padding: 8px 12px;
        font-size: 12px;
        max-width: 70%;
        margin: 0; 
        flex: 1;
    }

    .tokens-info.collapsed {
        padding: 8px;
        margin: 2px;
    }

    .custom-sidebar-item {
        padding: 10px 12px;
        margin: 2px 6px;
        font-size: 14px;
    }

    .custom-sidebar-item.collapsed {
        padding: 10px 6px;
        margin: 2px;
    }

    

    .chat-item {
        padding: 10px 12px;
        margin: 2px 6px;
        font-size: 13px;
    }

    .chat-item.collapsed {
        padding: 10px 6px;
        margin: 2px;
    }

    .chat-title {
        max-width: 160px;
        font-size: 13px;
    }

    .fixed-clear-section {
        padding: 15px 12px 12px;
    }

    .fixed-clear-button {
        font-size: 12px;
        padding: 10px 16px;
        max-width: 180px;
    }

    .fixed-clear-button.collapsed {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

   
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 42;
        backdrop-filter: blur(2px);
        transition: opacity 0.3s ease;
        pointer-events: auto;
    }

    .mobile-overlay.hidden {
        display: none;
        pointer-events: none;
    }

    .hidden {
        display: none !important;
    }

   
    .mobile-close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background: none;
        border: none;
        color: #9ca3af;
        font-size: 20px;
        cursor: pointer;
        padding: 4px;
        z-index: 50;
    }

    .mobile-close-btn:hover {
        color: #d1d5db;
    }


    .code-block {
        margin: 8px 0;
    }

    .code-header {
        padding: 6px 12px;
        font-size: 11px;
    }

    .code-content {
        padding: 12px;
        font-size: 13px;
    }

    .copy-button {
        padding: 3px 6px;
        font-size: 10px;
    }

  
    .custom-icon-button,
    .chat-options-btn,
    .sidebar-toggle-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

 
    .custom-disclaimer {
        font-size: 11px;
        padding: 0 8px;
    }

  
    .custom-main-area .p-4 {
        padding: 0 !important;
    }

  
    .max-w-4xl {
        max-width: none !important;
    }
}

@media (min-width: 680px) and (max-width: 970px){
    #inputArea {
        margin-bottom: 70px;
    }
}
@media (min-width: 500px) and (max-width: 1160px){
    #inputArea {
        margin-bottom: 70px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .bottom-phone{
        display:block;
        width:100%;
        height: 30px;
    }


    .ai-message-container {
        width: 96%;
        min-width: 730px;
    }
    .user-message-container {
        width: 96%;
        min-width: 730px;
    }
    .box-table{
        
        max-width: 620px;
    }

    

    .custom-sidebar {
        width: 280px;
    }

    .custom-main-area {
        margin-left: 280px;
    }

    .custom-main-area.expanded {
        margin-left: 70px;
    }

    .custom-sidebar.collapsed {
        width: 70px;
    }

    .modal-content {
        width: 80%;
        max-width: 500px;
    }

    /*
    .ai-message,
    .user-message {
        max-width: 800px;
    }*/

    .voice-avatar {
        width: 170px;
        height: 170px;
    }

    .custom-input-container {
        margin: 16px 24px;
    }
}

@media (max-width: 600px) {
    .custom-sidebar {
        width: 100%;
    }
}

@media (max-width: 1200px) {
    #app-nc-widget{
        display: none !important;
    }
}

@media (min-width: 1440px) {
    .custom-sidebar {
        width: 360px;
    }

    .custom-main-area {
        margin-left: 360px;
    }

    .custom-main-area.expanded {
        margin-left: 90px;
    }

    .custom-sidebar.collapsed {
        width: 90px;
    }

    .ai-message,
    .user-message {
        max-width: 52rem;
        overflow: hidden;
    }

    .custom-input-container {
        max-width: 52rem;
        margin: 20px auto;

    }
}


@media (max-width: 768px) and (orientation: landscape) {
    .voice-avatar {
        width: 120px;
        height: 120px;
    }

    .voice-avatar-placeholder {
        font-size: 2.5rem;
    }

    .modal-content {
        margin: 2vh auto;
        max-height: 96vh;
    }

    header {
        padding: 8px 16px;
        padding-left: 72px;
    }
}


@media (hover: none) and (pointer: coarse) {

    .custom-sidebar-item:hover,
    .chat-item:hover,
    .tokens-info:hover {
        transform: none;
    }

    .custom-icon-button:hover {
        transform: none;
    }

    .custom-sidebar-item:active,
    .chat-item:active {
        background: rgba(59, 130, 246, 0.2);
        transform: scale(0.98);
    }

    .custom-icon-button:active {
        transform: scale(0.95);
    }
}


@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


@media (prefers-contrast: high) {
    .custom-input-container {
        border: 3px solid #000;
    }

    .custom-send-button,
    .custom-voice-button {
        border: 2px solid #000;
    }

    .modal-content {
        border: 2px solid #000;
    }
}


@media (prefers-color-scheme: dark) {
    .custom-main-area {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }

    .ai-message {
        background: #374151;
        color: #f3f4f6;
    }

    .custom-input-container {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .custom-textarea {
        color: #f3f4f6;
    }

    .custom-textarea::placeholder {
        color: #9ca3af;
    }
}