* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --rotary-blue: #1560BD;
    --rotary-royal: #0D47A1;
    --rotary-gold: #F7A81B;
    --bg-light: #F5F7FA;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    --white: #FFFFFF;
    --shadow: 0 4px 12px rgba(21, 96, 189, 0.15);
    --shadow-hover: 0 8px 24px rgba(21, 96, 189, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--rotary-blue) 0%, var(--rotary-royal) 100%);
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.chat-container {
    width: 100%;
    max-width: 500px;
    height: 95vh;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HEADER */
.chat-header {
    background: linear-gradient(135deg, var(--rotary-blue), var(--rotary-royal));
    color: white;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-circle {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header-text h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.subtitle {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.95;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* MESSAGES */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-light);
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 10px;
}

.welcome-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.6s ease-out;
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.welcome-card h2 {
    color: var(--rotary-blue);
    font-size: 22px;
    margin-bottom: 8px;
}

.welcome-card p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    flex-direction: row-reverse;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-avatar {
    background: linear-gradient(135deg, var(--rotary-blue), var(--rotary-royal));
}

.user-avatar {
    background: linear-gradient(135deg, var(--rotary-gold), #FF9800);
}

.message-content {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message.user .message-content {
    align-items: flex-end;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-bubble.bot {
    background: white;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom-left-radius: 4px;
}

.message-bubble.user {
    background: linear-gradient(135deg, var(--rotary-blue), var(--rotary-royal));
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: var(--text-light);
    padding: 0 8px;
}

/* INPUT */
.chat-input-wrapper {
    background: white;
    padding: 16px;
    border-top: 1px solid #E2E8F0;
}

.quick-replies {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.quick-replies::-webkit-scrollbar {
    height: 4px;
}

.quick-replies::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 10px;
}

.quick-reply {
    background: var(--bg-light);
    border: 1px solid #E2E8F0;
    color: var(--rotary-blue);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.quick-reply:hover {
    background: var(--rotary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.quick-reply:active {
    transform: translateY(0);
}

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

#userInput {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 24px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--bg-light);
}

#userInput:focus {
    outline: none;
    border-color: var(--rotary-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(21, 96, 189, 0.1);
}

.send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--rotary-blue), var(--rotary-royal));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.send-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-hover);
}

.send-btn:active {
    transform: scale(0.95);
}

/* TYPING INDICATOR */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--rotary-blue);
    border-radius: 50%;
    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); opacity: 0.7; }
    30% { transform: translateY(-10px); opacity: 1; }
}

/* RESPONSIVE */
@media (max-width: 600px) {
    body {
        padding: 0;
    }
    
    .chat-container {
        height: 100vh;
        border-radius: 0;
        max-width: none;
    }
}
