/* Chat Section */
.chat-section {
    background-color: var(--chat-green);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 300px;
}

.chat-section h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.chat-messages {
    flex-grow: 1;
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.chat-message {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    max-width: 85%;
}

.chat-message.player {
    background-color: #e3f2fd;
    margin-left: auto;
}

.chat-message.bot {
    background-color: #e8f5e9;
    margin-right: auto;
}

.chat-input-area {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
}

#chat-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    background-color: white;
}

#chat-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

#send-message {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: white;
    color: var(--chat-green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

#send-message:hover {
    transform: scale(1.05);
}

#send-message i {
    font-size: 1.2rem;
}

/* Bot Thinking Indicator */
.bot-thinking {
    display: flex;
    gap: 0.4rem;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    background-color: var(--chat-green);
    border-radius: 50%;
    opacity: 0.6;
    animation: botThinking 1.4s infinite ease-in-out;
}

.thinking-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes botThinking {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.chat-container {
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
}

.chat-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.chat-toggle:hover {
    opacity: 1;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 15px;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: messageSlide 0.3s ease-out;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.message-content {
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    color: white;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message-content.system {
    background-color: rgba(33, 150, 243, 0.2);
    font-style: italic;
}

.message-content.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #ffcdd2;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.chat-input {
    display: flex;
    gap: 10px;
}

.message-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.message-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.message-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
}

.send-button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    background-color: #2196F3;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.send-button:hover {
    background-color: #1976D2;
}

.send-button:disabled {
    background-color: #9E9E9E;
    cursor: not-allowed;
}

/* Animations */
@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styles */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        padding: 15px;
        min-height: 300px;
    }

    .chat-header h3 {
        font-size: 1rem;
    }

    .message-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .message-content {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .message-input {
        padding: 8px 12px;
    }

    .send-button {
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        padding: 10px;
        min-height: 250px;
    }

    .chat-messages {
        margin-bottom: 10px;
    }

    .chat-message {
        margin-bottom: 10px;
    }

    .message-content {
        font-size: 0.8rem;
    }

    .message-meta {
        font-size: 0.7rem;
    }

    .chat-input {
        flex-direction: column;
    }

    .send-button {
        width: 100%;
    }
} 