/* ========================================== */
/* 4. STYLESHEET */
/* ========================================== */
/* File: assets/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #f0f2f5;
}

.navbar {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #1877f2;
    text-decoration: none;
}

.logo span {
    color: #333;
}

.nav-links a {
    margin-left: 25px;
    text-decoration: none;
    color: #444;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #1877f2;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Auth Cards */
.auth-card {
    max-width: 450px;
    margin: 50px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    padding: 30px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1877f2;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, 
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24,119,242,0.1);
}

.btn {
    background: #1877f2;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    transition: 0.2s;
}

.btn:hover {
    background: #166fe5;
}

/* Profile Page */
.profile-header {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cover-area {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 200px;
    position: relative;
}

.avatar-area {
    text-align: center;
    margin-top: -60px;
}

.avatar-area img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #fff;
    object-fit: cover;
}

.profile-info {
    padding: 20px;
    text-align: center;
}

.profile-info h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.stat {
    text-align: center;
}

.stat .number {
    font-weight: bold;
    font-size: 18px;
    color: #1877f2;
}

/* Posts Feed */
.create-post {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-input {
    width: 100%;
    border: none;
    resize: none;
    font-size: 16px;
    padding: 10px 0;
}

.post-input:focus {
    outline: none;
}

.post-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.post-author {
    font-weight: 600;
    text-decoration: none;
    color: #333;
}

.post-time {
    font-size: 12px;
    color: #777;
}

.post-content {
    margin-bottom: 15px;
    line-height: 1.5;
}

.post-media img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

/* Messenger */
.messenger-container {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 70vh;
}

.contacts-sidebar {
    width: 320px;
    border-right: 1px solid #e4e6eb;
    background: #fff;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 1px solid #f0f2f5;
}

.contact-item:hover,
.contact-item.active {
    background: #f0f2f5;
}

.contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.contact-name {
    font-weight: 500;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 70%;
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.message-sent {
    align-self: flex-end;
    background: #1877f2;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message-received {
    align-self: flex-start;
    background: #e4e6eb;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e4e6eb;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
}

.send-btn {
    background: #1877f2;
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 25px;
    cursor: pointer;
}

/* Story Page */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.story-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.story-card:hover {
    transform: translateY(-5px);
}

.story-media img,
.story-media video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.story-info {
    padding: 12px;
    text-align: center;
}