/* ============================================================
   KRADS — Instagram Profile Page (Dark Mode Clone)
   Complete clean rewrite — pixel-perfect IG mobile dark theme
   ============================================================ */

/* --- HIDE SITE CHROME ON PORTFOLIO PAGE --- */
body:has(.ig-mobile-wrapper) #krads-header,
body:has(.ig-mobile-wrapper) #krads-footer,
body:has(.ig-mobile-wrapper) .navbar,
body:has(.ig-mobile-wrapper) .custom-cursor,
body:has(.ig-mobile-wrapper) .custom-cursor-outline {
    display: none !important;
}
body:has(.ig-mobile-wrapper) {
    padding-top: 0 !important;
    cursor: default !important;
    background: #000 !important;
}

/* --- PAGE WRAPPER --- */
.ig-mobile-wrapper {
    width: 100%;
    min-height: 100vh;
    background: #000;
    display: flex;
    justify-content: center;
}

.ig-container {
    width: 100%;
    max-width: 475px;
    background: #000;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* --- HIDE IPHONE MOCKUP ELEMENTS --- */
.iphone-dynamic-island,
.ig-mobile-top-bar {
    display: none;
}

/* --- TOP HEADER BAR --- */
.ig-mobile-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #000;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ig-mobile-header .back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px 4px 0;
}

.ig-mobile-header .header-username {
    flex: 1;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.ig-mobile-header .mini-arrow {
    font-size: 0.65rem;
    margin-left: 3px;
    opacity: 0.7;
}

.ig-mobile-header .header-actions {
    display: flex;
    gap: 20px;
    color: #fff;
    font-size: 1.25rem;
}

/* --- SCROLLABLE CONTENT AREA --- */
.ig-container-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 56px;
}

/* --- PROFILE HEADER --- */
.ig-profile-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px 16px 0;
    gap: 28px;
}

.ig-profile-pic-wrap {
    flex-shrink: 0;
}

.ig-story-ring {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ig-profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    background: #000;
    padding: 6px;
    border: 3px solid #000;
}

.ig-profile-info {
    flex: 1;
    min-width: 0;
}

.ig-username-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ig-username {
    font-size: 1.25rem;
    font-weight: 400;
    color: #fff;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.3px;
}

.ig-verified-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
}

/* --- STATS ROW --- */
.ig-stats-row {
    display: flex;
    flex-direction: row;
    padding: 16px 16px 0;
    gap: 0;
}

