* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.login-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-section input {
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    width: 120px;
}

.login-section button {
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.login-section button:hover {
    background: rgba(255,255,255,0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: 500;
}

.user-info button {
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.user-info button:hover {
    background: rgba(255,255,255,0.3);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.search-bar {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 1rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.search-bar button {
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #764ba2;
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;   /* <-- one column only */
    gap: 1rem;
    margin-bottom: 2rem;
}

.post {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.post-no-image {
    min-height: auto;
}

.post-no-image .post-content {
    padding-bottom: 0;
}

.post-no-image .post-text {
    margin-bottom: 1rem;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.post-user {
    flex: 1;
}

.post-username {
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    transition: color 0.3s;
}

.post-username:hover {
    color: #764ba2;
}

.post-content {
    margin-bottom: 1rem;
}

.post-text {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.post-image {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.post-likes {
    color: #667eea;
    font-weight: 500;
}

.post-comments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.post-comments h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.comment {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.comment-author:hover {
    color: #764ba2;
}

.comment-text {
    color: #333;
    line-height: 1.4;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.user-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.user-username {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.user-real-name {
    color: #666;
    margin-bottom: 1rem;
}

.user-bio {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.4;
}

.profile-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.profile-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 3rem;
}

.profile-info h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: #666;
    margin-bottom: 0.5rem;
}

.back-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    margin-bottom: 2rem;
}

.back-button:hover {
    background: #764ba2;
}

.private-post {
    border-left: 4px solid #ff6b6b;
    background: #fff5f5;
}

.private-label {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.search-results {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-results h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

.search-section {
    margin-bottom: 2rem;
}

.search-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.mb-4 {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .login-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .login-section input {
        width: 200px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
} 