/* === BASE RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #131314;
    color: #e3e3e3;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* === NAVBAR === */
nav {
    height: 64px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(19, 19, 20, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.brand { font-size: 20px; font-weight: 500; }
.version { 
    font-size: 10px; 
    background: rgba(34, 197, 94, 0.2); 
    color: #4ade80; 
    padding: 2px 6px; 
    border-radius: 4px; 
    margin-left: 8px; 
    font-weight: 700; 
}

.user-avatar { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #4285f4, #9b72cb); 
}

/* === MAIN CHAT WINDOW === */
main {
    flex: 1;
    overflow-y: auto;
    padding-top: 80px;
    padding-bottom: 180px; /* Space for the fixed footer */
}

.chat-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.gemini-gradient {
    background: linear-gradient(70deg, #4285f4 10%, #9b72cb 30%, #d96570 60%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 56px;
    font-weight: 500;
}

.subtitle { font-size: 24px; color: #c4c7c5; margin-top: 8px; }

/* === SUGGESTIONS GRID === */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 40px;
}

.suggestion-card {
    background: #1e1e1f;
    border: 1px solid #3c4043;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.suggestion-card:hover {
    background: #2b2b2b;
    border-color: #4285f4;
}

.icon { display: block; font-size: 24px; margin-bottom: 8px; }

/* === MESSAGE ROWS (1:1 Layout) === */
#messages-container { 
    display: none; 
    flex-direction: column; 
    gap: 40px; 
}

.message-row { 
    display: flex; 
    gap: 16px; 
    width: 100%; 
}

.user-row { justify-content: flex-end; }
.ai-row { justify-content: flex-start; }

.avatar { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    flex-shrink: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.ai-avatar { background: #1e1e1f; border: 1px solid #3c4043; }

.user-bubble { 
    background: #2b2b2b; 
    padding: 12px 20px; 
    border-radius: 20px; 
    max-width: 80%; 
    border: 1px solid #3c4043; 
    line-height: 1.5;
}

/* === MARKDOWN RESPONSES (1:1 Style) === */
.ai-content { flex: 1; }

.markdown-body { line-height: 1.6; font-size: 16px; color: #e3e3e3; }
.markdown-body h2 { font-size: 20px; font-weight: 600; margin: 24px 0 12px; color: #fff; }
.markdown-body p { margin-bottom: 16px; }
.markdown-body ul, .markdown-body ol { margin-bottom: 16px; padding-left: 24px; }
.markdown-body li { margin-bottom: 8px; }
.markdown-body strong { color: #fff; font-weight: 600; }

/* === CODE BLOCKS === */
.code-block-container {
    margin: 16px 0;
    border: 1px solid #3c4043;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #3c4043;
    font-size: 12px;
    color: #8e918f;
}

.code-header button { 
    background: transparent; 
    border: 1px solid #3c4043; 
    color: #8e918f; 
    padding: 2px 8px; 
    border-radius: 4px; 
    cursor: pointer; 
}

.code-header button:hover { color: #fff; border-color: #fff; }

/* === FIXED FOOTER & INPUT === */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, #131314 80%, transparent);
    padding: 20px 0 30px 0;
    z-index: 100;
}

.input-area-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.input-pill {
    background: #1e1e1f;
    border-radius: 28px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    transition: 0.3s;
}

.input-pill:focus-within {
    border-color: #4285f4;
    background: #28292a;
}

#user-input {
    flex: 1;
    background: transparent;
    color: white;
    border: none;
    outline: none;
    resize: none;
    font-size: 16px;
    font-family: inherit;
    padding: 8px 0;
    min-height: 40px;
    max-height: 200px;
}

#send-btn {
    background: transparent;
    color: #8e918f;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

#send-btn.active { color: #4285f4; }
#send-btn:hover:not(:disabled) { background: rgba(66, 133, 244, 0.1); }

.made-by { 
    text-align: center; 
    color: #8e918f; 
    font-size: 11px; 
    margin-top: 15px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

/* === THINKING ANIMATION === */
.loading-container { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    padding-top: 10px; 
}

.thinking-bar {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #1e1e1f 25%, #4285f4 50%, #1e1e1f 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite linear;
}

@keyframes loading { 
    0% { background-position: 200% 0; } 
    100% { background-position: -200% 0; } 
}

.no-scrollbar::-webkit-scrollbar { display: none; }