.aria-chat-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aria-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.aria-chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
}

.aria-chat-emoji {
    font-size: 20px;
}

.aria-chat-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.aria-character-select {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 13px;
    cursor: pointer;
    max-width: 200px;
}

.aria-character-select option {
    background: #333;
    color: white;
}

.aria-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.aria-btn-small {
    background: rgba(255,255,255,0.2);
    color: white;
}

.aria-btn-small:hover {
    background: rgba(255,255,255,0.3);
}

.aria-btn:not(.aria-btn-small):not(.aria-btn-secondary) {
    background: #667eea;
    color: white;
}

.aria-btn:not(.aria-btn-small):not(.aria-btn-secondary):hover {
    background: #5568d3;
}

.aria-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.aria-btn-secondary:hover {
    background: #e0e0e0;
}

.aria-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.aria-modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
}

.aria-modal-content h3 {
    margin: 0 0 16px 0;
    color: #333;
}

.aria-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.aria-input:focus {
    outline: none;
    border-color: #667eea;
}

.aria-modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.aria-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 12px;
}

.aria-success {
    color: #4caf50;
    font-size: 13px;
    margin-top: 12px;
}

.aria-modal-link {
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
}

.aria-modal-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.aria-modal-link a:hover {
    text-decoration: underline;
}

.aria-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9f9f9;
}

.aria-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.aria-message-user {
    align-self: flex-end;
    background: #667eea;
    color: white;
    border-bottom-right-radius: 4px;
}

.aria-message-ai {
    align-self: flex-start;
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.aria-message-system {
    align-self: center;
    background: #e8e8e8;
    color: #666;
    font-size: 13px;
    text-align: center;
}

.aria-message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.aria-message-meta {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

.aria-chat-input-container {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.aria-message-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    max-height: 100px;
}

.aria-message-input:focus {
    outline: none;
    border-color: #667eea;
}

.aria-send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.aria-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.aria-chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: #f0f0f0;
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

.aria-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
}

.aria-status-dot.disconnect {
    background: #f44336;
}

.aria-status-dot.typing {
    background: #ff9800;
    animation: aria-pulse 1s infinite;
}

@keyframes aria-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (max-width: 600px) {
    .aria-chat-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .aria-chat-controls {
        justify-content: space-between;
    }
    
    .aria-character-select {
        max-width: none;
        flex: 1;
    }
}
