.modal-content {
    border: 1px solid var(--bs-primary);
    background-color: var(--bs-dark);
    color: var(--bs-light);
}

/* Card-level chat modal rounded corners to match modern design language */
#chatModal .modal-content {
    border-radius: 24px;
}

/* Board-level chat modal rounded corners to match modern design language */
#streamTestModal .modal-content {
    border-radius: 24px;
}

/* Card-level chat modal tabs to match Settings modal styling */
#chatModal .nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
    padding: 0 1.5rem;
    background: transparent;
}

#chatModal .nav-tabs .nav-item {
    margin-bottom: 0;
}

#chatModal .nav-tabs .nav-link {
    background: transparent;
    border: none;
    border-radius: 12px 12px 0 0;
    color: #888899;
    padding: 0.875rem 1.25rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    margin-right: 0.5rem;
    /* Override the existing chat-modal-tab-title styles */
    font-family: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

#chatModal .nav-tabs .nav-link:hover {
    color: #EAEAEA;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

#chatModal .nav-tabs .nav-link.active {
    color: #4A4AFF;
    background: rgba(74, 74, 255, 0.1);
    border-bottom: 2px solid #4A4AFF;
    transform: translateY(-1px);
}

#chatModal .nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4A4AFF, transparent);
    border-radius: 2px;
}

.modal-header {
    padding: 1rem 1rem 0rem 1rem;
    border-bottom: 0;
}

.modal-footer {
    border-top: 0;
}

.toast-body {
    padding: 0;
}

.modal .form-control {
    background-color: var(--bs-dark);
    color: var(--bs-light);
    border-color: var(--bs-secondary);
}

.modal .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.border-purple {
    border-color: var(--bs-primary) !important;
}

#streamTestMessages {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Modern Modal Styles inspired by booster page */
.modern-modal {
    background: rgba(26, 26, 35, 0.95);
    border-radius: 24px;
    border: 1px solid var(--bs-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    color: #EAEAEA;
    overflow: hidden;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}

/* Prevent stray outlines or decorative pseudo-elements from appearing around modals */
.modern-modal,
.modern-modal *:focus {
    outline: none !important;
    box-shadow: none !important;
}

.modern-modal::before,
.modern-modal::after {
    content: none !important;
}

/* Suppress any inherited decorative pseudo-elements/outlines on Bootstrap wrappers */
.modal-dialog::before,
.modal-dialog::after,
.modal-content::before,
.modal-content::after {
    content: none !important;
}

.modal-dialog:focus,
.modal-content:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove border on share onboarding modals only (keep other modals as-is) */
#sharedIntroModal .modal-dialog,
#sharedOutroModal .modal-dialog {
    border: none !important;
    box-shadow: none !important;
}

/* Ensure proper vertical centering for modern modals */
.modal-dialog-centered.modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 2rem);
    margin: 1rem auto;
}

/* For larger modals, ensure they don't exceed viewport */
.modal-dialog-centered.modal-lg {
    max-height: calc(100vh - 2rem);
    margin: 1rem auto;
}

/* Override chat.css rules for Quick AI Pro modals to prevent backdrop issues */
#quickAITopicProModal .modal-dialog.modal-lg,
#quickAIBoardProModal .modal-dialog.modal-lg,
#quickAIChatsProModal .modal-dialog.modal-lg {
    height: auto !important;
    margin: 1rem auto !important;
    max-height: calc(100vh - 2rem);
}

.modern-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 1rem 2rem 2rem 2rem;
}

/* Tighter, more compact list spacing in onboarding intro modal */
#sharedIntroModal .modern-modal-body ul,
#sharedIntroModal .modern-modal-body li {
    margin-top: 0.35rem !important;
    margin-bottom: 0.35rem !important;
}

#sharedIntroModal .modern-modal-body ul { padding-left: 1.25rem !important; }
#sharedIntroModal .modern-modal-body li {
    line-height: 1.55 !important;
    font-size: 1.05rem !important;
    color: #D2D2D2 !important; /* slightly darker than paragraph text */
}

/* Slightly larger paragraph text for better hierarchy vs bullets */
#sharedIntroModal .modern-modal-body p {
    font-size: 1.05rem !important;
    line-height: 1.55 !important;
    margin-bottom: 1.25rem !important;
}

/* Emoji bullets styling */
#sharedIntroModal .modern-modal-body .intro-bullets {
    list-style: none !important;
    padding-left: 0 !important;
}

#sharedIntroModal .modern-modal-body .intro-bullets li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
}

#sharedIntroModal .modern-modal-body .intro-bullets .bullet-stars {
    width: 1.15rem !important;
    height: 1.15rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Apply the same gradient treatment as the intro modal title */
    background: linear-gradient(135deg, #EAEAEA, #4A4AFF) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important; /* Safari */
    margin-top: 0.1rem !important;
    flex-shrink: 0 !important;
}

/* Make intro modal title larger */
#sharedIntroModal .modern-modal-title {
    font-size: 2rem !important;
}

/* Ensure extra spacing before the final muted line */
#sharedIntroModal .modern-modal-body p.mb-0 {
    margin-top: 1rem !important;
    font-size: 1.05rem !important;
    line-height: 1.55 !important;
    color: #EAEAEA !important; /* match main paragraph color, override text-muted */
}

.modern-modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: none;
    background: transparent;
    position: relative;
}

.modern-modal-title {
    font-size: 1.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #EAEAEA, #4A4AFF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    text-align: center;
}

.modern-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    opacity: 0.8 !important;
    transition: all 0.3s ease;
    background: transparent !important;
    border: none !important;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EAEAEA !important;
    font-size: 1.2rem;
    font-weight: bold;
    filter: none !important;
}

.modern-close-btn:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1);
    color: #FFFFFF !important;
}

.modern-close-btn::before {
    content: "×";
    color: #EAEAEA !important;
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1;
    transform: translateY(-1px);
}

.modern-close-btn:hover::before {
    color: #FFFFFF !important;
}

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

.modern-form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #EAEAEA;
    font-size: 1.1rem;
}

.modern-form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #EAEAEA;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modern-form-input:focus {
    outline: none;
    border-color: #4A4AFF;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(74, 74, 255, 0.15);
    transform: translateY(-1px);
}

.modern-form-input::placeholder {
    color: #888899;
    opacity: 1;
}

.modern-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

.modern-textarea:focus {
    transform: none; /* Remove the translateY for textareas as it can be jarring */
}

.modern-form-hint {
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    color: #888899;
    font-size: 0.875rem;
    line-height: 1.4;
}

.modern-file-upload-container {
    position: relative;
}

.modern-file-input {
    position: relative;
    cursor: pointer;
}

