/* Instagram-Style Network CSS */
.network-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

/* Stories Bar */
.stories-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    scrollbar-width: none; /* Firefox */
}
.stories-container::-webkit-scrollbar {
    display: none; /* Chrome */
}

.story-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 3px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.story-ring:hover {
    transform: scale(1.05);
}
.story-avatar {
    width: 100%;
    height: 100%;
    background: var(--bg-surface);
    border-radius: 50%;
    border: 2px solid var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.story-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.story-name {
    font-size: 0.75rem;
    color: var(--text-primary);
    max-width: 70px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Post Cards */
.insta-post {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
    animation: fadeIn 0.4s ease;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.post-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary, #8b5cf6));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.post-media {
    width: 100%;
    max-height: 600px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}
.post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-media.text-only {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.05));
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.6;
}

/* Double tap heart animation */
.heart-pop {
    position: absolute;
    font-size: 6rem;
    color: #ff3040;
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(255,48,64,0.5));
}
.heart-pop.animate {
    animation: popOut 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes popOut {
    0% { opacity: 0; transform: scale(0.5); }
    15% { opacity: 1; transform: scale(1.2); }
    30% { opacity: 1; transform: scale(1); }
    70% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.5); }
}

.post-actions {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.1s ease;
    padding: 0;
    display: flex;
    align-items: center;
}
.action-btn:hover {
    color: var(--text-muted);
}
.action-btn:active {
    transform: scale(0.9);
}
.action-btn.liked {
    color: #ff3040;
}
.action-btn.liked:hover {
    color: #ff5260;
}

.post-likes {
    padding: 0 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.post-caption {
    padding: 0 1rem 0.5rem;
    font-size: 0.95rem;
}

.post-time {
    padding: 0 1rem 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.post-comments {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
}

.comment-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.comment-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
}
.comment-input-wrapper input:focus {
    outline: none;
}
.comment-post-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-weight: 600;
    cursor: pointer;
}
.comment-post-btn:disabled {
    color: var(--text-muted);
    cursor: default;
}

/* Post Creator */
.post-creator {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.creator-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    resize: none;
    outline: none;
    margin-bottom: 1rem;
}
.creator-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}
.image-url-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    color: var(--text-primary);
    width: 250px;
    font-size: 0.85rem;
}
