/* =================================================================== 1. GLOBAL VARIABLES & RESET ================================================================= */ :root { --bg-deep-dark: #0a192f; --bg-medium-dark: #172a46; --bg-light-dark: #2c3e50; --text-bright: #ccd6f6; --text-normal: #bdc3c7; --text-muted: #8892b0; --accent-primary: #64ffda; --accent-primary-darker: #52d3b4; --accent-primary-text: #0a192f; --border-color: #304a6e; --card-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-deep-dark); color: var(--text-normal); /* Vital for a full-screen chat app layout */ height: 100vh; height: 100dvh; /* Dynamic viewport height for mobile browsers */ display: flex; flex-direction: column; overflow: hidden; /* Prevent body scroll, only chat window scrolls */ } a { text-decoration: none; color: inherit; } /* =================================================================== 2. HEADER & NAVIGATION (Responsive) ================================================================= */ header { background-color: var(--bg-medium-dark); padding: 1rem 5%; border-bottom: 1px solid var(--border-color); flex-shrink: 0; /* Header never shrinks */ z-index: 100; } nav { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; } .logo { font-size: 1.5rem; font-weight: bold; color: var(--accent-primary); } nav ul { list-style: none; display: flex; gap: 1.5rem; } nav a { color: var(--text-normal); font-weight: 500; padding: 0.5rem 0; transition: color 0.3s; font-size: 0.95rem; } nav a:hover, nav a.active { color: var(--accent-primary); border-bottom: 2px solid var(--accent-primary); } /* =================================================================== 3. MAIN CHAT LAYOUT ================================================================= */ main { flex-grow: 1; /* Takes up all remaining vertical space */ display: flex; flex-direction: column; width: 100%; max-width: 1000px; margin: 0 auto; padding: 20px; overflow: hidden; /* Contains the scrollable chat area */ } .chat-container { background-color: var(--bg-medium-dark); border-radius: 12px; box-shadow: var(--card-shadow); border: 1px solid var(--border-color); display: flex; flex-direction: column; height: 100%; /* Fills the main area */ overflow: hidden; position: relative; } /* --- Header Area --- */ .chat-header { padding: 15px 20px; background-color: var(--bg-light-dark); border-bottom: 1px solid var(--border-color); text-align: center; flex-shrink: 0; } .chat-header h1 { margin: 0; font-size: 1.25rem; color: var(--accent-primary); } .chat-header p { margin: 5px 0 0; color: var(--text-muted); font-size: 0.85rem; } /* --- Chat Window (Scrollable Area) --- */ .chat-window { flex-grow: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; scroll-behavior: smooth; background-color: rgba(10, 25, 47, 0.5); /* Subtle inner shadow */ } /* Custom Scrollbar */ .chat-window::-webkit-scrollbar { width: 8px; } .chat-window::-webkit-scrollbar-track { background: var(--bg-deep-dark); } .chat-window::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; } /* --- Messages --- */ .message { max-width: 80%; padding: 12px 16px; border-radius: 18px; line-height: 1.5; word-wrap: break-word; animation: fadeIn 0.3s ease-in; font-size: 0.95rem; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .bot-message { align-self: flex-start; background-color: var(--bg-light-dark); color: var(--text-bright); border-bottom-left-radius: 2px; border: 1px solid var(--border-color); } .user-message { align-self: flex-end; background-color: var(--accent-primary); color: var(--accent-primary-text); border-bottom-right-radius: 2px; font-weight: 500; box-shadow: 0 2px 10px rgba(100, 255, 218, 0.2); } /* --- Input Area --- */ .chat-input-area { display: flex; padding: 15px; background-color: var(--bg-light-dark); border-top: 1px solid var(--border-color); gap: 10px; flex-shrink: 0; } #user-input { flex-grow: 1; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 25px; background-color: var(--bg-deep-dark); color: var(--text-bright); font-size: 1rem; /* Keeps iOS from zooming in */ transition: border-color 0.3s; } #user-input:focus { outline: none; border-color: var(--accent-primary); } .chat-input-area button { background-color: var(--accent-primary); color: var(--accent-primary-text); border: none; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, background-color 0.2s; flex-shrink: 0; } .chat-input-area button:hover { background-color: var(--accent-primary-darker); transform: scale(1.05); } .chat-input-area button svg { width: 20px; height: 20px; } /* =================================================================== 4. CONTENT FORMATTING (Markdown Support) ================================================================= */ .bot-message ul, .bot-message ol { margin: 8px 0 !important; padding-left: 20px !important; list-style-type: disc !important; display: block !important; } .bot-message li { margin-bottom: 4px !important; display: list-item !important; } .bot-message b, .bot-message strong { color: var(--accent-primary); font-weight: 700; } .bot-message i { opacity: 0.8; font-size: 0.85em; display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); } /* =================================================================== 5. RESPONSIVE MEDIA QUERIES ================================================================= */ /* Tablet & Mobile Navigation */ @media (max-width: 900px) { header { padding: 0.75rem 5%; } nav { flex-direction: column; gap: 0.75rem; } nav ul { flex-wrap: wrap; justify-content: center; gap: 1rem; width: 100%; } } /* Mobile Phones (Full Screen Chat Experience) */ @media (max-width: 600px) { main { padding: 0; /* Remove padding to make it edge-to-edge */ margin: 0; max-width: 100%; /* Calculate height carefully to fit between header and bottom */ height: auto; } .chat-container { border-radius: 0; border-left: none; border-right: none; border-bottom: none; } .chat-header { padding: 10px 15px; } .chat-window { padding: 15px; } .message { max-width: 85%; /* Slightly wider bubbles on small screens */ } .chat-input-area { padding: 10px; } #user-input { padding: 10px 15px; } .chat-input-area button { width: 40px; height: 40px; } }