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

/* Top Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: 100%;
    height: 60px;
    background: white;
    border-bottom: 1px solid #dbdbdb;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.top-nav-content {
    max-width: 600px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-download-btn {
    height: 40px;
    width: auto;
    transition: opacity 0.2s;
}

.nav-download-btn:hover {
    opacity: 0.8;
}

/* Tab Bar Interstitial */
.tab-interstitial {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: 100%;
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #dbdbdb;
    z-index: 99;
}

.tab-interstitial h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #262626;
}

.tab-interstitial p {
    font-size: 14px;
    color: #737373;
    margin-bottom: 20px;
    line-height: 1.4;
}

.interstitial-btn {
    display: block;
    background: rgb(255, 150, 79);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin: 0 auto 15px;
    max-width: 300px;
}

.interstitial-links {
    font-size: 14px;
    color: #262626;
}

.interstitial-links a {
    color: #0095f6;
    text-decoration: none;
    font-weight: 600;
}

/* Bottom Tab Bar */
.bottom-tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: 100%;
    height: 50px;
    background: white;
    border-top: 1px solid #dbdbdb;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
    color: #262626;
    transition: opacity 0.2s;
    cursor: pointer;
}

.tab-item:hover {
    opacity: 0.6;
}

.tab-item.active {
    color: #000;
}

.tab-icon {
    font-size: 26px;
    line-height: 1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #333;
    padding-top: 60px;
    /* Add this */
    padding-bottom: 240px;
    /* Add this */
}

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

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.post-item {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.post-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 8px;
    border-radius: 0 0 10px 0;
}

.post-profile-pic {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
}

.like-section {
    display: flex;
    align-items: center;
    gap: 4px;
}

.like-count {
    color: white;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.heart-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: transform 0.1s;
}

.heart-btn:hover {
    transform: scale(1.2);
}

.heart-btn:active {
    transform: scale(0.9);
}

.post-item:hover {
    transform: scale(1.05);
}

/* Overlay styles */
.like-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.like-overlay.show {
    display: flex;
}

.like-modal {
    background: white;
    padding: 40px 20px;
    border-radius: 20px;
    text-align: center;
    max-width: 350px;
    width: 90%;
    color: black;
}

.like-heart {
    font-size: 60px;
    color: #e91e63;
    margin-bottom: 20px;
}

.like-modal h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.2;
}

.like-modal p {
    color: #999;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.4;
}

.like-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-download {
    background: transparent;
    color: #1da1f2;
    padding: 15px 30px;
    border: 2px solid #1da1f2;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.close-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

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

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}