/* Settings Icon */
.settings-icon, 
.new-conversation-icon,
.dynamic-prompt-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.settings-icon:hover, 
.new-conversation-icon:hover,
.dynamic-prompt-icon:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.settings-icon svg, 
.new-conversation-icon svg,
.dynamic-prompt-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.settings-icon:hover svg, 
.new-conversation-icon:hover svg,
.dynamic-prompt-icon:hover svg {
    transform: scale(1.1) rotate(180deg);
    transition: transform 1s ease;
}

.settings-tooltip, 
.new-conversation-tooltip,
.dynamic-prompt-tooltip {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.4rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
    text-align: center;
}

.settings-icon:hover .settings-tooltip,
.new-conversation-icon:hover .new-conversation-tooltip,
.dynamic-prompt-icon:hover .dynamic-prompt-tooltip {
    opacity: 1;
}

#new-conversation-icon {
    margin-bottom: 64px;
    background: linear-gradient(135deg, hsl(166, 76%, 66%) 0%, #1a9eb0 100%);
}

#dynamic-prompt-icon {
    margin-bottom: 128px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

/* Settings Modal */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.settings-modal.show {
    display: flex;
}

.settings-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

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

.settings-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.settings-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-modal-header h2 svg {
    width: 28px;
    height: 28px;
    fill: #667eea;
}

.settings-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.settings-close-btn:hover:not(:disabled) {
    background: #f5f5f5;
    color: #333;
}

.settings-close-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.settings-form-group {
    margin-bottom: 24px;
}

.settings-form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.settings-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-radio-option {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.settings-radio-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.settings-radio-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.settings-radio-option.selected {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.settings-radio-option label {
    margin: 0;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.settings-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.settings-btn-cancel:hover:not(:disabled) {
    background: #e0e0e0;
}

.settings-btn-cancel:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.settings-btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.settings-btn-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.settings-btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Settings Loading Overlay */
.settings-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px;
}

.settings-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.settings-loading-spinner {
    width: 60px;
    height: 60px;
    color: #667eea;
}

.settings-loading-spinner svg {
    width: 100%;
    height: 100%;
}

.settings-loading-text {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .settings-modal-content {
        padding: 24px;
        margin: 16px;
    }
    
    .settings-icon {
        width: 42px;
        height: 42px;
    }
    
    .settings-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .settings-loading-spinner {
        width: 50px;
        height: 50px;
    }
    
    .settings-loading-text {
        font-size: 14px;
    }
}

.user-settings-group {
    margin-bottom: 1rem;
}

.settings-button-logout {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logout-button {
    background:linear-gradient(135deg, #e53e3e 0%, #f56565 100%);
    color:#fff;
    border-radius: 8px;
}

.logout-button:hover {
    background:linear-gradient(135deg, #c53030 0%, #f56565 100%);
}

/* Dynamic Prompt Modal */
.dynamic-prompt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.dynamic-prompt-modal.show {
    display: flex;
}

.dynamic-prompt-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px;
    width: 60%;
    max-width: 800px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.dynamic-prompt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.dynamic-prompt-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dynamic-prompt-modal-header h2 svg {
    width: 28px;
    height: 28px;
    fill: #1e3a8a;
}

.dynamic-prompt-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.dynamic-prompt-close-btn:hover {
    background-color: #f0f0f0;
}

.dynamic-prompt-form-group {
    margin-bottom: 24px;
}

.dynamic-prompt-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.dynamic-prompt-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.2s;
}

.dynamic-prompt-form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
}

.dynamic-prompt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dynamic-prompt-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dynamic-prompt-btn-cancel {
    background-color: #f0f0f0;
    color: #666;
}

.dynamic-prompt-btn-cancel:hover {
    background-color: #e0e0e0;
}

.dynamic-prompt-btn-save {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
}

.dynamic-prompt-btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
}