.chat-utils{
    border-radius: 10px !important;
}
.chat-toolbar-wrapper {
                max-width: 100%;
                min-width: 45vw;
                padding: 5px 15px;
                background:rgba(252, 250, 255, 0.82) !important;
                border-radius: 20px !important;
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
                backdrop-filter: blur(5px);
                border: 1px solid rgba(137, 83, 253, 0.2);
                min-height: 60px;
                transition: all 0.3s ease;
            }
            @media screen and (max-width: 768px) {
                .chat-toolbar-wrapper {
                    min-width: 100%;
                    padding-left: 5px !important;
                    padding-right: 5px !important;
                    margin-left: 0;
                    margin-right: 0;
                }
                .toolbar-scroll-container {
                    padding-left: 0 !important;
                    padding-right: 0 !important;
                    margin-left: 0 !important;
                    margin-right: 0 !important;
                    justify-content: flex-start;
                    scroll-snap-type: x mandatory;
                }
                .toolbar-btn {
                    scroll-snap-align: start;
                    min-width: 120px;
                    flex-shrink: 0;
                }
            }
            .chat-toolbar-container {
                width: 100%;
                overflow: hidden;
                position: relative;
            }
            
            .chat-toolbar {
                display: flex;
                align-items: center;
                padding: 0;
                min-height: 50px;
            }
            
.toolbar-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 5px 10px;
    gap: 8px;
    justify-content: flex-start;
    scroll-padding-left: 10px;
    scroll-padding-right: 10px;
    scroll-behavior: smooth;
    position: relative;
}
            
            .toolbar-scroll-container::-webkit-scrollbar {
                display: none;
            }
            
            .toolbar-btn {
                flex: 0 0 auto;
                display: flex !important;
                min-width: 110px;
                width: auto;
                height: 48px;
                display: flex;
                justify-content: center;
                align-items: center;
                border-radius: 0.25em;
                background: rgba(110, 32, 244, 0.1);
                color: #6E20F4;
                border: none;
                font-size: 20px;
                transition: all 0.3s ease;
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
                cursor: pointer;
                padding: 0 12px;
                white-space: nowrap;
            }
            
            .toolbar-btn:hover, .toolbar-btn.active {
                background: rgba(110, 32, 244, 0.2);
                transform: translateY(-3px);
                box-shadow: 0 6px 12px rgba(110, 32, 244, 0.15);
            }
            .tool-label {
            font-size: 12px;
            margin-left: 5px;
            min-width: 60px;
            display: flex;
            justify-content: center;
            align-items: center;
            }
            /* Content views */
            .toolbar-content-view {
                width: 100%;
                display: flex;
                align-items: center;
                gap: 10px;
            }
            .spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
            .toolbar-back-btn {
                background: transparent;
                box-shadow: none !important;
                border: none;
                color: #6E20F4;
                font-size: 18px;
                cursor: pointer;
                width: 48px;
                height: 48px;
                min-width: 48px;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 50%;
                transition: all 0.3s ease;
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
            }
            
            .toolbar-back-btn:hover {
                transform: translateY(-3px);
                box-shadow: none;
            }
            
            .toolbar-title {
                font-weight: 500;
                color: #6E20F4;
                margin-right: 10px;
                white-space: nowrap;
            }
            
            /* Emoji styles */
            .emoji-scroll-container {
                display: flex;
                flex-wrap: nowrap;
                overflow-x: auto;
                gap: 10px;
                scrollbar-width: none;
                -webkit-overflow-scrolling: touch;
                flex-grow: 1;
                padding: 0 5px;
            }
            
            .emoji-scroll-container::-webkit-scrollbar {
                display: none;
            }
            
            .emoji-btn {
                flex: 0 0 auto;
                width: 40px;
                height: 40px;
                font-size: 20px;
                background: #f5f5f5;
                border: none;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                transition: transform 0.2s;
            }
            
            .emoji-btn:hover {
                transform: scale(1.2);
                background: #e9e9e9;
            }
            
            /* Translation styles */
            .translation-scroll-container {
                display: flex;
                flex-wrap: nowrap;
                overflow-x: auto;
                gap: 10px;
                scrollbar-width: none;
                -webkit-overflow-scrolling: touch;
                flex-grow: 1;
                padding: 0 5px;
            }
            
            .translation-scroll-container::-webkit-scrollbar {
                display: none;
            }
            
            .translation-btn {
                flex: 0 0 auto;
                padding: 8px 15px;
                background: #f5f5f5;
                border: none;
                border-radius: 50px;
                font-size: 14px;
                transition: all 0.2s;
                white-space: nowrap;
            }
            
            .translation-btn:hover, .translation-btn.active {
                background: rgba(110, 32, 244, 0.1);
                color: #6E20F4;
            }
            
            /* Suggestions styles */
            .suggestions-scroll-container {
                display: flex;
                flex-wrap: nowrap;
                overflow-x: auto;
                gap: 10px;
                scrollbar-width: none;
                -webkit-overflow-scrolling: touch;
                flex-grow: 1;
                padding: 0 5px;
            }
            
            .suggestions-scroll-container::-webkit-scrollbar {
                display: none;
            }
            
            /* Settings Modal Styles */
