/* assets/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
}

/* Authentication Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.auth-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 400px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.auth-form button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.auth-form button:hover {
    background: #5a6fd8;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Chat Application Styles */
.chat-container {
    display: flex;
    height: 100vh;
    background: white;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
}

.user-info {
    padding: 1rem;
    background: #34495e;
    text-align: center;
}

.groups-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.group-item {
    padding: 10px;
    margin: 5px 0;
    background: #34495e;
    border-radius: 5px;
    cursor: pointer;
}

.group-item.active {
    background: #667eea;
}

.group-item:hover {
    background: #3c5a7a;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.call-buttons button {
    padding: 8px 15px;
    margin-left: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.video-call {
    background: #28a745;
    color: white;
}

.audio-call {
    background: #17a2b8;
    color: white;
}

.messages-container {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    max-width: 70%;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 10px;
    position: relative;
}

.message.own {
    background: #667eea;
    color: white;
    margin-left: auto;
}

.message.other {
    background: white;
    border: 1px solid #e9ecef;
}

.message-sender {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 5px;
}

.message-time {
    font-size: 11px;
    text-align: right;
    margin-top: 5px;
    opacity: 0.7;
}

/* Input Area */
.input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.message-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    margin-right: 10px;
}

.file-input {
    display: none;
}

.file-btn, .send-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: #667eea;
    color: white;
    margin: 0 5px;
}

/* Video Call Modal */
.video-call-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.video-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.video-box {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.video-box video {
    width: 300px;
    height: 200px;
    background: black;
    border-radius: 5px;
}

.call-controls button {
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.end-call {
    background: #dc3545;
    color: white;
}