:root {
    /* Color Palette - Metallic / Claude-like */
    --bg-color: #f7f7f8;
    --main-surface: #ffffff;
    --border-color: #e5e5e5;
    --text-primary: #1e1e1e;
    --text-secondary: #5e5e60;
    --accent-color: #3f3f46;
    --accent-hover: #27272a;
    --user-msg-bg: #ececf1;
    --ai-msg-bg: #ffffff;
    --button-bg: #f4f4f5;
    --button-border: #d4d4d8;
    
    /* Layout */
    --max-width: 800px;
    --nav-height: 70px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-metallic: inset 0 1px 0 rgba(255,255,255,0.6), 0 2px 4px rgba(0,0,0,0.05);
    
    /* Typography */
    --font-family: 'Hind Siliguri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 18px; /* Large for older people */
    --font-size-lg: 22px;
    
    /* Transitions */
    --transition-fast: 0.15s ease-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    height: 100%;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Base UI Elements */
a {
    color: #0b57d0;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
    background: var(--main-surface);
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-links a:hover, .nav-links a.active {
    background: var(--button-bg);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

/* Main Layout */
.main-content {
    padding-top: var(--nav-height);
    height: calc(100% - 50px); /* Minus footer */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-section {
    display: none;
    width: 100%;
    max-width: var(--max-width);
    flex: 1;
    height: 100%;
    flex-direction: column;
}

.page-section.active-section {
    display: flex;
    animation: fadeIn var(--transition-fast);
}

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

/* Chat Section Specifics */
.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
    padding-bottom: 150px; /* Space for fixed interaction area */
}

.welcome-screen {
    text-align: center;
    margin-top: 10vh;
    color: var(--accent-color);
}

.welcome-screen h1 {
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 600;
}

.welcome-screen p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Message Bubbles */
.message {
    display: flex;
    max-width: 85%;
    animation: fadeIn var(--transition-fast);
}

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

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

.message-content {
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 18px;
    box-shadow: var(--shadow-sm);
    word-break: break-word;
}

.message.user .message-content {
    background-color: var(--user-msg-bg);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}

.message.ai .message-content {
    background-color: var(--ai-msg-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.message-content img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    max-height: 300px;
}

/* Markdown specific inside message */
.message-content p { margin-bottom: 8px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content strong { font-weight: 700; color: #000; }
.message-content ul, .message-content ol { margin-left: 20px; margin-bottom: 8px;}

/* Interaction Area (Fixed at bottom) */
.interaction-area {
    position: fixed;
    bottom: 50px; /* Above footer */
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 15px 15px 15px;
    background: linear-gradient(0deg, var(--bg-color) 70%, transparent 100%);
}

.suggested-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: var(--max-width);
    width: 100%;
    justify-content: center;
    margin-bottom: 12px;
}

.action-btn {
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.action-btn:hover {
    background: #e4e4e7;
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(1px);
}

.input-container {
    width: 100%;
    max-width: var(--max-width);
    background: var(--main-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: flex-end; /* Align to bottom so multi-line text expands up */
    padding: 10px;
    gap: 10px;
    position: relative;
    /* Metallic look */
    background: linear-gradient(180deg, #ffffff 0%, #f9f9fb 100%);
    box-shadow: var(--shadow-metallic);
}

.input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.image-preview-hidden {
    display: none;
}

#image-preview-container:not(.image-preview-hidden) {
    display: inline-block;
    position: relative;
    margin-bottom: 8px;
    padding: 8px;
    background: var(--button-bg);
    border-radius: 8px;
    width: fit-content;
}

#image-preview {
    max-height: 60px;
    max-width: 60px;
    border-radius: 4px;
    object-fit: cover;
}

#remove-image-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#user-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 18px;
    font-family: inherit;
    resize: none;
    outline: none;
    padding: 5px 0;
    color: var(--text-primary);
}

.upload-btn, .send-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.upload-btn:hover { background: var(--button-bg); color: var(--accent-color); }
.send-btn { background: var(--accent-color); color: white; margin-bottom: 2px;}
.send-btn:hover { background: var(--accent-hover); }

/* Info Cards (About / Contact) */
.info-card {
    background: var(--main-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 30px;
    box-shadow: var(--shadow-sm);
}

.info-card h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--accent-color);
    border-bottom: 2px solid var(--button-bg);
    padding-bottom: 10px;
}

.info-card p {
    font-size: 20px;
    margin-bottom: 20px;
}

.info-item {
    font-size: 20px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--button-bg);
    border-radius: 8px;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    color: white;
    text-align: center;
    transition: opacity var(--transition-fast);
}

.call-btn { background: #0b57d0; }
.wa-btn { background: #25D366; color: white !important;}

.btn-primary:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* Footer */
.footer {
    height: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: var(--bg-color);
    font-size: 14px;
    color: var(--text-secondary);
    position: fixed;
    bottom: 0;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
}

.footer a {
    color: var(--text-secondary);
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 0;
}
.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    from { opacity: 0.3; transform: translateY(0); }
    to { opacity: 1; transform: translateY(-4px); }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .nav-links { gap: 5px; }
    .nav-links a { font-size: 16px; padding: 6px 8px; }
    .logo { font-size: 20px; }
    .message { max-width: 95%; }
    .action-btn { font-size: 14px; padding: 8px 12px; }
}
