/* AI Tour Guide Widget */
.ai-guide-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    font-family: 'Open Sans', sans-serif;
}

/* Guide Avatar Button */
.ai-guide-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #fff;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: visible;
}

.ai-guide-avatar .tour-guide-icon {
    width: 45px;
    height: 45px;
    position: relative;
}

/* Tour Guide Character */
.tour-guide-icon .head {
    width: 24px;
    height: 24px;
    background: #FDB44B;
    border-radius: 50%;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid #fff;
    z-index: 1;
}

.tour-guide-icon .hat {
    width: 28px;
    height: 10px;
    background: #c41e3a;
    border-radius: 4px 4px 0 0;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid #fff;
    border-bottom: none;
    z-index: 2;
}

.tour-guide-icon .hat-brim {
    width: 34px;
    height: 4px;
    background: #c41e3a;
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    border: 1px solid #fff;
    z-index: 2;
}

.tour-guide-icon .eyes {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.tour-guide-icon .eye {
    width: 3px;
    height: 3px;
    background: #333;
    border-radius: 50%;
}

.tour-guide-icon .smile {
    width: 10px;
    height: 5px;
    border: 2px solid #333;
    border-top: none;
    border-radius: 0 0 10px 10px;
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.tour-guide-icon .badge {
    width: 12px;
    height: 12px;
    background: #FFD700;
    border-radius: 50%;
    position: absolute;
    bottom: 8px;
    right: 8px;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    z-index: 3;
}

.tour-guide-icon .badge::after {
    content: "★";
    color: #c41e3a;
    font-weight: bold;
}

.ai-guide-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.ai-guide-avatar.dancing {
    animation: hop 0.6s ease-in-out 3;
}

@keyframes hop {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(-10deg); }
    50% { transform: translateY(-10px) rotate(10deg); }
    75% { transform: translateY(-20px) rotate(-5deg); }
}

.ai-guide-avatar .pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Chat Window */
.ai-guide-chat {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
}

.ai-guide-chat.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chat Header */
.ai-guide-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-guide-chat-header .avatar {
    font-size: 28px;
}

.ai-guide-chat-header .info {
    flex: 1;
}

.ai-guide-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color:white;
}

.ai-guide-chat-header p {
    margin: 2px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
    color:white;
}

.ai-guide-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.ai-guide-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Messages */
.ai-guide-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fa;
}

.ai-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.ai-message.user {
    flex-direction: row-reverse;
}

.ai-message .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ai-message.ai .avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ai-message.user .avatar {
    background: #e9ecef;
}

.ai-message .bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.ai-message.ai .bubble {
    background: #fff;
    border: 1px solid #e9ecef;
}

.ai-message.user .bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ai-message.typing .bubble {
    padding: 16px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* Chat Input */
.ai-guide-input {
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    background: #fff;
}

.ai-guide-input form {
    display: flex;
    gap: 10px;
}

.ai-guide-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.ai-guide-input input:focus {
    border-color: #667eea;
}

.ai-guide-input button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.ai-guide-input button:hover:not(:disabled) {
    transform: scale(1.1);
}

.ai-guide-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-guide-chat {
        width: calc(100vw - 20px);
        height: calc(100vh - 180px);
        max-height: 600px;
        right: 10px;
        bottom: 80px;
        top: auto;
    }
    
    .ai-guide-avatar {
        width: 60px;
        height: 60px;
        font-size: 28px;
        bottom: 10px;
        right: 10px;
    }
}

/* Welcome Message */
.ai-guide-welcome {
    text-align: center;
    padding: 20px;
    color: #666;
}

.ai-guide-welcome h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.ai-guide-welcome p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

.ai-guide-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.ai-guide-suggestion {
    background: #fff;
    border: 1px solid #e9ecef;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    text-align: left;
}

.ai-guide-suggestion:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}
