* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--color-background);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 500px;
    height: 100vh; /* Fills screen on mobile */
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: var(--color-surface-light);
    color: var(--text-main);
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1.4;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Received Message (Left) */
.message:nth-child(odd) {
    align-self: flex-start;
    background-color: var(--bg-input);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

/* Sent Message (Right) */
.message:nth-child(even) {
    align-self: flex-end;
    background-color: var(--accent-home);
    color: white;
    border-bottom-right-radius: 4px;
}

.timestamp {
    font-size: 0.7rem;
    opacity: 0.7;
    align-self: flex-end;
}

.input-area {
    padding: 10px 15px 20px 15px;
    background: var(--color-surface-light);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-main);
    border-radius: 24px;
    outline: none;
    font-size: 1rem;
}

.input-area button {
    background: transparent;
    color: var(--accent-home);
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 10px;
}