:root {
    --primary: #ff6600;
    --primary-glow: #ff9500;
    --secondary: #00ff88;
    --bg-dark: #0a0a0f;
    --bg-panel: #12121a;
    --bg-card: #1a1a25;
    --text-light: #f0f0f5;
    --text-muted: #8888aa;
    --font-main: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.chat-container {
    width: 100%;
    max-width: 500px;
    height: 80vh;
    max-height: 700px;
    background: var(--bg-panel);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid #2a2a3a;
}

.chat-header {
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid #2a2a3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    font-size: 32px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-details h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-light);
}

.status {
    font-size: 12px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

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

.clear-btn {
    background: transparent;
    border: 1px solid #3a3a4a;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: #2a2a3a;
    color: var(--text-light);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

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

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message.user {
    align-self: flex-end;
}

.message.bot {
    align-self: flex-start;
}

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

.message.user .message-content {
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background: var(--bg-card);
    border: 1px solid #2a2a3a;
    border-bottom-left-radius: 4px;
}

.message-content p {
    margin: 0 0 8px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.message-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.message-content li {
    margin: 4px 0;
}

.message-content strong {
    color: var(--primary-glow);
}

.timestamp {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.message.user .timestamp {
    text-align: right;
}

.message.bot .timestamp {
    text-align: left;
}

.typing-indicator {
    padding: 20px;
}

.typing-indicator .message-content {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input-area {
    padding: 16px 20px;
    background: var(--bg-card);
    border-top: 1px solid #2a2a3a;
    display: flex;
    gap: 12px;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #3a3a4a;
    border-radius: 12px;
    background: var(--bg-dark);
    color: var(--text-light);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input-area input::placeholder {
    color: var(--text-muted);
}

.chat-input-area input:focus {
    border-color: var(--primary);
}

#send-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

#send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 102, 0, 0.3);
}

#send-btn svg {
    width: 20px;
    height: 20px;
}

.quick-commands {
    padding: 12px 20px;
    background: var(--bg-panel);
    border-top: 1px solid #2a2a3a;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-commands button {
    padding: 8px 14px;
    border: 1px solid #3a3a4a;
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-commands button:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.mono {
    font-family: var(--font-mono);
    background: var(--bg-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    word-break: break-all;
}

.action-card {
    background: var(--bg-dark);
    border: 1px solid var(--secondary);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.action-card.success {
    border-color: var(--secondary);
}

.action-card.error {
    border-color: #ff4444;
}

.action-card .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.action-card .value {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-light);
    word-break: break-all;
}

/* Embed mode styles */
body.embed-mode {
    background: transparent;
    padding: 0;
}

body.embed-mode .chat-container {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

body.embed-mode .chat-header {
    flex-shrink: 0;
}

body.embed-mode .chat-messages {
    flex: 1;
    min-height: 0;
}
