:root {
    --bg-color: #121212;
    --chat-bg: #1e1e1e;
    --primary-color: #4caf50;
    --primary-hover: #45a049;
    --text-color: #e0e0e0;
    --message-user-bg: #2e7d32;
    --message-bot-bg: #333333;
    --input-bg: #2c2c2c;
    --border-color: #444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Hind Siliguri', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 100vh;
    /* Mobile full height */
    background-color: var(--chat-bg);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

@media (min-width: 600px) {
    .app-container {
        height: 90vh;
        border-radius: 12px;
    }
}

header {
    background-color: rgba(30, 30, 30, 0.95);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    backdrop-filter: blur(10px);
    z-index: 10;
}

header h1 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

header p {
    font-size: 0.8rem;
    color: #888;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.bot-message .message-content {
    background-color: var(--message-bot-bg);
    border-bottom-left-radius: 2px;
}

.user-message .message-content {
    background-color: var(--message-user-bg);
    color: white;
    border-bottom-right-radius: 2px;
}

.message img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 5px;
}

.input-area {
    padding: 15px;
    background-color: var(--chat-bg);
    border-top: 1px solid var(--border-color);
}

.image-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

.image-preview img {
    height: 60px;
    border-radius: 6px;
    border: 1px solid var(--primary-color);
}

.image-preview button {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--input-bg);
    padding: 8px 12px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.input-controls:focus-within {
    border-color: var(--primary-color);
}

textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    outline: none;
    max-height: 100px;
}

.icon-btn {
    cursor: pointer;
    font-size: 1.2rem;
    color: #aaa;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--primary-color);
}

.send-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.send-btn:hover {
    background-color: var(--primary-hover);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}