.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.settings-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 100vw;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(137, 83, 253, 0.1);
}

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

.settings-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid rgba(137, 83, 253, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #6E20F4;
    margin: 0;
}

.settings-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.settings-close-btn:hover {
    background: rgba(110, 32, 244, 0.1);
    color: #6E20F4;
}

.settings-modal-body {
    padding: 20px 30px;
    flex: 1;
    overflow-y: auto;
}

.settings-quick-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.settings-quick-nav-btn {
    border: 1px solid rgba(110, 32, 244, 0.15);
    border-radius: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(110, 32, 244, 0.05) 0%, rgba(139, 76, 248, 0.08) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #5a2ccf;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-quick-nav-btn i {
    font-size: 20px;
}

.settings-quick-nav-btn span {
    line-height: 1.2;
}

.settings-quick-nav-btn:hover,
.settings-quick-nav-btn.active {
    border-color: rgba(110, 32, 244, 0.4);
    background: linear-gradient(135deg, rgba(110, 32, 244, 0.12) 0%, rgba(139, 76, 248, 0.18) 100%);
    box-shadow: 0 8px 20px rgba(110, 32, 244, 0.12);
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section-title i {
    color: #6E20F4;
    font-size: 20px;
}

.settings-field {
    margin-bottom: 20px;
}

.settings-field:last-child {
    margin-bottom: 0;
}

.settings-label {
    display: block;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.settings-input,
.settings-select,
.settings-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.settings-input:focus,
.settings-select:focus,
.settings-textarea:focus {
    outline: none;
    border-color: #6E20F4;
    background: white;
    box-shadow: 0 0 0 3px rgba(110, 32, 244, 0.1);
}

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

.settings-range-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-range {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
}

.settings-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6E20F4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(110, 32, 244, 0.2);
}

.settings-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6E20F4;
    cursor: pointer;
    border: none;
}

