* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #121212;
    color: #e5e5e5;
    line-height: 1.5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Header */
.header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid #2a2a2a;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
    color: #ffffff;
}

.header p {
    color: #888;
    font-size: 14px;
}

/* Chat Container */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #161616;
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

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

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

.avatar {
    width: 36px;
    height: 36px;
    background: #2a2a2a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message.user .avatar {
    background: #3a3a3a;
}

.content {
    background: #2a2a2a;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
}

.message.user .content {
    background: #0a84ff;
    color: white;
}

.message.assistant .content {
    background: #252525;
    border: 1px solid #333;
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing span {
    width: 8px;
    height: 8px;
    background: #555;
    border-radius: 50%;
    animation: blink 1.4s infinite;
}

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

@keyframes blink {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Input Area */
.input-container {
    padding: 16px 20px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    gap: 12px;
    background: #1e1e1e;
}

textarea {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #333;
    border-radius: 24px;
    font-family: inherit;
    font-size: 15px;
    resize: none;
    outline: none;
    transition: border 0.2s;
    background: #252525;
    color: #e5e5e5;
}

textarea:focus {
    border-color: #0a84ff;
}

textarea::placeholder {
    color: #666;
}

button {
    background: #0a84ff;
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 24px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.85;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Rate Limit Indicator */
.rate-limit {
    text-align: center;
    padding: 8px 20px;
    font-size: 12px;
    color: #ff9f0a;
    background: #1a1a1a;
    border-top: 1px solid #333;
    display: none;
}

.rate-limit.show {
    display: block;
}

/* Footer */
.footer {
    padding: 16px 20px;
    border-top: 1px solid #2a2a2a;
    text-align: center;
    font-size: 12px;
    color: #666;
    background: #1e1e1e;
}

.testimonials {
    margin-bottom: 12px;
}

.testimonial {
    color: #ff9f0a;
    letter-spacing: 2px;
}

.testimonial-text {
    margin-left: 8px;
    font-style: italic;
}

.links a {
    color: #666;
    text-decoration: none;
    margin: 0 4px;
}

.links a:hover {
    color: #0a84ff;
}