:root {
    --pink: #f8b6c1;
    --pink-dark: #f38aa2;
    --white: #fff;
    --gray: #f7f7f8;
    --text: #333;
    --muted: #6b7280;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

.luckydraw-chatbot-wrapper {
    max-width: 900px;
    margin: 20px auto;
    font-family: 'Segoe UI', 'Noto Sans Thai', system-ui, -apple-system, Roboto, sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius);
    overflow: hidden;
}

.luckydraw-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--pink), var(--pink-dark));
    color: #fff;
}

.luckydraw-header h1 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.luckydraw-header .subtitle {
    margin: 0 0 15px 0;
    opacity: 0.95;
    font-size: 1.1rem;
}

.luckydraw-header .campaign-info {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
}

.countdown {
    margin-top: 12px;
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
}

.luckydraw-card {
    background: var(--white);
    padding: 25px;
}

.chat {
    min-height: 350px;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: var(--gray);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.bubble {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 10px 0;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.6;
    width: fit-content;
    animation: slideIn 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bubble.user {
    background: linear-gradient(135deg, var(--pink), var(--pink-dark));
    border-color: var(--pink-dark);
    color: #fff;
    margin-left: auto;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.chip {
    background: var(--pink-dark);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    min-height: 44px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(243, 138, 162, 0.3);
}

.chip:hover {
    background: var(--pink);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 138, 162, 0.4);
}

.chip:active {
    transform: scale(0.97);
}

.chat-form {
    display: flex;
    gap: 12px;
}

.chat-form input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    font-size: 16px;
    background: #fff;
    transition: all 0.3s ease;
}

.chat-form input:focus {
    outline: none;
    border-color: var(--pink-dark);
    box-shadow: 0 0 0 3px rgba(248, 182, 193, 0.2);
}

.chat-form button {
    background: linear-gradient(135deg, var(--pink-dark), var(--pink));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0 30px;
    font-size: 16px;
    cursor: pointer;
    min-height: 52px;
    min-width: 100px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(243, 138, 162, 0.3);
}

.chat-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 138, 162, 0.4);
}

.chat-form button:active {
    transform: scale(0.98);
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--pink);
    border-top-color: var(--pink-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar styling */
.chat::-webkit-scrollbar {
    width: 10px;
}

.chat::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat::-webkit-scrollbar-thumb {
    background: var(--pink-dark);
    border-radius: 10px;
}

.chat::-webkit-scrollbar-thumb:hover {
    background: var(--pink);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .luckydraw-chatbot-wrapper {
        margin: 10px;
        border-radius: 10px;
    }
    
    .luckydraw-header h1 {
        font-size: 1.5rem;
    }
    
    .luckydraw-header .subtitle {
        font-size: 1rem;
    }
    
    .luckydraw-card {
        padding: 15px;
    }
    
    .bubble {
        max-width: 85%;
    }
    
    .chat-form button {
        min-width: 80px;
        padding: 0 20px;
    }
    
    .chat {
        min-height: 300px;
        max-height: 400px;
    }
    
    .chip {
        font-size: 13px;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    .luckydraw-header h1 {
        font-size: 1.3rem;
    }
    
    .bubble {
        max-width: 90%;
        font-size: 14px;
    }
    
    .chat-form {
        gap: 8px;
    }
    
    .chat-form input {
        font-size: 16px;
    }
}