.modern-file-input::-webkit-file-upload-button {
    background: rgba(74, 74, 255, 0.1);
    border: 1px solid rgba(74, 74, 255, 0.3);
    border-radius: 8px;
    color: #4A4AFF;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-file-input::-webkit-file-upload-button:hover {
    background: rgba(74, 74, 255, 0.2);
    border-color: #4A4AFF;
}

.modern-file-input::file-selector-button {
    background: rgba(74, 74, 255, 0.1);
    border: 1px solid rgba(74, 74, 255, 0.3);
    border-radius: 8px;
    color: #4A4AFF;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-file-input::file-selector-button:hover {
    background: rgba(74, 74, 255, 0.2);
    border-color: #4A4AFF;
}

.modern-modal-footer {
    padding: 1rem 2rem 2rem 2rem;
    border-top: none;
    background: transparent;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Settings Modal Specific Styles */
.settings-modal {
    background: rgba(26, 26, 35, 0.95);
    border-radius: 24px;
    border: 1px solid var(--bs-primary, #4A4AFF);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    color: #EAEAEA;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 785px;
    min-height: 785px;
}

.settings-modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: none;
    background: transparent;
    position: relative;
}

.settings-modal-title {
    font-size: 1.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #EAEAEA, #4A4AFF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    text-align: center;
}

.settings-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    opacity: 0.8 !important;
    transition: all 0.3s ease;
    background: transparent !important;
    border: none !important;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EAEAEA !important;
    font-size: 1.2rem;
    font-weight: bold;
    filter: none !important;
}

.settings-close-btn:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1);
    color: #FFFFFF !important;
}

.settings-close-btn::before {
    content: "×";
    color: #EAEAEA !important;
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1;
    transform: translateY(-1px);
}

.settings-close-btn:hover::before {
    color: #FFFFFF !important;
}

.settings-modal-body {
    padding: 0 2rem 1rem 2rem;
    overflow-y: auto !important;
    flex: 1;
    max-height: calc(100vh - 200px);
    min-height: 0;
}

.settings-tab-content-inner {
    max-height: none;
    overflow: visible;
    min-height: 0;
}

.settings-modal-footer {
    padding: 1rem 2rem 2rem 2rem;
    border-top: none;
    background: transparent;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Modern Tab Navigation */
.settings-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
}

.settings-tabs .nav-item {
    margin-bottom: 0;
}

.settings-tabs .nav-link {
    background: transparent;
    border: none;
    border-radius: 12px 12px 0 0;
    color: #888899;
    padding: 1rem 1.5rem;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    margin-right: 0.5rem;
}

.settings-tabs .nav-link:hover {
    color: #EAEAEA;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.settings-tabs .nav-link.active {
    color: #4A4AFF;
    background: rgba(74, 74, 255, 0.1);
    border-bottom: 2px solid #4A4AFF;
    transform: translateY(-1px);
}

.settings-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4A4AFF, transparent);
    border-radius: 2px;
}

/* Tab Content */
.settings-tab-content {
    background: transparent;
}

.settings-tab-pane {
    padding: 1.5rem 0;
    background: transparent;
}

/* Modern Form Elements */
.settings-form-group {
    margin-bottom: 1.5rem;
}

.settings-form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #EAEAEA;
    font-size: 1.1rem;
}

.settings-form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #EAEAEA;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.settings-form-input:focus {
    outline: none;
    border-color: #4A4AFF;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(74, 74, 255, 0.15);
    transform: translateY(-1px);
}

.settings-form-input::placeholder {
    color: #888899;
    opacity: 1;
}

.settings-form-input:disabled,
.settings-form-input[readonly] {
    background: rgba(255, 255, 255, 0.02);
    color: #888899;
    cursor: not-allowed;
}

.settings-form-select {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #EAEAEA;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23EAEAEA' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 3rem;
}

.settings-form-select:focus {
    outline: none;
    border-color: #4A4AFF;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(74, 74, 255, 0.15);
    transform: translateY(-1px);
}

.settings-form-select option {
    background: #1A1A23;
    color: #EAEAEA;
    padding: 0.5rem;
}

.settings-form-hint {
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    color: #888899;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Modern Cards */
.settings-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: visible;
}

.settings-card:hover {
    border-color: rgba(74, 74, 255, 0.3);
    transform: translateY(0px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.settings-card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #EAEAEA;
    margin: 0;
}

.settings-card-subtitle {
    font-size: 0.9rem;
    color: #888899;
    margin: 0.25rem 0 0 0;
}

.settings-card-body {
    padding: 0;
}

.settings-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

/* Subscription Details Layout */
.subscription-details {
    background: transparent;
}

.subscription-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.subscription-row:last-child {
    border-bottom: none;
}

.subscription-label {
    font-weight: 500;
    color: #EAEAEA;
    font-size: 1.1rem;
}

.subscription-value {
    font-weight: 400;
    color: #888899;
    font-size: 1.1rem;
    text-align: right;
}

.subscription-value .badge {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 20px !important;
    background: rgba(74, 74, 255, 0.2) !important;
    color: #4A4AFF !important;
    border: 1px solid rgba(74, 74, 255, 0.3) !important;
}

.subscription-value .badge.bg-success {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.subscription-value .badge.bg-primary {
    background: rgba(74, 74, 255, 0.2) !important;
    color: #4A4AFF !important;
    border-color: rgba(74, 74, 255, 0.3) !important;
}

.subscription-value .badge.bg-secondary {
    background: rgba(107, 114, 128, 0.2) !important;
    color: #6b7280 !important;
    border-color: rgba(107, 114, 128, 0.3) !important;
}

/* Enhanced subscription row styling */
.subscription-row .badge.rounded-pill {
    background: linear-gradient(135deg, #4A4AFF, #6B73FF) !important;
    color: white !important;
    border: 1px solid rgba(74, 74, 255, 0.3) !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
}

/* Settings modal buttons - match modern modal button styling exactly */
.settings-modal .btn {
    border-radius: 8px !important;
    padding: 0.375rem 0.75rem calc(0.375rem + 1px) 0.75rem !important;
    font-size: 1.1rem !important;
}

/* Add proper spacing between icons and text in all settings modal buttons */
.settings-modal .btn i {
    margin-right: 0.5rem !important;
}

/* Delete Account button styling - match subscription buttons but with danger colors */
.settings-modal .btn-outline-danger {
    background: transparent !important;
    color: #dc3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.settings-modal .btn-outline-danger:hover {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15) !important;
}

.settings-modal .btn-outline-danger:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.2) !important;
}



/* Language Grid */
.language-grid {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.language-grid .row {
    margin: 0;
}

.language-grid .col-md-6 {
    padding: 0 1rem;
}

.language-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.language-grid li {
    padding: 0.25rem 0;
    color: #888899;
    font-size: 0.9rem;
}

/* Usage Progress Bars */
.usage-progress-container {
    margin-bottom: 2rem;
}

.usage-progress-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #EAEAEA;
    margin-bottom: 1rem;
}

.usage-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
}

