
:root {
    --primary: #405DE6; /* Instagram blue */
    --secondary: #833AB4; /* Instagram purple */
    --accent: #E1306C; /* Instagram pink */
    --light: #FAFAFA; /* Instagram background */
    --dark: #262626; /* Instagram dark text */
    --gray: #8E8E8E;
    --white: #FFFFFF;
    --border: #DBDBDB; /* Instagram border */
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --like-red: #ED4956; /* Instagram like red */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 935px; /* Instagram width */
    margin: 0 auto;
    padding: 30px 20px;
}

/* Profile Header */
.profile-header {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.profile-top {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-right: 30px;
}

.profile-stats {
    display: flex;
    flex-grow: 1;
    justify-content: space-around;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.profile-details {
    padding: 0 10px;
}

.username {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
}

.profile-bio {
    color: var(--dark);
    margin-bottom: 15px;
    line-height: 1.5;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--gray);
}

.meta-item i {
    margin-right: 8px;
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-link {
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

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

.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.facebook {
    background: #3b5998;
}

.twitter {
    background: #1DA1F2;
}

/* Posts Grid */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-right: 15px;
}

.header-line {
    flex-grow: 1;
    height: 1px;
    background-color: var(--border);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(293px, 1fr));
    gap: 20px;
}

.post-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.post-media {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.post-media img,
.post-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 10px;
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 15px;
    opacity: 0;
    transition: var(--transition);
}

.post-card:hover .post-overlay {
    opacity: 1;
}

.post-caption {
    color: white;
    font-size: 0.9rem;
    margin: 0;
}

/* Engagement Bar */
.engagement-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
}

.engagement-left {
    display: flex;
    gap: 15px;
}

.engagement-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--dark);
    transition: var(--transition);
}

.engagement-btn:hover {
    transform: scale(1.1);
}

.engagement-btn.like-btn:hover {
    color: var(--like-red);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    grid-column: 1 / -1;
    border: 1px solid var(--border);
}

.empty-icon {
    font-size: 2.5rem;
    color: var(--border);
    margin-bottom: 15px;
}

.empty-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.empty-text {
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-avatar {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .profile-stats {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 20px;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }
}