.gpt-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.gpt-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #DA4127 0%, #DA4127 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease-in-out;
}

.gpt-chat-button:hover {
    transform: scale(1.05);
}

.gpt-chat-button-icon {
    color: white;
}

.gpt-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.gpt-chat-window.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.gpt-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #DA4127 0%, #DA4127 100%);
    color: white;
}

.gpt-chat-title {
    font-weight: 600;
    font-size: 16px;
}

.gpt-chat-controls {
    display: flex;
    gap: 10px;
}

.gpt-chat-minimize,
.gpt-chat-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: opacity 0.2s;
}

.gpt-chat-minimize:hover,
.gpt-chat-close:hover {
    opacity: 0.8;
}

.gpt-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #F5F8FB;
}

.gpt-chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    line-height: 1.4;
    font-size: 14px;
}

.gpt-chat-message.user {
    background: #E9F5FF;
    color: #2C3E50;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.gpt-chat-message.assistant {
    background: #19A974;
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.gpt-chat-message.thinking {
    background: #F0F0F0;
    color: #555;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

/*
.gpt-chat-message.thinking:after {
    content: '';
    animation: thinking 1.2s infinite;
}
*/

.gpt-chat-message {
  max-width: 95%;
  padding: 10px 15px;
  border-radius: 18px;
  position: relative;
  line-height: 1.4;
  font-size: 14px;
  margin-bottom: 4px;
}
.gpt-chat-message.user {
  background: #E9F5FF;
  color: #2C3E50;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}
.gpt-chat-message.assistant {
  background: #DA4127;
  color: white;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}
.gpt-chat-message .chat-link {
    text-decoration: underline dotted;
    font-weight: 900;
    color: #B0E0E6;
}
.message-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 3px;
  opacity: 0.7;
}
.message-content {
  word-break: break-word;
  min-width: 87px;
}

@keyframes thinking {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

.gpt-chat-input-container {
    padding: 15px;
    border-top: 1px solid #EFEFEF;
    display: flex;
    align-items: flex-end;
    background: white;
    position: relative;
}

.gpt-chat-input {
    flex: 1;
    resize: none;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    padding: 10px 15px;
    padding-right: 45px;
    max-height: 100px;
    min-height: 45px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

.gpt-chat-input:focus {
    border-color: #19A974;
}

.gpt-chat-send {
    position: absolute;
    right: 25px;
    bottom: 25px;
    border: none;
    background: none;
    color: #19A974;
    cursor: pointer;
    outline: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gpt-chat-send:hover {
    color: #0D8B63;
}

.gpt-chat-tools {
    position: absolute;
    right: 60px;
    bottom: 25px;
}

.gpt-chat-upload {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gpt-chat-upload:hover {
    color: #666;
}

.gpt-chat-typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(25, 169, 116, 0.1);
    border-radius: 10px;
    width: fit-content;
    align-self: flex-start;
}

.gpt-chat-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #19A974;
    border-radius: 50%;
    opacity: 0.4;
    animation: typing 1s infinite alternate;
}

.gpt-chat-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.gpt-chat-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% { opacity: 0.4; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(-4px); }
}

/* Стили для адаптивности */
@media (max-width: 480px) {
    .gpt-chat-window {
        width: calc(100% - 40px);
        height: calc(100% - 120px);
        bottom: 80px;
    }
}