.usage-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.usage-progress-fill.success {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.usage-progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.usage-progress-fill.danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.usage-progress-fill.secondary {
    background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.usage-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888899;
}

/* Usage Alerts */
.usage-alert {
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.usage-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.usage-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.usage-alert-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.usage-alert-body {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Events Table */
.usage-events-table {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.usage-events-table .table {
    margin: 0;
    color: #EAEAEA;
}

.usage-events-table .table th {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #EAEAEA;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 1rem;
}

.usage-events-table .table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    font-size: 0.9rem;
}

.usage-events-table .table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Delete Account Card */
.delete-account-card {
    background: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 0rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.delete-account-card .settings-card-title {
    color: #dc3545;
    margin-bottom: 1rem;
}

.delete-account-card .settings-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.delete-account-card .delete-account-content {
    flex: 1;
    margin-bottom: 1.5rem;
}

.delete-account-card .delete-account-actions {
    margin-top: auto;
}

.delete-account-card p {
    margin-bottom: 0.75rem;
    color: #EAEAEA;
    font-size: 1.1rem;
    line-height: 1.4;
}

.delete-account-card ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.delete-account-card li {
    margin-bottom: 0.25rem;
    color: #EAEAEA;
    font-size: 1.1rem;
    line-height: 1.3;
}

/* Security Tab Enhancements */
.security-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.security-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #EAEAEA;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-strength-indicator {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.password-strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.password-strength-weak {
    background: #ef4444;
    width: 25%;
}

.password-strength-fair {
    background: #f59e0b;
    width: 50%;
}

.password-strength-good {
    background: #10b981;
    width: 75%;
}

.password-strength-strong {
    background: #059669;
    width: 100%;
}

/* Error Display */
.settings-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    color: #f87171;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Loading States */
.settings-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #888899;
}

.settings-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid #4A4AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-modal-header,
    .settings-modal-body,
    .settings-modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .settings-modal-title {
        font-size: 1.5rem;
    }
    
    .settings-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .subscription-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .subscription-value {
        text-align: left;
    }
    
    .settings-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .settings-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        margin-right: 0.25rem;
    }
    
    .settings-form-input,
    .settings-form-select {
        padding: 0.875rem 1rem;
    }
    
    .settings-card {
        padding: 1rem;
    }
}

/* Enhance the modal backdrop */
.modal-backdrop {
    background-color: rgba(11, 11, 16, 0.75);
    transition: opacity 0.15s linear;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 1;
}

/* Darker backdrop only for the intro onboarding modal */
.modal-backdrop.backdrop-intro-dark {
    background-color: rgba(11, 11, 16, 0.85) !important;
}

/* Add subtle animation for modal appearance */
.modal.fade .modal-dialog {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: scale(0.9) translateY(-20px);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0); 
}

/* Responsive adjustments for modern modals */
@media (max-width: 576px) {
    .modern-modal-header,
    .modern-modal-body,
    .modern-modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .modern-modal-title {
        font-size: 1.5rem;
    }
    
    .modern-textarea {
        min-height: 100px;
    }
}

/* Usage Tab Dynamic Content Styling */
#usage-content {
    max-height: none !important;
    overflow: visible !important;
}

/* Ensure Usage tab scrolls properly */
#usage-tab {
    overflow-y: auto !important;
    max-height: none !important;
    min-height: 0;
}

#usage-tab .settings-tab-content-inner {
    overflow-y: auto !important;
    max-height: none !important;
    min-height: 0;
}

/* Make sure the usage cards are scrollable */
#usage-tab .settings-card {
    overflow: visible !important;
    max-height: none !important;
}

/* Ensure the events table container is scrollable */
#events-container {
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
}

/* Enhanced events table scrolling */
#events-container .table {
    margin-bottom: 0 !important;
    overflow: visible !important;
}

/* Ensure table body scrolls properly */
#events-container tbody {
    overflow-y: auto !important;
}

/* Make sure table headers stay visible while scrolling */
#events-container .table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: rgba(26, 26, 35, 0.95) !important;
    backdrop-filter: blur(10px) !important;
}

/* Ensure the usage events table wrapper scrolls */
.usage-events-table {
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
}

/* Custom scrollbar for events table */
#events-container::-webkit-scrollbar,
.usage-events-table::-webkit-scrollbar {
    width: 8px;
}

#events-container::-webkit-scrollbar-track,
.usage-events-table::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#events-container::-webkit-scrollbar-thumb,
.usage-events-table::-webkit-scrollbar-thumb {
    background: rgba(74, 74, 255, 0.5);
    border-radius: 4px;
}

#events-container::-webkit-scrollbar-thumb:hover,
.usage-events-table::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 74, 255, 0.7);
}

#usage-content .card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 1.5rem !important;
    overflow: visible !important;
}

#usage-content .card:hover {
    border-color: rgba(74, 74, 255, 0.3) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#usage-content .card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1rem 1.5rem !important;
}

#usage-content .card-body {
    padding: 1.5rem !important;
}

#usage-content .progress {
    height: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
    overflow: hidden;
    margin-bottom: 0.75rem !important;
}

#usage-content .progress-bar {
    border-radius: 4px !important;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

#usage-content .progress-bar.bg-success {
    background: linear-gradient(90deg, #10b981, #34d399) !important;
}

#usage-content .progress-bar.bg-warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
}

#usage-content .progress-bar.bg-danger {
    background: linear-gradient(90deg, #ef4444, #f87171) !important;
}

#usage-content .progress-bar.bg-secondary {
    background: linear-gradient(90deg, #6b7280, #9ca3af) !important;
}

#usage-content .btn {
    padding: 0.375rem 0.75rem calc(0.375rem + 1px) 0.75rem !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 1.1rem !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
}

#usage-content .btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Add proper spacing between icons and text in usage content buttons */
#usage-content .btn i {
    margin-right: 0.5rem !important;
}

/* Ensure usage content buttons are properly centered like Account tab buttons */
#usage-content .btn {
    text-align: center !important;
    justify-content: center !important;
}

#usage-content .btn-primary {
    background: linear-gradient(135deg, #4A4AFF, #6B73FF) !important;
    color: white !important;
    border: 1px solid rgba(74, 74, 255, 0.3) !important;
}

#usage-content .btn-primary:hover {
    background: linear-gradient(135deg, #5A5AFF, #7B83FF) !important;
    color: white !important;
}

