/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #FAFAFA;
    color: #262626;
    max-width: 470px;
    margin: 0 auto;
}

/* ========== HEADER ========== */
.hero {
    background: white;
    border-bottom: 1px solid #DBDBDB;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 8px 0;
}

.hero .container {
    max-width: 470px;
    margin: 0 auto;
    padding: 0 16px;
}

.instagram {
    width: 105px;
    height: auto;
}

/* ========== FEED ========== */
#feed {
    max-width: 470px;
    margin: 0 auto;
}

/* ========== POST CARD ========== */
.post {
    background: white;
    border: 1px solid #DBDBDB;
    margin-bottom: 24px;
}

/* ========== POST HEADER ========== */
.post-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 12px;
}

.post-header .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
    padding: 2px;
    cursor: pointer;
}

.post-header .name {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified {
    color: #0095F6;
    font-size: 12px;
}

.location {
    font-size: 12px;
    color: #737373;
    margin-top: 2px;
}

/* ========== POST IMAGE ========== */
.post-img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    user-select: none;
}

/* ========== POST FOOTER ========== */
.post-footer {
    padding: 0 16px 8px;
}

/* ========== ICONS ========== */
.icons {
    display: flex;
    gap: 16px;
    padding: 8px 0;
}


.icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.icon:hover {
    opacity: 0.6;
}

.icon:active {
    transform: scale(0.9);
}

.liked {
    filter: none;
    animation: likeAnimation 0.4s ease;
}

@keyframes likeAnimation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ========== LIKES & CAPTION ========== */
.likes {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 8px;
}

.caption {
    font-size: 14px;
    color: #262626;
    margin-bottom: 8px;
    line-height: 18px;
}

.caption strong {
    font-weight: 600;
    margin-right: 4px;
}

/* ========== COMMENTS SECTION ========== */
.comments {
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.comment {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 14px;
    color: #262626;
    margin-bottom: 6px;
    line-height: 18px;
}

.comment strong {
    font-weight: 600;
    margin-right: 4px;
}

.time {
    color: #8E8E8E;
    font-size: 12px;
    margin-left: 6px;
}

.comment-like {
    cursor: pointer;
    font-size: 12px;
    user-select: none;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.comment-like:active {
    transform: scale(1.3);
}

/* ========== COMMENT BOX ========== */
.comment-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #EFEFEF;
}

.comment-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #262626;
    background: transparent;
}

.comment-box input::placeholder {
    color: #8E8E8E;
}


.comment-box button {
    background: none;
    border: none;
    color: #0095F6;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.comment-box button:hover {
    color: #00376B;
}

.comment-box button:disabled {
    color: #B2DFFC;
    cursor: default;
}

/* ========== SCROLLBAR STYLING ========== */
.comments::-webkit-scrollbar {
    width: 4px;
}

.comments::-webkit-scrollbar-track {
    background: #FAFAFA;
}

.comments::-webkit-scrollbar-thumb {
    background: #DBDBDB;
    border-radius: 4px;
}

body.dark-mode .instagram {
    filter: invert(1) brightness(2);
}