* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f0f2f5;
    color: #1e1e1e;
}

.container, .chat-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.container h2, .chat-header h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.auth-btns button {
    margin: 10px;
    padding: 12px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.auth-btns button:hover {
    background: #2980b9;
}

.chat-container {
    max-width: 100%;
    height: 100vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-header {
    background: #3498db;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.username {
    font-weight: bold;
    font-size: 18px;
}

.chat-messages {
    height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 70%;
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message.received {
    background: #f0ff0f0;
    align-self: flex-start;
    margin-right: 10px;
}

.message.sent {
    background: #3498db;
    color: white;
    align-self: flex-end;
    margin-left: 10px;
}

.message .reply-to {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
}

.message .timestamp {
    font-size: 0.7em;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ddd;
    background: white;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
    font-size: 16px;
    direction: rtl;
}

.chat-input button {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 12px 20px;
    cursor: pointer;
}

.chat-input button:hover {
    background: #2980b9;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .chat-container {
        margin: 0;
        height: 100vh;
    }
    .chat-messages {
        height: calc(100vh - 220px);
    }
}