#usage-content .btn-outline-primary {
    background: transparent !important;
    color: #4A4AFF !important;
    border: 1px solid rgba(74, 74, 255, 0.3) !important;
}

#usage-content .btn-outline-primary:hover {
    background: rgba(74, 74, 255, 0.1) !important;
    color: #4A4AFF !important;
    border-color: rgba(74, 74, 255, 0.5) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(74, 74, 255, 0.15) !important;
}

#usage-content .btn-danger {
    background: rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
}

#usage-content .btn-danger:hover {
    background: rgba(220, 53, 69, 0.3) !important;
    color: #dc3545 !important;
}

#usage-content .btn-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

#usage-content .btn-warning:hover {
    background: rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
}

#usage-content .alert {
    border-radius: 12px !important;
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

#usage-content .alert-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
}

#usage-content .alert-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
}

#usage-content .table {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin: 0 !important;
    color: #EAEAEA !important;
}

#usage-content .table th {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #EAEAEA !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    padding: 1rem !important;
}

#usage-content .table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1rem !important;
    font-size: 0.9rem !important;
}

#usage-content .table tr:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

#usage-content .badge {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 20px !important;
    background: rgba(74, 74, 255, 0.2) !important;
    color: #4A4AFF !important;
    border: 1px solid rgba(74, 74, 255, 0.3) !important;
}

#usage-content h6 {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #EAEAEA !important;
    margin-bottom: 1rem !important;
}

#usage-content .text-muted {
    color: #888899 !important;
}

#usage-content .spinner-border {
    width: 1rem !important;
    height: 1rem !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 2px solid #4A4AFF !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

/* Events Table Specific Styling */
#events-container {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}

#events-container .table {
    border: none !important;
    margin: 0 !important;
}

#events-load-more {
    background: rgba(255, 255, 255, 0.03) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1rem !important;
    text-align: center !important;
}

/* Responsive Design for Usage Tab */
@media (max-width: 768px) {
    #usage-content .card {
        margin-bottom: 1rem !important;
    }
    
    #usage-content .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    
    #usage-content .table {
        font-size: 0.8rem !important;
    }
    
    #usage-content .table th,
    #usage-content .table td {
        padding: 0.75rem 0.5rem !important;
    }
}

/* Fix Usage Tab Scrolling Issues */
.settings-tab-content {
    height: 100%;
    overflow-y: auto !important;
    min-height: 0;
}

.settings-tab-pane {
    height: 100%;
    overflow-y: auto !important;
    min-height: 0;
}

/* Specific fix for usage tab scrolling */
#usage-tab {
    height: 100% !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

#usage-tab .settings-tab-content-inner {
    height: auto !important;
    overflow-y: visible !important;
    min-height: 0 !important;
}

/* Ensure modal body can scroll when content exceeds height */
.modal-body {
    overflow-y: auto !important;
    min-height: 0 !important;
}

