/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fafafa;
    display: flex;
    justify-content: center;
}

/* Container Layout */
.container {
    display: flex;
    max-width: 1000px;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #fff;
    padding: 20px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid #ddd;
    transition: width 0.3s ease-in-out;
}

.insta-logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    padding: 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

nav ul li:hover {
    background: #f0f0f0;
    border-radius: 5px;
}

/* Main Content */
main {
    margin-left: 270px;
    padding: 20px;
    width: 100%;
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.profile-pic-container {
    margin-right: 20px;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #ddd;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.verified-icon {
    color: #0095f6;
}

.follow-btn, .message-btn {
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s ease;
}

.follow-btn {
    background: #0095f6;
    color: white;
}

.follow-btn:hover {
    background: #0073e6;
}

.message-btn {
    background: #e0e0e0;
}

.message-btn:hover {
    background: #ccc;
}

.stats {
    display: flex;
    gap: 20px;
    margin: 10px 0;
    font-size: 16px;
    color: black;
}

.stats span {
    font-weight: bold;
}

/* Bio */
.bio {
    font-size: 14px;
    line-height: 1.5;
}

/* Stories Section */
.stories {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.story img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #ccc;
    transition: transform 0.3s;
}

.story img:hover {
    transform: scale(1.1);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.tab {
    padding: 8px;
    transition: 0.2s;
}

.tab:hover {
    color: #0095f6;
}

.active {
    color: #000;
    border-bottom: 2px solid black;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.posts-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.posts-grid img:hover {
    transform: scale(1.05);
}

/* 🔥 RESPONSIVE DESIGN 🔥 */
@media screen and (max-width: 1024px) {
    .container {
        max-width: 100%;
    }

    .sidebar {
        width: 200px;
    }

    main {
        margin-left: 220px;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 10px;
    }

    .insta-logo {
        display: none; /* Hide Instagram text logo */
    }

    nav ul li {
        font-size: 14px;
        justify-content: center;
    }

    nav ul li i {
        font-size: 20px; /* Only show icons */
    }

    main {
        margin-left: 80px;
        padding: 10px;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-info {
        align-items: center;
    }

    .stats {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .follow-btn, .message-btn {
        width: 100%;
        margin-top: 5px;
    }

    .stories {
        overflow-x: auto;
        display: flex;
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .story {
        flex: 0 0 auto;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .sidebar {
        display: none; /* Hide sidebar completely on small screens */
    }

    main {
        margin-left: 0;
        padding: 10px;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-info {
        align-items: center;
    }

    .stats {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .stories {
        overflow-x: auto;
        display: flex;
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .story {
        flex: 0 0 auto;
    }

    .posts-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