.settings-range-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #6E20F4;
    background: rgba(110, 32, 244, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.settings-tone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.settings-tone-option {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.settings-tone-option:hover {
    border-color: #6E20F4;
    background: rgba(110, 32, 244, 0.05);
}

.settings-tone-option.selected {
    border-color: #6E20F4;
    background: rgba(110, 32, 244, 0.1);
    color: #6E20F4;
}

.settings-voice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.settings-voice-option {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.settings-voice-option:hover {
    border-color: #6E20F4;
    background: rgba(110, 32, 244, 0.05);
}

.settings-voice-option.selected {
    border-color: #6E20F4;
    background: rgba(110, 32, 244, 0.1);
    color: #6E20F4;
}

.settings-voice-name {
    font-weight: 600;
    font-size: 14px;
}

.settings-voice-description {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.settings-save-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6E20F4 0%, #8B4CF8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.settings-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(110, 32, 244, 0.3);
}

.settings-chat-footer {
    padding: 20px 30px 25px;
    background: white;
    border-top: 1px solid rgba(137, 83, 253, 0.12);
    position: sticky;
    bottom: 0;
    z-index: 1;
}

/* Voice Provider Switch Styles */
.settings-switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.settings-switch-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    transition: color 0.3s ease;
}

.settings-switch {
    position: relative;
    display: inline-block;
    width: 65px;
    height: 30px;
}

.settings-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6E20F4 0%, #8B4CF8 100%);
    transition: 0.4s;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(110, 32, 244, 0.2);
}

.settings-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.settings-switch input:checked + .settings-switch-slider {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.settings-switch input:checked + .settings-switch-slider:before {
    transform: translateX(30px);
}

.settings-switch input:checked ~ .settings-switch-label:last-child {
    color: #28a745;
    font-weight: 600;
}

.settings-switch:not(input:checked) ~ .settings-switch-label:first-child {
    color: #6E20F4;
    font-weight: 600;
}

/* Enhanced Voice Option Styles */
.settings-voice-option,
.settings-evenlab-voice-option {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.settings-voice-option:hover,
.settings-evenlab-voice-option:hover {
    border-color: #6E20F4;
    background: rgba(110, 32, 244, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(110, 32, 244, 0.1);
}

.settings-voice-option.selected,
.settings-evenlab-voice-option.selected {
    border-color: #6E20F4;
    background: rgba(110, 32, 244, 0.1);
    color: #6E20F4;
    box-shadow: 0 4px 15px rgba(110, 32, 244, 0.15);
}

.settings-voice-option.selected::before,
.settings-evenlab-voice-option.selected::before {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #6E20F4;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.settings-voice-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.settings-voice-description {
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.3;
}

/* Provider-specific voice containers */
#openai-voices,
#evenlab-voices {
    transition: all 0.3s ease;
}

#evenlab-voices .settings-evenlab-voice-option.selected {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

#evenlab-voices .settings-evenlab-voice-option.selected::before {
    background: #28a745;
}

#evenlab-voices .settings-evenlab-voice-option:hover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}
#showPrompts-toggle, #sendImageMessage, #sendMessage {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 576px) {
    .toolbar-scroll-container {
        padding: 5px 5px;
        gap: 6px;
        margin-left: -5px;
        margin-right: -5px;
        width: calc(100% + 10px);
    }
    
    .toolbar-btn, .toolbar-back-btn {
        min-width: 100px;
        height: 42px;
        font-size: 16px;
        padding: 0 8px;
    }
    .toolbar-back-btn{
        min-width: unset;
    }
    .tool-label {
        font-size: 11px;
        min-width: 50px;
    }
    
    .chat-toolbar-wrapper {
        padding: 5px !important;
        margin: 0;
    }
    
    .settings-modal {
        width: 95%;
        margin: 10px;
    }

    .settings-modal-header{
        padding: 20px;
    }

    .settings-modal-body {
        padding: 16px 20px;
    }

    .settings-quick-nav {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .settings-quick-nav-btn {
        padding: 12px 10px;
        font-size: 12px;
    }

    .settings-chat-footer {
        padding: 16px 20px 20px;
    }
    
    .settings-tone-grid,
    .settings-voice-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Enhanced Suggestions Styles */
.suggestions-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-grow: 1;
    padding: 0 5px;
}

.suggestions-scroll-container::-webkit-scrollbar {
    display: none;
}

.suggestion-btn {
    flex: 0 0 auto;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(110, 32, 244, 0.1);
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.suggestion-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(110, 32, 244, 0.1), transparent);
    transition: left 0.5s;
}

.suggestion-btn:hover {
    background: linear-gradient(135deg, #6E20F4 0%, #8B4CF8 100%);
    color: white;
    border-color: #6E20F4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(110, 32, 244, 0.25);
}

.suggestion-btn:hover::before {
    left: 100%;
}

.suggestion-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(110, 32, 244, 0.15);
}

/* Professional list design for suggestions container */
#suggestionsList .suggestion-card {
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

#suggestionsList .suggestion-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #6E20F4 0%, #8B4CF8 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

#suggestionsList .suggestion-card:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(110, 32, 244, 0.15);
    border-color: rgba(110, 32, 244, 0.2);
}

#suggestionsList .suggestion-card:hover::before {
    transform: scaleY(1);
}

#suggestionsList .suggestion-text {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin: 0;
    transition: color 0.3s ease;
}

#suggestionsList .suggestion-card:hover .suggestion-text {
    color: #6E20F4;
}

#suggestionsList .suggestion-icon {
    color: #6E20F4;
    font-size: 16px;
    margin-right: 12px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#suggestionsList .suggestion-card:hover .suggestion-icon {
    opacity: 1;
}

/* Loading state for suggestions */
#suggestionsList .loading-spinner {
    padding: 40px 0;
}

#suggestionsList .loading-spinner .spinner-border {
    color: #6E20F4;
    width: 2rem;
    height: 2rem;
}

/* Empty state */
#suggestionsList .empty-suggestions {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

#suggestionsList .empty-suggestions i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}
/* Add scroll indicators for mobile */
@media (max-width: 768px) {
    .toolbar-scroll-container::before,
    .toolbar-scroll-container::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 20px;
        pointer-events: none;
        z-index: 1;
        transition: opacity 0.3s ease;
    }
    
    .toolbar-scroll-container::before {
        left: 0;
    }
    
    .toolbar-scroll-container::after {
        right: 0;
    }
}