/* Force scroll behavior on the main modal content */
.settings-modal .modal-body {
    overflow-y: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

/* Ensure tab content allows scrolling */
.settings-modal .tab-content {
    height: 100% !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

/* Make sure all tab panes can scroll */
.settings-modal .tab-pane {
    height: 100% !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

/* Ensure the settings modal body scrolls properly */
.settings-modal-body {
    overflow-y: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 200px) !important;
}

/* Bootstrap buttons in modern modals - match header button styling exactly */
.modern-modal .btn {
    border-radius: 8px !important;
/*    padding: 0.375rem 0.75rem calc(0.375rem + 1px) 0.75rem !important; */
    font-size: 1.1rem !important;
}

/* CSP-compliant utility classes for cardChat.js and chat/history.js */

/* Button state classes */
.chat-button-disabled {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.chat-button-enabled {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Alert animation classes */
.alert-slide-out {
    opacity: 0 !important;
    transform: translateX(100%) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.alert-slide-in {
    opacity: 1 !important;
    transform: translateX(0) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.alert-hidden {
    display: none !important;
}

.alert-visible {
    display: block !important;
}

/* Toast styling classes */
.toast-container-fixed {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 1050 !important;
}

.toast-styled {
    min-width: 300px !important;
    background-color: #fff !important;
    border: 1px solid rgba(0,0,0,.1) !important;
    border-radius: .25rem !important;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,.1) !important;
    opacity: 1 !important;
}

.toast-fade-out {
    opacity: 0 !important;
    transition: opacity 0.5s ease !important;
}

.toast-hidden {
    display: none !important;
}

/* Image preview container classes */
.image-preview-hidden {
    display: none !important;
}

.image-preview-visible {
    display: flex !important;
}

.image-preview-auto-height {
    height: auto !important;
}

.image-preview-margin {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

/* Thumbnail container classes */
.thumbnail-inline-flex {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.thumbnail-hidden {
    display: none !important;
}

.thumbnail-visible {
    display: block !important;
}

.thumbnail-clickable {
    cursor: pointer !important;
}

/* Document preview classes */
.document-preview-visible {
    display: flex !important;
}

.document-preview-hidden {
    display: none !important;
}

/* Spacer height utility classes */
.spacer-height-custom {
    /* Height will be set via data attribute and CSS custom properties */
}

.spacer-height-custom[data-height] {
    height: calc(var(--spacer-height) * 1px) !important;
}

/* Debug alert positioning classes */
.debug-alert-fixed {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    top: auto !important;
    z-index: 2000 !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    border-left: 4px solid var(--bs-success) !important;
}

.debug-alert-summary {
    position: fixed !important;
    bottom: 20px !important;
    right: 250px !important;
    left: auto !important;
    top: auto !important;
    z-index: 1999 !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    min-width: 300px !important;
    border-left: 4px solid var(--bs-info) !important;
}

/* Text area positioning classes */
.textarea-offscreen {
    position: fixed !important;
    left: -999999px !important;
    top: -999999px !important;
}

/* Modal display classes */
.modal-flex {
    display: flex !important;
}

.modal-none {
    display: none !important;
}

/* Message container classes */
.message-container-margin {
    margin-top: 1rem !important;
}

/* Status line classes */
.status-line-warning {
    color: #ffc107 !important;
    font-weight: bold !important;
}

.status-line-hidden {
    display: none !important;
}

.indicator-visible {
    display: block !important;
}

.indicator-hidden {
    display: none !important;
}

/* Deep research toggle classes */
.deep-research-toggle-disabled {
    background-color: #343a40 !important;
    border-color: #6c757d !important;
}

/* MindSpark header styling for chat messages */
.mindspark-header {
    background-color: rgba(255, 255, 255, 0.03) !important;
    padding: 15px !important;
    border-radius: 8px !important;
}

/* Load more button styling */
.load-more-button-loading {
    position: relative !important;
    overflow: hidden !important;
}

/* Chat messages visibility */
.chat-messages-visible {
    visibility: visible !important;
}

/* Utility classes for common patterns */
.opacity-0 {
    opacity: 0 !important;
}

.opacity-1 {
    opacity: 1 !important;
}

.translate-x-0 {
    transform: translateX(0) !important;
}

.translate-x-100 {
    transform: translateX(100%) !important;
}

.transition-opacity-transform {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

/* Helper classes for dynamic height setting */
.dynamic-height[data-height] {
    height: calc(var(--dynamic-height) * 1px) !important;
}

/* Helper classes for visibility states */
.visibility-visible {
    visibility: visible !important;
}

.visibility-hidden {
    visibility: hidden !important;
}

/* Helper classes for display states */
.display-flex {
    display: flex !important;
}

.display-block {
    display: block !important;
}

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

.display-inline-flex {
    display: inline-flex !important;
}

/* Helper classes for positioning */
.position-relative {
    position: relative !important;
}

.position-fixed {
    position: fixed !important;
}

.position-absolute {
    position: absolute !important;
}

/* Helper classes for z-index */
.z-index-1050 {
    z-index: 1050 !important;
}

.z-index-1999 {
    z-index: 1999 !important;
}

.z-index-2000 {
    z-index: 2000 !important;
}

/* Helper classes for overflow */
.overflow-hidden {
    overflow: hidden !important;
}

.overflow-y-auto {
    overflow-y: auto !important;
}

/* Helper classes for borders */
.border-left-success {
    border-left: 4px solid var(--bs-success) !important;
}

.border-left-info {
    border-left: 4px solid var(--bs-info) !important;
}

.border-left-danger {
    border-left: 4px solid var(--bs-danger) !important;
}

/* Helper classes for cursor */
.cursor-pointer {
    cursor: pointer !important;
}

.cursor-default {
    cursor: default !important;
}

/* Helper classes for pointer events */
.pointer-events-auto {
    pointer-events: auto !important;
}

.pointer-events-none {
    pointer-events: none !important;
}

/* Helper classes for margins and padding */
.margin-top-15 {
    margin-top: 15px !important;
}

.margin-bottom-15 {
    margin-bottom: 15px !important;
}

.padding-15 {
    padding: 15px !important;
}

/* Helper classes for alignment */
.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* Helper classes for font styling */
.font-weight-bold {
    font-weight: bold !important;
}

.color-warning {
    color: #ffc107 !important;
}

/* Helper classes for background colors */
.bg-transparent {
    background-color: transparent !important;
}

.bg-white {
    background-color: #fff !important;
}

.bg-rgba-white-003 {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Helper classes for border radius */
.border-radius-8 {
    border-radius: 8px !important;
}

.border-radius-quarter {
    border-radius: .25rem !important;
}

/* Helper classes for box shadow */
.box-shadow-toast {
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,.1) !important;
}

/* Helper classes for min/max width */
.min-width-300 {
    min-width: 300px !important;
}

.max-height-70vh {
    max-height: 70vh !important;
}

/* Helper classes for positioning values */
.bottom-20 {
    bottom: 20px !important;
}

.right-20 {
    right: 20px !important;
}

.right-250 {
    right: 250px !important;
}

.left-auto {
    left: auto !important;
}

.top-auto {
    top: auto !important;
}

.left-negative-999999 {
    left: -999999px !important;
}

.top-negative-999999 {
    top: -999999px !important;
}

/* Helper classes for transitions */
.transition-opacity-05s {
    transition: opacity 0.5s ease !important;
}

.transition-opacity-transform-03s {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

/* Helper classes for height auto */
.height-auto {
    height: auto !important;
}

/* Helper classes for borders */
.border-1-rgba-black-01 {
    border: 1px solid rgba(0,0,0,.1) !important;
}

/* Animation keyframes are already defined in the CSS, so we can reference them */
@keyframes loadingGradient {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-gradient-animation {
    height: 100% !important;
    width: 100% !important;
    background: linear-gradient(90deg, transparent, #9747FF, transparent) !important;
    background-size: 200% 100% !important;
    animation: loadingGradient 1.5s ease infinite !important;
}

.loading-gradient-container {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    overflow: hidden !important;
}

/* Spacer height utility classes */
.spacer-height-small {
    height: 250px !important;
}

.spacer-height-medium {
    height: 500px !important;
}

.spacer-height-large {
    height: 800px !important;
}

/* Container height utility with CSS custom properties */
.container-dynamic-height {
    height: var(--container-height, 0px) !important;
}

/* Ensure we don't break existing styles */
.chat-message.mindspark-header .message-header {
    margin-bottom: 10px;
}

.chat-message.mindspark-header .assistant-response {
    background-color: transparent !important;
}

.chat-message.mindspark-header .final-summary {
    background-color: rgba(80, 80, 80, 0.05) !important;
    padding: 12px !important;
    border-radius: 6px !important;
    margin-top: 10px !important;
}

.chat-message.mindspark-header .message-header .assistant-name i {
    color: #ffc107 !important;
    font-size: 0.9rem !important;
    margin-right: 4px !important;
}

/* End of CSP-compliant utility classes */

/* Loading span styling */
.loading-span-relative {
    position: relative !important;
    z-index: 1 !important;
}

/* Modal header context styling */
.context-path {
    font-size: 1rem !important;
    color: #adb5bd !important;
}

.context-title {
    font-size: 1.2rem !important;
    color: white !important;
    font-weight: 500 !important;
}

/* Loading state styling */
.chat-loading-container {
    min-height: 200px !important;
}

.chat-loading-progress-bar {
    top: 0.5rem !important;
}

/* CSP-compliant utility classes for streamTest.js */

/* Progress bar styling for board chat */
.board-progress-bar {
    height: 2px !important;
    border-radius: 0 !important;
}

.board-progress-bar-fill {
    width: 100% !important;
    background: linear-gradient(90deg, transparent, var(--bs-primary), transparent) !important;
}

/* Greeting spinner styling */
.board-greeting-spinner {
    min-height: 70px !important;
}

.board-gradient-progress-bar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent 0%, var(--bs-primary) 50%, transparent 100%) !important;
    background-size: 200% 100% !important;
    opacity: 0.8 !important;
    box-shadow: 0 0 8px rgba(var(--bs-primary-rgb), 0.3) !important;
    z-index: 1000 !important;
    animation: moveGradient 1.5s ease-in-out infinite alternate !important;
}

.board-greeting-content {
    padding-top: 15px !important;
}

/* Loading button styling */
.board-loading-button {
    position: relative !important;
    overflow: hidden !important;
}

.board-loading-span {
    position: relative !important;
    z-index: 1 !important;
}

.board-loading-progress {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    overflow: hidden !important;
}

.board-loading-progress-fill {
    height: 100% !important;
    width: 100% !important;
    background: linear-gradient(90deg, transparent, #9747FF, transparent) !important;
    background-size: 200% 100% !important;
    animation: loadingGradient 1.5s ease infinite !important;
}

/* Spacer height management */
.board-spacer-dynamic {
    transition: height 0.3s ease !important;
    flex-shrink: 0 !important;
}

/* Dynamic height using CSS custom properties */
.board-spacer-dynamic[data-height] {
    height: var(--dynamic-height) !important;
}

/* Loader bar styling */
.board-loader-bar {
    transition: opacity 0.5s ease !important;
}

.board-loader-hidden {
    opacity: 0 !important;
}

.board-loader-visible {
    opacity: 1 !important;
}

/* Alert styling for board chat */
.board-alert-visible {
    opacity: 1 !important;
    transform: translateX(0) !important;
    display: block !important;
}

.board-alert-hidden {
    opacity: 0 !important;
    transform: translateX(100%) !important;
}

.board-alert-slide-out {
    opacity: 0 !important;
    transform: translateX(100%) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.board-alert-display-none {
    display: none !important;
}

/* Button state management */
.board-button-loading {
    position: relative !important;
    overflow: hidden !important;
}

.board-button-normal {
    position: static !important;
    overflow: visible !important;
}

/* Text area positioning */
.board-textarea-offscreen {
    position: fixed !important;
    left: -999999px !important;
    top: -999999px !important;
}

/* Card reference styling */
.board-card-reference {
    background-color: var(--bs-primary) !important;
    color: white !important;
    font-weight: bold !important;
    text-decoration: none !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    display: inline-block !important;
    margin: 0 2px !important;
}

/* Streaming content styling */
.board-streaming-content {
    opacity: 0.9 !important;
}

/* Animation keyframes for board chat */
@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Utility classes for dynamic heights */
.board-height-90vh {
    height: 90vh !important;
}

.board-height-80vh {
    height: 80vh !important;
}

.board-min-height-500 {
    min-height: 500px !important;
}

.board-min-height-400 {
    min-height: 400px !important;
}

/* Progress bar variations */
.board-progress-1px {
    height: 1px !important;
    border-radius: 0 !important;
}

/* Print styling */
.board-print-text {
    font-size: 0.9em !important;
    color: #666 !important;
}

/* End of CSP-compliant utility classes for streamTest.js */

/* CSP-compliant utility classes for quickAIBoardPro.js */

/* Pro board progress bar styling */
.pro-board-progress-bar {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4A4AFF, #9747FF, #4A4AFF);
    background-size: 200% 100%;
    animation: moveGradient 2s ease-in-out infinite;
    border-radius: 2px;
    margin: 20px 0;
}

/* Gradient animation keyframes */
@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Board loading placeholder */
.board-loading-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin: 20px;
}

/* End of CSP-compliant utility classes for quickAIBoardPro.js */

/* Board operations progress bar styling */
.board-operations-progress-bar {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4A4AFF, #9747FF, #4A4AFF);
    background-size: 200% 100%;
    animation: moveGradient 2s ease-in-out infinite;
    border-radius: 2px;
    margin: 20px 0;
    position: relative;
}

/* Board operations initial loading progress bar - positioned absolutely at top */
.board-operations-initial-progress-bar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 2px !important;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        var(--bs-primary) 50%, 
        transparent 100%
    ) !important;
    background-size: 200% 100% !important;
    opacity: 0.8 !important;
    box-shadow: 0 0 8px rgba(var(--bs-primary-rgb), 0.3) !important;
    z-index: 1000 !important;
    animation: moveGradient 1.5s ease-in-out infinite alternate !important;
}

/* Note: moveGradient keyframes are already defined above for quickAIBoardPro.js */

/* End of CSP-compliant utility classes for boardOperations.js */

/* CSP-compliant utility classes for cardChat.js */

/* Deep Research lightning icon styling */
.deep-research-lightning-icon {
    color: #ffc107 !important;
    font-size: 0.9rem !important;
    margin-right: 4px !important;
}

/* MindSpark Research assistant response styling */
.mindspark-assistant-response {
    background-color: transparent !important;
}

/* MindSpark Research final summary styling */
.mindspark-final-summary {
    background-color: rgba(0, 0, 0, 0.8) !important;
    padding: 12px !important;
    border-radius: 6px !important;
    margin-top: 10px !important;
}

/* Deep Research agent update styling */
.agent-update {
    padding: 12px 16px !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.08), rgba(255, 193, 7, 0.03)) !important;
    border: 1px solid rgba(255, 193, 7, 0.15) !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    font-size: 0.95em !important;
    transition: all 0.4s ease !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Limit image sizes in agent updates */
.agent-update img {
    max-width: 200px !important;
    max-height: 200px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    margin: 8px 0 !important;
}

.agent-update::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 2px !important;
    background: linear-gradient(90deg, #ffc107, #ff8c00, #ffc107) !important;
    background-size: 200% 100% !important;
    animation: shimmer 2s ease-in-out infinite !important;
}

.agent-update strong {
    color: rgba(255, 193, 7, 1) !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.agent-update:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.12), rgba(255, 193, 7, 0.06)) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.2) !important;
}

/* Agent-specific icons and colors - DISABLED to show clean content only */
/*
.agent-update[data-agent="research_assistant"] strong::before {
    content: '🔍' !important;
    animation: pulse-research 2s ease-in-out infinite !important;
}

.agent-update[data-agent="fact_checker"] strong::before {
    content: '✓' !important;
    animation: pulse-check 2s ease-in-out infinite !important;
}

.agent-update[data-agent="verifier"] strong::before {
    content: '🔧' !important;
    animation: pulse-verify 2s ease-in-out infinite !important;
}

.agent-update[data-agent="final_summary"] strong::before {
    content: '💡' !important;
    animation: pulse-summary 2s ease-in-out infinite !important;
}
*/

/* Enhanced typing dots for research mode */
.research-typing-dots {
    display: inline-flex !important;
    gap: 4px !important;
    align-items: center !important;
    margin-left: 8px !important;
}

.research-typing-dots span {
    width: 8px !important;
    height: 8px !important;
    background: linear-gradient(45deg, #ffc107, #ff8c00) !important;
    border-radius: 50% !important;
    animation: research-typing 1.4s infinite ease-in-out !important;
    box-shadow: 0 0 4px rgba(255, 193, 7, 0.3) !important;
}

.research-typing-dots span:nth-child(1) { animation-delay: 0.1s !important; }
.research-typing-dots span:nth-child(2) { animation-delay: 0.2s !important; }
.research-typing-dots span:nth-child(3) { animation-delay: 0.3s !important; }

/* Progress indicator for research stages */
.research-progress-indicator {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, transparent, #ffc107, transparent) !important;
    background-size: 200% 100% !important;
    animation: progress-sweep 3s ease-in-out infinite !important;
    border-radius: 0 0 12px 12px !important;
}

/* Enhanced streaming indicator container */
.streaming-indicator-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 16px !important;
    margin: 10px 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.streaming-indicator-container::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.1), transparent) !important;
    animation: sweep-light 2s ease-in-out infinite !important;
}

/* Enhanced thinking pill */
.thinking-pill {
    display: flex !important;
    align-items: center !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.05)) !important;
    border: 1px solid rgba(255, 193, 7, 0.2) !important;
    border-radius: 25px !important;
    padding: 12px 20px !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    position: relative !important;
    overflow: hidden !important;
}

