:root {
    --bg: #000000; --input-bg: #16181c; --border: #2f3336;
    --text: #eff3f4; --dim: #71767b; --accent: #1d9bf0; --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.5; }

/* Landing & Nav */
.nav-bar { display: flex; justify-content: space-between; padding: 20px 40px; align-items: center; }
.logo-wrap { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 22px; }
.logo-icon { width: 36px; height: 36px; background: var(--white); border-radius: 10px; color: #000; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.nav-link { color: var(--text); text-decoration: none; font-weight: 600; margin-right: 20px; }
.cta-small { background: var(--white); color: #000; padding: 8px 18px; border-radius: 20px; font-weight: 700; text-decoration: none; }

/* Hero Section */
.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 80vh; text-align: center; padding: 0 20px; }
.hero-title { font-size: clamp(3rem, 10vw, 5rem); font-weight: 900; line-height: 1; letter-spacing: -3px; margin-bottom: 20px; }
.hero-desc { color: var(--dim); font-size: 1.2rem; max-width: 600px; margin-bottom: 40px; }
.cta-main { background: var(--white); color: #000; padding: 18px 40px; border-radius: 40px; font-size: 1.1rem; font-weight: 800; text-decoration: none; border: none; cursor: pointer; transition: 0.2s; }
.cta-main:hover { transform: scale(1.05); }

/* Auth Card */
.auth-page { display: flex; align-items: center; justify-content: center; height: 100vh; }
.auth-card { background: var(--input-bg); border: 1px solid var(--border); padding: 50px 40px; border-radius: 24px; text-align: center; width: 100%; max-width: 420px; }
.auth-footer {
    margin-top: 25px;
    font-size: 14px;
}

.auth-footer p {
    color: var(--dim);
    margin-bottom: 10px;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-card h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-card p { color: var(--dim); margin-bottom: 30px; }
.back-link { display: block; margin-top: 20px; color: var(--dim); text-decoration: none; font-size: 14px; }

/* Chat UI */
#app { display: flex; flex-direction: column; height: 100vh; }
header { padding: 12px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
#chat-container { flex: 1; overflow-y: auto; padding: 20px; width: 100%; max-width: 800px; margin: 0 auto; }

/* Grok Search Box */
.search-box { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; display: flex; align-items: center; gap: 12px; color: var(--dim); animation: fadeIn 0.3s ease; }
.search-icon { width: 20px; height: 20px; color: var(--white); }
.search-text { font-weight: 500; font-size: 15px; }

/* Messages */
.message { margin-bottom: 35px; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.user::before { content: "You"; display: block; color: var(--dim); font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.cream::before { content: "Cream"; display: block; color: var(--accent); font-size: 13px; font-weight: 800; margin-bottom: 5px; }
.msg-content { font-size: 16px; white-space: pre-wrap; line-height: 1.6; }
.msg-content img { width: 100%; border-radius: 15px; margin-top: 15px; border: 1px solid var(--border); }

/* Input Bar */
footer { padding: 20px; background: var(--bg); }
.input-wrapper { background: var(--input-bg); border: 1px solid var(--border); border-radius: 28px; padding: 10px 15px; display: flex; align-items: center; max-width: 800px; margin: 0 auto; }
#user-input { flex: 1; background: transparent; border: none; color: #fff; outline: none; font-size: 16px; padding: 5px; }
#send-btn { background: var(--white); border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#send-btn svg { width: 18px; fill: #000; }
