:root {
    --primary-color: #007AFF;
    --bg-color: #F2F2F7;
    --bubble-me: #007AFF;
    --bubble-other: #E5E5EA;
    --text-me: #FFFFFF;
    --text-other: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-color);
    height: 100vh;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 600px;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

header {
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #E5E5EA;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.header-info h1 {
    font-size: 17px;
    font-weight: 600;
}

.status {
    font-size: 13px;
    color: #34C759;
}

.message-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
}

.message {
    max-width: 75%;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 16px;
    line-height: 1.4;
    position: relative;
    animation: popIn 0.2s ease-out;
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.message.me {
    align-self: flex-start;
    background-color: var(--bubble-other);
    color: var(--text-other);
    border-bottom-left-radius: 4px;
}

.message.other {
    align-self: flex-end;
    background-color: var(--bubble-me);
    color: var(--text-me);
    border-bottom-right-radius: 4px;
}

.input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #E5E5EA;
    display: flex;
    gap: 10px;
    align-items: center;
}

input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 24px;
    border: 1px solid #E5E5EA;
    font-size: 16px;
    outline: none;
    background: #F2F2F7;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary-color);
    background: white;
}

button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
}

button:active {
    transform: scale(0.95);
}

.empty-state {
    text-align: center;
    color: #8E8E93;
    margin-top: 40px;
    font-size: 15px;
}