.thinking-pill::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent) !important;
    animation: pill-shine 3s ease-in-out infinite !important;
}

.thinking-text {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: rgba(255, 193, 7, 0.95) !important;
    margin-right: 12px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Deep Research status line enhancements */
.deep-research-status-line {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 24px 16px 16px 16px !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), rgba(255, 193, 7, 0.02)) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 193, 7, 0.1) !important;
    margin: 10px 0 !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 48px !important;
}

/* Limit image sizes in research status updates */
.deep-research-status-line img {
    max-width: 200px !important;
    max-height: 200px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.deep-research-status-line::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 2px !important;
    background: linear-gradient(90deg, #ffc107, #ff8c00, #ffc107) !important;
    background-size: 200% 100% !important;
    animation: shimmer 2s ease-in-out infinite !important;
}

/* Research completion indicator */
.research-complete-indicator {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 24px 16px 16px 16px !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), rgba(255, 193, 7, 0.02)) !important;
    border: 1px solid rgba(255, 193, 7, 0.1) !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    margin: 10px 0 !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 48px !important;
}

.research-complete-indicator::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 2px !important;
    background: linear-gradient(90deg, #ffc107, #ff8c00, #ffc107) !important;
    background-size: 200% 100% !important;
    animation: shimmer 2s ease-in-out infinite !important;
}