.ig-stat {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.ig-stat strong {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}

.ig-stat span {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-weight: 400;
}

/* --- BIO --- */
.ig-bio {
    padding: 12px 16px 4px;
}

.ig-category {
    display: block;
    color: rgba(255,255,255,0.45);
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.ig-bio p {
    color: rgba(255,255,255,0.9);
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0 0 6px;
}

/* Contact Info Link */
.ig-contact-info-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.84rem;
    color: rgba(255,255,255,0.9);
}

.ig-contact-info-link i {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

.ig-contact-info-link a {
    color: #fff;
    font-weight: 600;
}

/* Mutual Followers */
.ig-mutual-followers {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: nowrap;
}

.mutual-avatars {
    position: relative;
    width: 48px;
    height: 20px;
    flex-shrink: 0;
}

.mut-av {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #000;
    object-fit: cover;
    position: absolute;
    top: 0;
}
.av1 { left: 0; z-index: 3; }
.av2 { left: 12px; z-index: 2; }
.av3 { left: 24px; z-index: 1; }

.mutual-text {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.25;
    flex: 1;
    min-width: 0;
}

.mutual-text strong {
    color: #fff;
    font-weight: 600;
}

/* --- ACTION BUTTONS ROW --- */
.ig-action-buttons-row {
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 14px 16px;
}

.ig-pill-btn {
    flex: 1;
    height: 34px;
    background: #262626;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}

.ig-pill-btn:hover {
    background: #363636;
}

.ig-pill-btn.square-btn {
    flex: 0 0 34px;
    width: 34px;
}

.btn-chevron {
    font-size: 0.6rem;
    opacity: 0.7;
}

/* --- HIGHLIGHTS --- */
.ig-highlights-wrap {
    padding: 12px 0 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.ig-highlights-wrap::-webkit-scrollbar { display: none; }

.ig-highlights-row {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: max-content;
}

.ig-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ig-hl-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: none;
    border: 1.5px solid rgba(255,255,255,0.25);
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.ig-highlight:hover .ig-hl-ring {
    transform: scale(1.05);
}

.ig-hl-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #262626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #ffde59;
}

.ig-highlight span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    text-align: center;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- TABS ROW --- */
.ig-tabs-row {
    display: flex;
    flex-direction: row;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: #000;
    position: sticky;
    top: 0;
    z-index: 50;
}

.ig-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    gap: 6px;
}

.ig-tab i {
    font-size: 1.1rem;
}

.ig-tab.active {
    color: #fff;
    border-bottom-color: #fff;
}

.ig-tab:hover {
    color: rgba(255,255,255,0.7);
}

/* --- 3-COLUMN FEED GRID --- */
.ig-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.ig-post-thumb {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: #1a1a1a;
}

.ig-post-thumb img,
.ig-post-thumb video,
.ig-post-thumb .ig-thumb-video,
.ig-post-thumb .ig-thumb-video-frame {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ig-post-thumb:hover img,
.ig-post-thumb:hover video {
    filter: brightness(0.75);
}

/* Reel play icon badge */
.ig-reel-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #fff;
    font-size: 0.85rem;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
    z-index: 5;
}

/* Hover overlay with likes/comments */
.ig-post-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 4;
}

.ig-post-thumb:hover .ig-post-overlay {
    opacity: 1;
}

.ig-post-overlay span {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- BOTTOM FOOTER NAV --- */
.ig-mobile-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0;
    background: #000;
    border-top: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.footer-icon {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-icon.active {
    color: #fff;
}

.footer-icon:hover {
    color: #fff;
}

/* --- COMMENT PANEL --- */
.ig-comment-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 475px;
    height: 380px;
    background: #262626;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.5);
}

.ig-comment-panel.active {
    transform: translate(-50%, 0);
}

.panel-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
}

.panel-pull-bar {
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin-bottom: 6px;
}

.panel-header h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.panel-close-btn {
    position: absolute;
    right: 16px;
    top: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.1rem;
    cursor: pointer;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.panel-footer {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    align-items: center;
}

.panel-comment-input {
    flex: 1;
    background: #363636;
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.panel-comment-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.panel-post-btn {
    background: none;
    border: none;
    color: #0095f6;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

/* ============================================================
   POST DETAIL MODAL
   ============================================================ */
.ig-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.ig-modal-overlay.active {
    display: flex;
}

.ig-modal-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 10002;
}

.ig-modal-box {
    background: #262626;
    border-radius: 4px;
    display: flex;
    width: 90vw;
    max-width: 900px;
    height: 85vh;
    max-height: 600px;
    overflow: hidden;
}

.ig-modal-media {
    flex: 1;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.ig-modal-media img,
.ig-modal-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ig-modal-nav {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
}

.ig-nav-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.ig-nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

.ig-modal-side {
    width: 340px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.08);
}

.ig-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ig-modal-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.ig-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ig-modal-user {
    flex: 1;
    min-width: 0;
}

.ig-modal-user-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ig-modal-user-row strong {
    font-size: 0.85rem;
    color: #fff;
}

.ig-modal-user span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

.ig-modal-follow {
    background: #0095f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.ig-modal-caption-area {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.ig-modal-caption {
    margin-bottom: 12px;
}

.ig-caption-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.ig-caption-header strong {
    font-size: 0.85rem;
    color: #fff;
}

#igModalCaption {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
}

.ig-modal-comments {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ig-modal-actions {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 10px 16px;
}

.ig-action-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.ig-action-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.15s;
}

.ig-action-btn:active {
    transform: scale(0.85);
}

.ig-likes-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.ig-modal-date {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ig-add-comment {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 10px;
}

.ig-comment-input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.ig-comment-input::placeholder {
    color: rgba(255,255,255,0.35);
}

.ig-post-comment-btn {
    background: none;
    border: none;
    color: #0095f6;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0.5;
}

/* ============================================================
   REELS SCROLL CONTAINER
   ============================================================ */
.ig-reels-scroll-container {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 50px;
    width: 100%;
    height: calc(100% - 98px);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    background: #000;
    z-index: 150;
    scrollbar-width: none;
}

.ig-reels-scroll-container::-webkit-scrollbar {
    display: none;
}

.ig-reel-scroll-card {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    background: #000;
    overflow: hidden;
}

.reel-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.reel-video-wrapper video,
.ig-reel-scroll-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play & Volume overlay feedback */
.reel-video-overlay-play,
.reel-video-overlay-volume {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 15;
}

.reel-video-overlay-play.active,
.reel-video-overlay-volume.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Reel sidebar actions */
.reel-sidebar-actions {
    position: absolute;
    right: 12px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 20;
}

.reel-sidebar-actions .action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.reel-sidebar-actions .action-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
    cursor: pointer;
    transition: transform 0.15s ease;
}

.reel-sidebar-actions .action-btn:active {
    transform: scale(0.85);
}

.reel-sidebar-actions .action-btn .liked {
    color: #ff304f;
}

.reel-sidebar-actions .action-count,
.reel-sidebar-actions span {
    font-size: 0.72rem;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Reel bottom info */
.reel-bottom-info,
.reel-bottom-details {
    position: absolute;
    bottom: 16px;
    left: 14px;
    right: 65px;
    z-index: 20;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%);
    padding: 20px 0 0;
    pointer-events: auto;
}

.reel-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #fff;
}

.mini-verified {
    display: inline-flex;
    align-items: center;
}

.user-handle,
.reel-user-row strong {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.reel-follow-btn,
.reel-follow-pill {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.8);
    color: #fff;
    border-radius: 6px;
    padding: 3px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.reel-follow-btn:hover,
.reel-follow-pill:hover {
    background: rgba(255,255,255,0.2);
}

.reel-caption {
    color: rgba(255,255,255,0.95);
    font-size: 0.82rem;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

/* Music ticker */
.reel-music-bar,
.reel-music-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.reel-music-bar i,
.reel-music-row i {
    color: #fff;
    font-size: 0.75rem;
}

.reel-music-scroll,
.marquee-text-container {
    overflow: hidden;
    flex: 1;
    height: 16px;
}

.reel-music-text,
.marquee-text {
    color: rgba(255,255,255,0.85);
    font-size: 0.72rem;
    white-space: nowrap;
    display: inline-block;
    animation: musicScroll 9s linear infinite;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

@keyframes musicScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.reel-vinyl {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    overflow: hidden;
    animation: vinylSpin 4s linear infinite;
    flex-shrink: 0;
}

.reel-vinyl img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes vinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Double-tap heart */
@keyframes popupHeart {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    15% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.9; }
    30% { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

.popup-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 5rem;
    color: #ff304f;
    pointer-events: none;
    z-index: 50;
    animation: popupHeart 1s ease forwards;
}

/* ============================================================
   STORY MODAL
   ============================================================ */
.story-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
}

.story-modal-overlay.active {
    display: flex;
}

.story-modal-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 20001;
}

.story-modal-box {
    width: 100%;
    max-width: 400px;
    height: 90vh;
    max-height: 700px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.story-progress-container {
    display: flex;
    gap: 3px;
    padding: 8px 8px 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.story-progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    border-radius: 2px;
}

.story-modal-header {
    position: absolute;
    top: 14px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.story-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.story-user-info strong {
    color: #fff;
    font-size: 0.82rem;
}

.story-time {
    color: rgba(255,255,255,0.5);
    font-size: 0.72rem;
}

.story-control-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.story-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.story-modal-content img,
.story-modal-content video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.story-arrow.prev { left: 12px; }
.story-arrow.next { right: 12px; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.ig-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.4);
}

.ig-empty-state h2 {
    font-size: 1.2rem;
    font-weight: 300;
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 475px) {
    .ig-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .ig-modal-box {
        flex-direction: column;
        width: 95vw;
        height: 90vh;
        max-height: none;
    }
    .ig-modal-media {
        height: 50%;
        min-height: 0;
    }
    .ig-modal-side {
        width: 100%;
        flex: 1;
    }
}

/* Suggestions styles (kept for compatibility but hidden on portfolio) */
.ig-suggestions-wrap { display: none; }
.ig-profile-section { padding: 0; background: #000; min-height: 100vh; }

/* Sound Overlay Badges for Audible Videos */
.modal-video-sound-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.modal-video-sound-badge:hover {
    background: #ffde59;
    color: #000;
    transform: scale(1.05);
}

.reel-sound-overlay-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 12;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.reel-sound-overlay-btn:hover {
    background: rgba(255, 222, 89, 0.9);
    color: #000;
    transform: scale(1.1);
}

/* Instagram-Style Bottom Sheet Modal for Full Captions */
.reel-caption-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.reel-caption-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.reel-caption-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.reel-caption-sheet-content {
    position: relative;
    width: 100%;
    max-width: 475px;
    margin: 0 auto;
    max-height: 75vh;
    background: #121212;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 12px 20px 20px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reel-caption-sheet-overlay.active .reel-caption-sheet-content {
    transform: translateY(0);
}

.sheet-drag-handle {
    width: 42px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto 16px;
    cursor: pointer;
}

.sheet-user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sheet-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #ffde59;
}

.sheet-user-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.sheet-follow-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sheet-follow-btn:hover {
    background: #ffde59;
    color: #000;
}

.sheet-caption-body {
    padding: 16px 0;
    overflow-y: auto;
    flex: 1;
    color: #e4e4e4;
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 45vh;
}

.sheet-caption-body a {
    color: #0095f6;
    text-decoration: none;
}

.sheet-caption-body a:hover {
    text-decoration: underline;
}

.sheet-comment-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.sheet-comment-input {
    flex: 1;
    background: #262626;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 16px;
    color: #fff;
    font-size: 0.88rem;
    outline: none;
}

.sheet-comment-input::placeholder {
    color: #8e8e8e;
}

.sheet-gif-btn {
    background: #262626;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