/* Modern Gift Card Styles */
.modern-gift-container {
    width: 100%;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.modern-gift-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(110, 32, 244, 0.6) 50%, 
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.gift-card:hover .modern-gift-container {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(110, 32, 244, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: rgba(110, 32, 244, 0.2);
}

.gift-card:hover .modern-gift-container::before {
    transform: translateX(100%);
}

.gift-image-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.gift-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    border-radius: 16px 16px 0 0;
}

.gift-card:hover .gift-image {
    transform: scale(1.1);
}

.gift-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(110, 32, 244, 0) 0%,
        rgba(110, 32, 244, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gift-card:hover .gift-overlay {
    opacity: 1;
}

.gift-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.gift-card:hover .gift-shine {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

.gift-info {
    padding: 16px 20px 20px;
    text-align: center;
    position: relative;
}

.gift-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.gift-card:hover .gift-title {
    color: #6E20F4;
}

.gift-cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gift-cost-badge:has(.cost-amount) {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #8b5a00;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.gift-cost-badge:has(.free-label) {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.gift-card:hover .gift-cost-badge {
    transform: scale(1.05);
}

.gift-coin-icon {
    font-size: 14px;
    animation: coinSpin 2s ease-in-out infinite;
}

@keyframes coinSpin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.cost-amount, .free-label {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.gift-selection-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(16, 185, 129, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.gift-selection-indicator i {
    color: white;
    font-size: 16px;
}

.gift-card.selected .gift-selection-indicator {
    opacity: 1;
    transform: scale(1);
}

.gift-card.selected .modern-gift-container {
    border-color: #10b981;
    box-shadow: 
        0 0 0 3px rgba(16, 185, 129, 0.2),
        0 12px 24px rgba(16, 185, 129, 0.15);
}

/* Premium gift styling */
.gift-card[data-cost]:not([data-cost=""]) .modern-gift-container {
    background: linear-gradient(145deg, #fff8e1 0%, #fff3c4 100%);
}

.gift-card[data-cost]:not([data-cost=""]) .gift-image-wrapper::after {
    content: '✨';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 16px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 0.7; 
        transform: scale(1) rotate(0deg); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2) rotate(180deg); 
    }
}

/* Loading state for gift images */
.gift-image[src*="placeholder"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gift-image-wrapper {
        height: 140px;
    }
    
    .gift-info {
        padding: 12px 16px 16px;
    }
    
    .gift-title {
        font-size: 13px;
    }
    
    .gift-cost-badge {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .gift-selection-indicator {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
    }
    
    .gift-selection-indicator i {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    
    .modern-gift-container {
        border-radius: 16px;
    }
    
    .gift-image-wrapper {
        height: 120px;
        border-radius: 12px 12px 0 0;
    }
    
    .gift-image {
        border-radius: 12px 12px 0 0;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .modern-gift-container {
        background: linear-gradient(145deg, #2d3748 0%, #1a202c 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .gift-title {
        color: #e2e8f0;
    }
    
    .gift-card:hover .gift-title {
        color: #8B4CF8;
    }
}

/* Modern Prompt Card Styles (matching Gift Cards) */
.modern-prompt-container {
    width: 100%;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.modern-prompt-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(110, 32, 244, 0.6) 50%, 
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.prompt-card:hover .modern-prompt-container {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(110, 32, 244, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: rgba(110, 32, 244, 0.2);
}

.prompt-card:hover .modern-prompt-container::before {
    transform: translateX(100%);
}

.prompt-image-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.prompt-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    border-radius: 16px 16px 0 0;
}

.prompt-card:hover .prompt-image {
    transform: scale(1.1);
}

.prompt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(110, 32, 244, 0) 0%,
        rgba(110, 32, 244, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prompt-card:hover .prompt-overlay {
    opacity: 1;
}

.prompt-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.prompt-card:hover .prompt-shine {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

.prompt-info {
    padding: 16px 20px 20px;
    text-align: center;
    position: relative;
}

.prompt-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.prompt-card:hover .prompt-title {
    color: #6E20F4;
}

.prompt-cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prompt-cost-badge:has(.cost-amount) {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #8b5a00;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.prompt-cost-badge:has(.free-label) {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.prompt-card:hover .prompt-cost-badge {
    transform: scale(1.05);
}

.prompt-coin-icon {
    font-size: 14px;
    animation: coinSpin 2s ease-in-out infinite;
}

.prompt-selection-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(16, 185, 129, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.prompt-selection-indicator i {
    color: white;
    font-size: 16px;
}

.prompt-card.selected .prompt-selection-indicator {
    opacity: 1;
    transform: scale(1);
}

.prompt-card.selected .modern-prompt-container {
    border-color: #10b981;
    box-shadow: 
        0 0 0 3px rgba(16, 185, 129, 0.2),
        0 12px 24px rgba(16, 185, 129, 0.15);
}

/* Premium prompt styling */
.prompt-card[data-cost]:not([data-cost=""]) .modern-prompt-container {
    background: linear-gradient(145deg, #fff8e1 0%, #fff3c4 100%);
}

.prompt-card[data-cost]:not([data-cost=""]) .prompt-image-wrapper::after {
    content: '✨';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 16px;
    animation: sparkle 2s ease-in-out infinite;
}

/* Loading state for prompt images */
.prompt-image[src*="placeholder"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Enhanced Model Selection Styles */
.settings-model-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

/* Premium model grid responsive layout: 3 columns on large screens, 2 on tablet, 1 on mobile */
.settings-model-grid--premium {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 1024px) {
    .settings-model-grid--premium {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .settings-model-grid--premium {
        grid-template-columns: 1fr;
    }
}

.settings-model-option {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.settings-model-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(110, 32, 244, 0.1), transparent);
    transition: left 0.5s;
}

.settings-model-option:hover {
    border-color: #6E20F4;
    background: linear-gradient(145deg, #ffffff 0%, rgba(110, 32, 244, 0.02) 100%);
    transform: translateY(-4px);
    box-shadow: 
        0 12px 30px rgba(110, 32, 244, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-model-option:hover::before {
    left: 100%;
}

.settings-model-option.selected {
    border-color: #6E20F4;
    background: linear-gradient(145deg, #6E20F4 0%, #8B4CF8 100%);
    color: white;
    box-shadow: 
        0 0 0 4px rgba(110, 32, 244, 0.2),
        0 8px 25px rgba(110, 32, 244, 0.25);
    transform: translateY(-2px);
}

.settings-model-option.selected .settings-model-name,
.settings-model-option.selected .settings-model-description,
.settings-model-option.selected .settings-model-provider,
.settings-model-option.selected .settings-model-stats {
    color: white;
}

.settings-model-option.selected::after {
    content: "✓";
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.settings-model-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.settings-model-name {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.settings-model-description {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

.settings-model-provider {
    font-size: 12px;
    color: #8e8e93;
    font-weight: 500;
    margin: 4px 0;
}

.settings-model-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.settings-model-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.settings-model-stat-label {
    font-size: 11px;
    color: #8e8e93;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-model-stat-value {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
}

.settings-model-option.selected .settings-model-stat-label,
.settings-model-option.selected .settings-model-stat-value {
    color: rgba(255, 255, 255, 0.9);
}

/* Premium Model Indicators */
.settings-model-option.premium-model {
    border-color: #ffd700;
    background: linear-gradient(145deg, #fffbf0 0%, #fff8e1 100%);
}

.settings-model-option.premium-model::before {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
}

.settings-model-option.premium-model:hover {
    border-color: #ffb300;
    box-shadow: 
        0 12px 30px rgba(255, 193, 7, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-model-option.premium-model.selected {
    border-color: #ffd700;
    background: linear-gradient(145deg, #ffd700 0%, #ffb300 100%);
    color: #8b5a00;
    box-shadow: 
        0 0 0 4px rgba(255, 215, 0, 0.3),
        0 8px 25px rgba(255, 193, 7, 0.25);
}

.settings-model-option.premium-model.selected .settings-model-name,
.settings-model-option.premium-model.selected .settings-model-description,
.settings-model-option.premium-model.selected .settings-model-provider,
.settings-model-option.premium-model.selected .settings-model-stats {
    color: #8b5a00;
}

.settings-model-option.premium-model.selected::after {
    background: rgba(139, 90, 0, 0.2);
    color: #8b5a00;
    border-color: rgba(139, 90, 0, 0.3);
}

.settings-model-option.premium-model.selected .settings-model-stat-label,
.settings-model-option.premium-model.selected .settings-model-stat-value {
    color: rgba(139, 90, 0, 0.8);
}

.premium-model-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(45deg, #ffd700 0%, #ffb300 100%);
    color: #8b5a00;
    border-radius: 0 14px 0 14px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    z-index: 1;
}

/* Disabled state for premium models without subscription */
.settings-model-option.premium-model.disabled {
    opacity: 0.6;
    cursor: pointer;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
}

.settings-model-option.premium-model.disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #ffd700;
}

/* Loading state */
.model-loading-container {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.model-loading-spinner .spinner-border {
    color: #6E20F4;
    width: 2rem;
    height: 2rem;
}

.model-error-container {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #f8f9fa;
}

.model-retry-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: #6E20F4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.model-retry-btn:hover {
    background: #5a1ac7;
    transform: translateY(-1px);
}

/* Speed indicators */
.speed-indicator {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.speed-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #dee2e6;
}

.speed-fast .speed-dot:nth-child(-n+3),
.speed-very-fast .speed-dot {
    background: #28a745;
}

.speed-medium .speed-dot:nth-child(-n+2) {
    background: #ffc107;
}

.speed-slow .speed-dot:first-child {
    background: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-model-grid {
        gap: 10px;
    }
    
    .settings-model-option {
        padding: 16px;
    }
    
    .settings-model-name {
        font-size: 15px;
    }
    
    .settings-model-description {
        font-size: 12px;
    }
    
    .settings-model-stats {
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .settings-model-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .settings-model-stat {
        min-width: 60px;
    }
}

/* Enhanced mobile keyboard handling - replace existing mobile styles */
@media screen and (max-width: 768px) {
    #chatInput {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1050 !important; /* Higher z-index */
        padding: 10px 15px !important;
        /* Ensure it stays above keyboard */
        padding-bottom: max(env('safe-area-inset-bottom'), 10px) !important;
    }
    
    /* Ensure the input field is visible */
    #userMessage {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 44px !important; /* iOS touch target size */
        border-radius: 8px !important;
        border: unset!important;
        border-color: unset!important;
        z-index: 1051 !important;
        position: relative !important;
    }
    
    /* Ensure the toolbar wrapper doesn't cover the input */
    .chat-toolbar-wrapper {
        z-index: 1049 !important;
        position: relative !important;
    }
    
    /* Make sure any overlays don't interfere */
    #suggestionsContainer,
    #personas-container,
    #promptContainer,
    #giftsOverlay {
        z-index: 1048 !important;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    @media screen and (max-width: 768px) {
        #chatInput {
            /* iOS Safari specific positioning */
            position: -webkit-sticky !important;
            position: sticky !important;
            bottom: 0 !important;
        }
        
        /* Prevent any white divs from covering input */
        body * {
            -webkit-overflow-scrolling: touch;
        }
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .modern-prompt-container {
        background: linear-gradient(145deg, #2d3748 0%, #1a202c 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .prompt-title {
        color: #e2e8f0;
    }
    
    .prompt-card:hover .prompt-title {
        color: #8B4CF8;
    }
}

#sendMessage, #chatInput .load {
    border-left: 0 !important;
    box-shadow: none;
}

#chatInput {
    position: absolute;
    bottom: 0;
    width: 100%;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 10px;
}

body.keyboard-open #chatInput {
    background-color: transparent !important;
    box-shadow: none !important;
}

#chatContainer {
    height: 100%;
    overflow-y: scroll !important; /* Ensure scroll is always enabled */
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer and Edge */
    /* Remove any properties that might interfere with scrolling */
    touch-action: pan-y; /* Allow vertical scrolling on touch devices */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

#chatContainer::-webkit-scrollbar {
    display: none; /* Hide scrollbar for WebKit browsers */
}

/* Enhanced Model Selection Styles */
.settings-model-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

.settings-model-option {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.settings-model-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(110, 32, 244, 0.1), transparent);
    transition: left 0.5s;
}

.settings-model-option:hover {
    border-color: #6E20F4;
    background: linear-gradient(145deg, #ffffff 0%, rgba(110, 32, 244, 0.02) 100%);
    transform: translateY(-4px);
    box-shadow: 
        0 12px 30px rgba(110, 32, 244, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-model-option:hover::before {
    left: 100%;
}

.settings-model-option.selected {
    border-color: #6E20F4;
    background: linear-gradient(145deg, #6E20F4 0%, #8B4CF8 100%);
    color: white;
    box-shadow: 
        0 0 0 4px rgba(110, 32, 244, 0.2),
        0 8px 25px rgba(110, 32, 244, 0.25);
    transform: translateY(-2px);
}

.settings-model-option.selected .settings-model-name,
.settings-model-option.selected .settings-model-description,
.settings-model-option.selected .settings-model-provider,
.settings-model-option.selected .settings-model-stats {
    color: white;
}

.settings-model-option.selected::after {
    content: "✓";
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.settings-model-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.settings-model-name {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.settings-model-description {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

.settings-model-provider {
    font-size: 12px;
    color: #8e8e93;
    font-weight: 500;
    margin: 4px 0;
}

.settings-model-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.settings-model-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.settings-model-stat-label {
    font-size: 11px;
    color: #8e8e93;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-model-stat-value {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
}

.settings-model-option.selected .settings-model-stat-label,
.settings-model-option.selected .settings-model-stat-value {
    color: rgba(255, 255, 255, 0.9);
}

/* Premium Model Indicators */
.settings-model-option.premium-model {
    border-color: #ffd700;
    background: linear-gradient(145deg, #fffbf0 0%, #fff8e1 100%);
}

.settings-model-option.premium-model::before {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
}

.settings-model-option.premium-model:hover {
    border-color: #ffb300;
    box-shadow: 
        0 12px 30px rgba(255, 193, 7, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-model-option.premium-model.selected {
    border-color: #ffd700;
    background: linear-gradient(145deg, #ffd700 0%, #ffb300 100%);
    color: #8b5a00;
    box-shadow: 
        0 0 0 4px rgba(255, 215, 0, 0.3),
        0 8px 25px rgba(255, 193, 7, 0.25);
}

.settings-model-option.premium-model.selected .settings-model-name,
.settings-model-option.premium-model.selected .settings-model-description,
.settings-model-option.premium-model.selected .settings-model-provider,
.settings-model-option.premium-model.selected .settings-model-stats {
    color: #8b5a00;
}

.settings-model-option.premium-model.selected::after {
    background: rgba(139, 90, 0, 0.2);
    color: #8b5a00;
    border-color: rgba(139, 90, 0, 0.3);
}

.settings-model-option.premium-model.selected .settings-model-stat-label,
.settings-model-option.premium-model.selected .settings-model-stat-value {
    color: rgba(139, 90, 0, 0.8);
}

.premium-model-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(45deg, #ffd700 0%, #ffb300 100%);
    color: #8b5a00;
    border-radius: 0 14px 0 14px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    z-index: 1;
}

/* Disabled state for premium models without subscription */
.settings-model-option.premium-model.disabled {
    opacity: 0.6;
    cursor: pointer;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
}

.settings-model-option.premium-model.disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #ffd700;
}

/* Loading state */
.model-loading-container {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.model-loading-spinner .spinner-border {
    color: #6E20F4;
    width: 2rem;
    height: 2rem;
}

.model-error-container {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #f8f9fa;
}

.model-retry-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: #6E20F4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.model-retry-btn:hover {
    background: #5a1ac7;
    transform: translateY(-1px);
}

/* Speed indicators */
.speed-indicator {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.speed-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #dee2e6;
}

.speed-fast .speed-dot:nth-child(-n+3),
.speed-very-fast .speed-dot {
    background: #28a745;
}

.speed-medium .speed-dot:nth-child(-n+2) {
    background: #ffc107;
}

.speed-slow .speed-dot:first-child {
    background: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-model-grid {
        gap: 10px;
        grid-template-columns: 1fr !important;
    }
    
    .settings-model-option {
        padding: 16px;
    }
    
    .settings-model-name {
        font-size: 15px;
    }
    
    .settings-model-description {
        font-size: 12px;
    }
    
    .settings-model-stats {
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .settings-model-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .settings-model-stat {
        min-width: 60px;
    }
}

/* Enhanced mobile keyboard handling - replace existing mobile styles */
@media screen and (max-width: 768px) {
    #chatInput {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1050 !important; /* Higher z-index */
        padding: 10px 15px !important;
        /* Ensure it stays above keyboard */
        padding-bottom: max(env('safe-area-inset-bottom'), 10px) !important;
    }
    
    /* Ensure the input field is visible */
    #userMessage {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 44px !important; /* iOS touch target size */
        border-radius: 8px !important;
        border: unset!important;
        border-color: unset!important;
        z-index: 1051 !important;
        position: relative !important;
    }
    
    /* Ensure the toolbar wrapper doesn't cover the input */
    .chat-toolbar-wrapper {
        z-index: 1049 !important;
        position: relative !important;
    }
    
    /* Make sure any overlays don't interfere */
    #suggestionsContainer,
    #personas-container,
    #promptContainer,
    #giftsOverlay {
        z-index: 1048 !important;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    @media screen and (max-width: 768px) {
        #chatInput {
            /* iOS Safari specific positioning */
            position: -webkit-sticky !important;
            position: sticky !important;
            bottom: 0 !important;
        }
        
        /* Prevent any white divs from covering input */
        body * {
            -webkit-overflow-scrolling: touch;
        }
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .modern-prompt-container {
        background: linear-gradient(145deg, #2d3748 0%, #1a202c 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .prompt-title {
        color: #e2e8f0;
    }
    
    .prompt-card:hover .prompt-title {
        color: #8B4CF8;
    }
}

#sendMessage, #chatInput .load {
    border-left: 0 !important;
    box-shadow: none;
}

#chatInput {
    position: absolute;
    bottom: 0;
    width: 100%;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 10px;
}

body.keyboard-open #chatInput {
    background-color: transparent !important;
    box-shadow: none !important;
}

#chatContainer {
    height: 100%;
    overflow-y: scroll !important; /* Ensure scroll is always enabled */
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer and Edge */
    /* Remove any properties that might interfere with scrolling */
    touch-action: pan-y; /* Allow vertical scrolling on touch devices */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

#chatContainer::-webkit-scrollbar {
    display: none; /* Hide scrollbar for WebKit browsers */
}

/* Enhanced Model Selection Styles */
.settings-model-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

.settings-model-option {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.settings-model-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(110, 32, 244, 0.1), transparent);
    transition: left 0.5s;
}

.settings-model-option:hover {
    border-color: #6E20F4;
    background: linear-gradient(145deg, #ffffff 0%, rgba(110, 32, 244, 0.02) 100%);
    transform: translateY(-4px);
    box-shadow: 
        0 12px 30px rgba(110, 32, 244, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-model-option:hover::before {
    left: 100%;
}

.settings-model-option.selected {
    border-color: #6E20F4;
    background: linear-gradient(145deg, #6E20F4 0%, #8B4CF8 100%);
    color: white;
    box-shadow: 
        0 0 0 4px rgba(110, 32, 244, 0.2),
        0 8px 25px rgba(110, 32, 244, 0.25);
    transform: translateY(-2px);
}

.settings-model-option.selected .settings-model-name,
.settings-model-option.selected .settings-model-description,
.settings-model-option.selected .settings-model-provider,
.settings-model-option.selected .settings-model-stats {
    color: white;
}

.settings-model-option.selected::after {
    content: "✓";
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.settings-model-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.settings-model-name {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.settings-model-description {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

.settings-model-provider {
    font-size: 12px;
    color: #8e8e93;
    font-weight: 500;
    margin: 4px 0;
}

.settings-model-stats {
    display: flex;
    gap: 16px;
    margin-top:  8px;
}

.settings-model-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.settings-model-stat-label {
    font-size: 11px;
    color: #8e8e93;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-model-stat-value {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
}

.settings-model-option.selected .settings-model-stat-label,
.settings-model-option.selected .settings-model-stat-value {
    color: rgba(255, 255, 255, 0.9);
}

/* Premium Model Indicators */
.settings-model-option.premium-model {
    border-color: #ffd700;
    background: linear-gradient(145deg, #fffbf0 0%, #fff8e1 100%);
}

.settings-model-option.premium-model::before {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
}

.settings-model-option.premium-model:hover {
    border-color: #ffb300;
    box-shadow: 
        0 12px 30px rgba(255, 193, 7, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-model-option.premium-model.selected {
    border-color: #ffd700;
    background: linear-gradient(145deg, #ffd700 0%, #ffb300 100%);
    color: #8b5a00;
    box-shadow: 
        0 0 0 4px rgba(255, 215, 0, 0.3),
        0 8px 25px rgba(255, 193, 7, 0.25);
}

.settings-model-option.premium-model.selected .settings-model-name,
.settings-model-option.premium-model.selected .settings-model-description,
.settings-model-option.premium-model.selected .settings-model-provider,
.settings-model-option.premium-model.selected .settings-model-stats {
    color: #8b5a00;
}

.settings-model-option.premium-model.selected::after {
    background: rgba(139, 90, 0, 0.2);
    color: #8b5a00;
    border-color: rgba(139, 90, 0, 0.3);
}

.settings-model-option.premium-model.selected .settings-model-stat-label,
.settings-model-option.premium-model.selected .settings-model-stat-value {
    color: rgba(139, 90, 0, 0.8);
}

.premium-model-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(45deg, #ffd700 0%, #ffb300 100%);
    color: #8b5a00;
    border-radius: 0 14px 0 14px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    z-index: 1;
}

/* Disabled state for premium models without subscription */
.settings-model-option.premium-model.disabled {
    opacity: 0.6;
    cursor: pointer;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
}

.settings-model-option.premium-model.disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #ffd700;
}

/* Loading state */
.model-loading-container {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.model-loading-spinner .spinner-border {
    color: #6E20F4;
    width: 2rem;
    height: 2rem;
}

.model-error-container {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #f8f9fa;
}

.model-retry-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: #6E20F4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.model-retry-btn:hover {
    background: #5a1ac7;
    transform: translateY(-1px);
}

/* Speed indicators */
.speed-indicator {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.speed-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #dee2e6;
}

.speed-fast .speed-dot:nth-child(-n+3),
.speed-very-fast .speed-dot {
    background: #28a745;
}

.speed-medium .speed-dot:nth-child(-n+2) {
    background: #ffc107;
}

.speed-slow .speed-dot:first-child {
    background: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-model-grid {
        gap: 10px;
    }
    
    .settings-model-option {
        padding: 16px;
    }
    
    .settings-model-name {
        font-size: 15px;
    }
    
    .settings-model-description {
        font-size: 12px;
    }
    
    .settings-model-stats {
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .settings-model-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .settings-model-stat {
        min-width: 60px;
    }
}

/* Enhanced mobile keyboard handling - replace existing mobile styles */
@media screen and (max-width: 768px) {
    #chatInput {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1050 !important; /* Higher z-index */
        padding: 10px 15px !important;
        /* Ensure it stays above keyboard */
        padding-bottom: max(env('safe-area-inset-bottom'), 10px) !important;
    }
    
    /* Ensure the input field is visible */
    #userMessage {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 44px !important; /* iOS touch target size */
        border-radius: 8px !important;
        border: unset!important;
        border-color: unset!important;
        z-index: 1051 !important;
        position: relative !important;
    }
    
    /* Ensure the toolbar wrapper doesn't cover the input */
    .chat-toolbar-wrapper {
        z-index: 1049 !important;
        position: relative !important;
    }
    
    /* Make sure any overlays don't interfere */
    #suggestionsContainer,
    #personas-container,
    #promptContainer,
    #giftsOverlay {
        z-index: 1048 !important;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    @media screen and (max-width: 768px) {
        #chatInput {
            /* iOS Safari specific positioning */
            position: -webkit-sticky !important;
            position: sticky !important;
            bottom: 0 !important;
        }
        
        /* Prevent any white divs from covering input */
        body * {
            -webkit-overflow-scrolling: touch;
        }
    }
}