/* Keyframe animations */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes research-typing {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
    50% { transform: translateY(-8px) scale(1.2); opacity: 1; }
}

@keyframes progress-sweep {
    0% { width: 0%; left: 0%; }
    50% { width: 100%; left: 0%; }
    100% { width: 0%; left: 100%; }
}

@keyframes sweep-light {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pill-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse-research {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.2); }
}

@keyframes pulse-check {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

@keyframes pulse-verify {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(15deg); }
}

@keyframes pulse-summary {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.2); filter: brightness(1.3); }
}

@keyframes completion-glow {
    0% { box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2); }
    100% { box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4); }
}

@keyframes bounce-check {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* Error alert styling for Deep Research */
.deep-research-error-alert {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* Deep Research error icon styling */
.deep-research-error-icon {
    color: #ffc107 !important;
}

/* Connection test results styling */
.connection-test-results {
    display: none !important;
}

.connection-test-results-visible {
    display: block !important;
}

/* End of CSP-compliant utility classes for cardChat.js */

/* CSP-compliant utility classes for learner and pro onboarding */

/* Subtle animations for onboarding */
.subtle-attention {
    animation: subtle-pulse 1.5s ease-in-out !important;
}

@keyframes subtle-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.fade-in {
    opacity: 0 !important;
    transition: opacity 0.3s ease-in-out !important;
}

.welcome-icon {
    font-size: 3.5rem !important;
    color: var(--bs-primary) !important;
    margin-bottom: 1rem !important;
    display: block !important;
    animation: welcome-float 3s ease-in-out infinite !important;
}

@keyframes welcome-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.step-preview {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    margin-bottom: 0.75rem !important;
    border-left: 3px solid var(--bs-primary) !important;
    transition: all 0.3s ease !important;
}

.step-preview:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateX(5px) !important;
}

.step-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    background: var(--bs-primary) !important;
    color: white !important;
    border-radius: 50% !important;
    font-weight: bold !important;
    font-size: 0.9rem !important;
    margin-right: 0.75rem !important;
}

/* End of CSP-compliant utility classes for learner and pro onboarding */

/* Modern Alert Styling Base */
.modern-alert {
    background: rgba(26, 26, 35, 0.95) !important;
    border-radius: 12px !important;
    color: #EAEAEA !important;
    padding: 1rem 1.25rem !important;
    margin: 1rem 0 !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    display: flex !important;
    align-items: center !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    border-width: 2px !important;
    border-style: solid !important;
}

.modern-alert:hover {
    transform: translateY(-1px) !important;
}

.modern-alert i {
    margin-right: 0.75rem !important;
    font-size: 1.1rem !important;
}

/* Modern Error Alert (Red) */
.modern-alert-error {
    border-color: #dc3545 !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15) !important;
}

.modern-alert-error:hover {
    border-color: rgba(220, 53, 69, 0.8) !important;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.2) !important;
}

.modern-alert-error i {
    color: #dc3545 !important;
}

/* Modern Warning Alert (Yellow/Orange) */
.modern-alert-warning {
    border-color: #ffc107 !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15) !important;
}

.modern-alert-warning:hover {
    border-color: rgba(255, 193, 7, 0.8) !important;
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.2) !important;
}

.modern-alert-warning i {
    color: #ffc107 !important;
}

/* Modern Success Alert (Green) */
.modern-alert-success {
    border-color: #198754 !important;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.15) !important;
}

.modern-alert-success:hover {
    border-color: rgba(25, 135, 84, 0.8) !important;
    box-shadow: 0 6px 16px rgba(25, 135, 84, 0.2) !important;
}

.modern-alert-success i {
    color: #198754 !important;
}

/* Modern Info Alert (Blue) */
.modern-alert-info {
    border-color: #0dcaf0 !important;
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.15) !important;
}

.modern-alert-info:hover {
    border-color: rgba(13, 202, 240, 0.8) !important;
    box-shadow: 0 6px 16px rgba(13, 202, 240, 0.2) !important;
}

.modern-alert-info i {
    color: #0dcaf0 !important;
}

/* Legacy class for backward compatibility */
.modern-error-alert {
    background: rgba(26, 26, 35, 0.95) !important;
    border: 2px solid #dc3545 !important;
    border-radius: 12px !important;
    color: #EAEAEA !important;
    padding: 1rem 1.25rem !important;
    margin: 1rem 0 !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.modern-error-alert:hover {
    border-color: rgba(220, 53, 69, 0.8) !important;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.2) !important;
    transform: translateY(-1px) !important;
}

