/* استایل سایت مودست سلیقه */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

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

body {
    font-family: 'Vazir', 'Vazir-Bold', sans-serif;
    background-color: #f9f5f7;
    color: #333;
    line-height: 1.6;
    direction: rtl;
    padding-bottom: 60px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* منوی سبز (Navbar) */
.navbar {
    background-color: #4CAF50; /* رنگ سبز */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Vazir', sans-serif;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Vazir', sans-serif;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #e8f5e9;
}

/* کارت‌های پست */
.post {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.post:hover {
    transform: translateY(-3px);
}

.post img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 0.9rem;
    margin-top: 10px;
}

.tags {
    background: #e8f4ff;
    color: #1a73e8;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 15px;
    margin-top: 8px;
    font-size: 0.85rem;
}

/* چت */
.chat-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-top: 20px;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.my-message {
    justify-content: flex-end;
}

.my-message .message-content {
    background: #e3f2fd;
    border-radius: 18px 18px 0 18px;
    padding: 12px 16px;
}

.other-message .message-content {
    background: #f1f1f1;
    border-radius: 18px 18px 18px 0;
    padding: 12px 16px;
}

.message-content strong {
    color: #1a73e8;
    margin-right: 5px;
}

.chat-image {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-form .form-group {
    flex: 1;
}

.chat-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-family: 'Vazir', sans-serif;
}

.chat-form button {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
    transition: background 0.3s;
}

.chat-form button:hover {
    background: #0d5ab5;
}

/* پروفایل */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8f4ff;
    margin-bottom: 15px;
}

.profile-form h2, .user-posts h2 {
    margin-bottom: 20px;
    color: #1a73e8;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Vazir', sans-serif;
}

.form-group input[type="file"] {
    padding: 5px;
}

/* فرم‌ها */
.container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a73e8;
}

.container form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
}

button {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    transition: background 0.3s;
}

button:hover {
    background: #0d5ab5;
}

.error {
    background: #ffebee;
    color: #d32f2f;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.success {
    background: #e8f5e9;
    color: #388e3c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* فوتر */
footer {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: #f0f0f0;
    padding: 8px 15px;
    border-radius: 5px;
    font-family: 'Vazir', sans-serif;
    font-size: 0.9rem;
    color: #555;
    z-index: 100;
}

/* مدیریت پنل (فقط برای پنل مدیریت) */
.admin-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.admin-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.admin-section h2 {
    margin-bottom: 15px;
    color: #1a73e8;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.users-table th, .users-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.users-table th {
    background-color: #e3f2fd;
    font-weight: bold;
}

.users-table tr:hover {
    background-color: #f5f9ff;
}

.btn {
    display: inline-block;
    background: #1a73e8;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Vazir', sans-serif;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: #0d5ab5;
}

.logout-btn {
    background: #d32f2f;
}

.logout-btn:hover {
    background: #b71c1c;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .post {
        padding: 15px;
    }
    
    .chat-container {
        padding: 15px;
    }
    
    .chat-messages {
        height: 400px;
    }
    
    .chat-form {
        flex-direction: column;
    }
    
    .chat-form button {
        width: 100%;
    }
}