/* Ümumi parametrlər */
:root {
    --primary-color: #8e44ad;
    --primary-dark: #732d91;
    --primary-light: #9b59b6;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-text: #777;
    --background-color: #f5f5f5;
    --white: #ffffff;
    --gray-light: #f0f0f0;
    --gray: #ddd;
    --gray-dark: #aaa;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ekranlar */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.screen.active {
    display: flex;
}

/* Giriş ekranı */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.app-logo {
    text-align: center;
    margin-bottom: 50px;
}

.app-logo i {
    font-size: 80px;
    margin-bottom: 20px;
}

.app-logo h1 {
    font-size: 28px;
    font-weight: 300;
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

/* Formalar */
.form-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--white);
}

.form-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--white);
}

.back-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.form-header h2 {
    font-size: 20px;
    font-weight: 500;
}

#login-form, #register-form {
    padding: 30px 20px;
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.2);
}

/* Düymələr */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: var(--gray-light);
}

/* Əsas tətbiq */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

.app-title {
    font-size: 24px;
    font-weight: 500;
}

.header-right {
    display: flex;
    gap: 15px;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 70px; /* Aşağı menyu üçün yer */
}

/* Aşağı menyu */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    background-color: var(--white);
    border-top: 1px solid var(--gray);
    padding: 10px 0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    flex: 1;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 5px;
}

.nav-item span {
    font-size: 12px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item:hover:not(.active) {
    background-color: var(--gray-light);
}

/* Səhifələr */
.page {
    display: none;
    height: 100%;
}

.page.active {
    display: block;
}

/* Söhbətlər siyahısı */
.chats-list {
    background-color: var(--white);
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
    transition: var(--transition);
}

.chat-item:hover {
    background-color: var(--gray-light);
}

.chat-avatar {
    position: relative;
    margin-right: 15px;
}

.chat-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: var(--success-color);
    border: 2px solid var(--white);
    border-radius: 50%;
}

.chat-info {
    flex: 1;
}

.chat-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.chat-preview {
    font-size: 14px;
    color: var(--light-text);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.chat-time {
    font-size: 12px;
    color: var(--light-text);
}

.unread-badge {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Status səhifəsi */
.status-container {
    background-color: var(--white);
}

.my-status {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
}

.status-avatar {
    position: relative;
    margin-right: 15px;
}

.status-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.add-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid var(--white);
}

.status-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.status-info p {
    color: var(--light-text);
    font-size: 14px;
}

.recent-status {
    padding: 20px;
}

.recent-status h4 {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.status-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
}

.status-item:last-child {
    border-bottom: none;
}

/* Söhbət səhifəsi */
.chat-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

.chat-user-info {
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: 15px;
}

.chat-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.chat-user-info h3 {
    font-size: 18px;
    font-weight: 500;
}

.chat-user-info p {
    font-size: 14px;
    opacity: 0.9;
}

.chat-actions {
    display: flex;
    gap: 15px;
}

.chat-messages {
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 130px);
    background-color: #e5ddd5;
    background-image: url('assets/images/chat-bg.png');
    background-size: cover;
}

.message {
    display: flex;
    margin-bottom: 20px;
    max-width: 80%;
}

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

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

.message-avatar {
    align-self: flex-end;
    margin: 0 10px;
}

.message-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    background-color: var(--white);
    padding: 10px 15px;
    border-radius: 18px;
    border-top-left-radius: 4px;
    box-shadow: var(--shadow);
    position: relative;
}

.message.sent .message-content {
    background-color: #dcf8c6;
    border-top-right-radius: 4px;
    border-top-left-radius: 18px;
}

.message-text {
    margin-bottom: 5px;
}

.message-time {
    font-size: 11px;
    color: var(--light-text);
    text-align: right;
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--white);
    border-top: 1px solid var(--gray);
    position: absolute;
    bottom: 0;
    width: 100%;
}

#message-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--gray);
    border-radius: 20px;
    font-size: 16px;
    margin: 0 10px;
    transition: var(--transition);
}

#message-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Mobil uyğunluq */
@media (max-width: 768px) {
    .app-logo h1 {
        font-size: 24px;
    }
    
    .app-logo i {
        font-size: 60px;
    }
    
    .message {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .form-header h2 {
        font-size: 18px;
    }
    
    .app-title {
        font-size: 20px;
    }
    
    .nav-item span {
        font-size: 10px;
    }
    
    .message {
        max-width: 95%;
    }
}