.modern-error-alert i {
    color: #dc3545 !important;
    margin-right: 0.75rem !important;
    font-size: 1.1rem !important;
}

/* Restore important styles that were removed */
.final-summary {
    background-color: rgba(80, 80, 80, 0.05) !important;
    padding: 12px !important;
    border-radius: 6px !important;
    margin-top: 10px !important; /* Add space before summary */
}

/* Limit image sizes in final summaries */
.final-summary img {
    max-width: 200px !important;
    max-height: 200px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    margin: 8px 0 !important;
}

/* Add spacing after summary header */
.summary-header {
    margin-bottom: 16px !important;
}

/* Enhanced heading spacing for dynamically generated content */
.final-summary h1,
.mindspark-final-summary h1,
.final-summary.mindspark-final-summary h1,
.chat-message .final-summary h1,
.assistant-message .final-summary h1 {
    margin-bottom: 16px !important;
    margin-top: 0px !important;
}

.final-summary h2,
.mindspark-final-summary h2,
.final-summary.mindspark-final-summary h2,
.chat-message .final-summary h2,
.assistant-message .final-summary h2,
.assistant-response h2,
.assistant-message h2 {
    margin-top: 20px !important;
    margin-bottom: 12px !important;
}

/* Broader fallback for dynamically inserted markdown content */
.chat-message h1,
.assistant-message h1 {
    margin-bottom: 16px !important;
    margin-top: 20px !important;
}

.chat-message h2,
.assistant-message h2 {
    margin-top: 20px !important;
    margin-bottom: 12px !important;
}

/* Real-time MindSpark messages - override general assistant-message styling */
.chat-message.assistant-message.deep-research-assistant-message.mindspark-header,
.assistant-message.deep-research-assistant-message.mindspark-header,
.deep-research-assistant-message.mindspark-header,
.chat-message.assistant-message.deep-research-assistant-message,
.assistant-message.deep-research-assistant-message {
    background-color: var(--bs-dark-text-emphasis) !important;
    padding: 15px !important;
    border-radius: 8px !important;
}

/* ========================================
   Onboarding Modal Styles
   ======================================== */

/* Progress bar styling */
.onboarding-progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.onboarding-progress-initial {
    width: 33.33%;
}

/* Welcome icon styling - Make it large and bold */
.onboarding-welcome-icon {
    font-size: 4rem;  /* Reduced from 5rem for better fit */
    font-weight: 700; /* Make it bold */
}

/* Step preview container styling */
.onboarding-step-preview {
    background: rgba(74, 74, 255, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--bs-primary);
    padding: 0.75rem 1rem !important;  /* Reduced padding */
}

/* Step number circle styling */
.onboarding-step-number {
    width: 36px;  /* Reduced from 40px */
    height: 36px; /* Reduced from 40px */
    background: rgba(74, 74, 255, 0.2);
    border-radius: 50%;
    font-weight: 600;
    font-size: 1rem; /* Slightly smaller */
}

/* Override settings-card styles for onboarding modal to match tab font size */
#proOnboardingModal .settings-card-title,
#learnerOnboardingModal .settings-card-title {
    font-size: 1.3rem;  /* Reduced from 1.5rem */
    font-weight: 600;
    color: #EAEAEA;
    margin: 0;
}

#proOnboardingModal .settings-card-subtitle,
#learnerOnboardingModal .settings-card-subtitle {
    font-size: 1rem;  /* Reduced from 1.1rem */
    color: #888899;
    margin: 0.25rem 0 0 0;  /* Reduced margin */
}

/* Step preview text styling */
#proOnboardingModal .onboarding-step-preview h6,
#learnerOnboardingModal .onboarding-step-preview h6 {
    font-size: 1.1rem;  /* Match tab font size */
    font-weight: 500;
}

#proOnboardingModal .onboarding-step-preview small,
#learnerOnboardingModal .onboarding-step-preview small {
    font-size: 0.95rem;  /* Slightly smaller for secondary text */
}

/* Clock icon text */
#proOnboardingModal .text-center .small,
#learnerOnboardingModal .text-center .small {
    font-size: 1rem !important;  /* Make timing text more readable */
}

/* Loading progress bar styling */
.onboarding-loading-progress {
    height: 40px;
}

/* Additional spacing adjustments for better fit */
#proOnboardingModal .settings-card-header,
#learnerOnboardingModal .settings-card-header {
    padding-bottom: 0.75rem !important;  /* Reduced padding */
}

#proOnboardingModal .settings-card-body,
#learnerOnboardingModal .settings-card-body {
    padding-top: 0.75rem !important;  /* Add some top padding */
}

/* Reduce icon margins */
#proOnboardingModal .onboarding-welcome-icon,
#learnerOnboardingModal .onboarding-welcome-icon {
    margin-bottom: 1.5rem !important;  /* Reduced from default 3rem */
}

/* Adjust step preview margins */
#proOnboardingModal .onboarding-step-preview,
#learnerOnboardingModal .onboarding-step-preview {
    margin-bottom: 0.75rem !important;  /* Reduced margin */
}

#proOnboardingModal .onboarding-step-preview:last-of-type,
#learnerOnboardingModal .onboarding-step-preview:last-of-type {
    margin-bottom: 1rem !important;  /* Slightly more margin for last item */
}

/* Public Profile Avatar Section */
.profile-picture-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.profile-avatar-preview {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg-secondary, #3a3a3a) !important;
    flex-shrink: 0 !important;
}

.profile-avatar-preview .avatar-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.profile-avatar-preview .avatar-fallback {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 1.5rem !important;
}

.profile-picture-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-picture-controls .btn {
    align-self: flex-start;
}

.profile-picture-controls .settings-form-hint {
    margin: 0;
}

/* Character count styling */
#bio-char-count {
    font-weight: 500;
}

/* Username feedback styling */
#username-feedback {
    transition: color 0.2s ease;
}

#username-feedback.text-success {
    color: #28a745 !important;
}

#username-feedback.text-danger {
    color: #dc3545 !important;
}

#username-feedback.text-warning {
    color: #ffc107 !important;
}

/* Input group styling for username */
.profile-tab .input-group-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888899;
    border-right: none;
}

.profile-tab .input-group .settings-form-input {
    border-left: none;
}

.profile-tab .input-group .settings-form-input:focus {
    border-left: none;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Form check styling for public profile */
.settings-form-check-subtitle {
    display: block;
    font-size: 0.8rem;
    color: #888899;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile-picture-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-picture-controls {
        align-items: center;
    }
    
    .profile-picture-controls .btn {
        align-self: center;
    }
}
