/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #000000;
    line-height: 1.5;
}

/* Container */
.container {
    min-height: 100vh;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* ================================
   Initial View (Google-style)
   ================================ */
.initial-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    animation: fadeIn 0.5s ease-out;
}

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

.logo {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #000000;
}

.tagline {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Input */
.input-wrapper {
    width: 100%;
    max-width: 560px;
    margin-bottom: 1.5rem;
}

.chat-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    outline: none;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #000000;
}

.chat-input::placeholder {
    color: #999999;
}

.chat-input:focus {
    border-color: #000000;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

/* Hint Chips */
.hint-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 560px;
}

.hint-chip {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333333;
}

.hint-chip:hover {
    background: #ebebeb;
    border-color: #d0d0d0;
}

/* ================================
   Chat View
   ================================ */
.chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    animation: fadeIn 0.3s ease-out;
}

/* Chat Header */
.chat-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
}

.logo-small {
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #000000;
}

.header-links {
    display: flex;
    gap: 1rem;
}

.header-link {
    font-size: 0.75rem;
    text-decoration: none;
    color: #666666;
    padding: 0.375rem 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-link:hover {
    color: #000000;
    border-color: #000000;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.875rem 1.125rem;
    border-radius: 18px;
    line-height: 1.5;
    animation: messageIn 0.3s ease-out;
}

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

.message-user {
    align-self: flex-end;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #000000;
}

.message-aia {
    align-self: flex-start;
    background: #f5f5f5;
    color: #000000;
}

.message-aia .sender {
    font-size: 0.75rem;
    font-weight: 500;
    color: #888888;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.message-aia p {
    margin-bottom: 0.75rem;
}

.message-aia p:last-child {
    margin-bottom: 0;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.875rem 1.125rem;
    align-self: flex-start;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #cccccc;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

/* Chat Input Area */
.chat-input-area {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #ffffff;
}

.chat-hints {
    margin-top: 0.75rem;
    justify-content: flex-start;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 640px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1rem;
        text-align: center;
    }
    
    .input-wrapper {
        max-width: 100%;
    }
    
    .hint-chips {
        max-width: 100%;
    }
    
    .chat-input {
        padding: 0.875rem 1rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-header {
        padding: 0.875rem 1rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .chat-input-area {
        padding: 0.875rem 1rem 1.25rem;
    }
}

/* ================================
   Links in messages
   ================================ */
.message a {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.message a:hover {
    text-decoration-thickness: 2px;
}

/* Inline action buttons in messages */
.inline-action {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #333333;
}

.inline-action:hover {
    border-color: #000000;
    color: #000000;
}
