.reels-body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    background: #000;
}

.reels-page {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    background: #000;
    position: relative;
}

.reels-container {
    height: 100vh;
    width: 100%;
    max-width: 480px;
    position: relative;
    overflow: hidden;
}

.reel-item {
    height: 100vh;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.45s ease;
}

.reel-item.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    position: relative;
}

.reel-video-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

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

.reel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.25) 100%);
    pointer-events: none;
}

/* Back button */
.reel-back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 30;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.reel-back-btn:hover {
    background: rgba(254, 161, 22, 0.85);
    color: #fff;
    transform: scale(1.05);
}

/* Sound toggle */
.reel-sound-btn {
    position: absolute;
    top: 20px;
    right: 16px;
    z-index: 10;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}

.reel-sound-btn:hover {
    background: rgba(254, 161, 22, 0.6);
}

/* Navigation arrows */
.reel-nav-arrows {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reel-nav-arrow {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.reel-nav-arrow:hover {
    background: rgba(254, 161, 22, 0.3);
    border-color: rgba(254, 161, 22, 0.5);
    transform: scale(1.08);
}

.reel-nav-arrow:active {
    transform: scale(0.93);
}

/* Sidebar actions */
.reel-sidebar {
    position: absolute;
    right: 16px;
    bottom: 170px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reel-sidebar-vendor-wrap {
    position: relative;
    display: inline-flex;
    margin-bottom: 10px;
}

.reel-sidebar-vendor {
    margin: 0;
}

.reel-sidebar-vendor img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
    transition: border-color 0.2s, transform 0.2s;
}

.reel-sidebar-vendor:hover img {
    border-color: #fea116;
    transform: scale(1.05);
}

.sidebar-follow-btn {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #fea116;
    border: 2px solid #000;
    color: #000;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.sidebar-follow-btn i {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}


.sidebar-follow-btn:not(.following):hover {
    background: #e59010;
    transform: scale(1.1);
}

.reel-actions {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.reel-action-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0;
    font-size: 13px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    transition: transform 0.15s;
}

.reel-action-btn i {
    font-size: 24px;
    transition: transform 0.15s;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.reel-action-btn:hover i {
    transform: scale(1.1);
}

.reel-action-btn:active i {
    transform: scale(1.25);
}

.reel-action-btn .action-count {
    font-size: 12px;
    font-weight: 600;
}

.like-btn.liked i {
    color: #ff3040;
    animation: likePop 0.35s ease;
}

@keyframes likePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Bottom footer */
.reel-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px;
    z-index: 10;
    color: #fff;
}
.reel-caption h4 {
    font-size: 16px;
    margin: 0 0 3px;
    font-weight: 700;
    color: #fff;
}

.reel-caption p {
    font-size: 13px;
    margin: 0;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
}

.reel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.reel-tag {
    font-size: 12px;
    color: #fff;
    background: rgba(255,255,255,0.15);
    padding: 3px 12px;
    border-radius: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Comments Modal */
.comments-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.comments-modal.open {
    display: flex;
    align-items: flex-end;
}

.comments-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
}

.comments-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #0f1115;
    border-radius: 20px 20px 0 0;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    color: #fff;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.comments-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.comments-header h3 i {
    color: #fea116;
    font-size: 20px;
}

.close-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.6);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 22px;
    min-height: 120px;
}

.empty-comments {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.35);
}

.empty-comments i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    color: rgba(254, 161, 22, 0.3);
}

.empty-comments p {
    font-size: 16px;
    margin: 0 0 6px;
    color: rgba(255,255,255,0.5);
}

.empty-comments span {
    font-size: 13px;
    color: rgba(255,255,255,0.25);
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.comment-replies {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid rgba(254, 161, 22, 0.2);
}

.comment-item.reply {
    margin-bottom: 10px;
}

.comment-item.reply:last-child {
    margin-bottom: 0;
}

.avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fea116, #e59010);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.avatar-placeholder.sm {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.comment-body {
    flex: 1;
}

.comment-body strong {
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
    color: rgba(255,255,255,0.9);
}

.comment-body p {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255,255,255,0.8);
}

.comment-body small {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
}

.reply-context {
    display: block;
    font-size: 11px;
    color: rgba(254, 161, 22, 0.7);
    margin-bottom: 3px;
    font-style: italic;
}

.reply-btn {
    background: none;
    border: none;
    color: rgba(254, 161, 22, 0.8);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 2px;
    transition: color 0.2s;
}

.reply-btn:hover {
    color: #fea116;
}

.reply-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    margin-bottom: 6px;
    background: rgba(254, 161, 22, 0.08);
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.reply-indicator strong {
    color: #fea116;
}

.cancel-reply-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 18px;
    cursor: pointer;
    margin-left: auto;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.cancel-reply-btn:hover {
    color: #fff;
}

.comments-input-wrapper {
    padding: 14px 22px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.comment-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    padding: 4px;
    transition: border-color 0.2s;
}

.comment-input-group:focus-within {
    border-color: rgba(254, 161, 22, 0.5);
    background: rgba(255,255,255,0.08);
}

.comment-input-group input {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.comment-input-group input::placeholder {
    color: rgba(255,255,255,0.3);
}

.comment-input-group button {
    background: linear-gradient(135deg, #fea116, #e59010);
    border: none;
    color: #000;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 50px;
    transition: transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}

.comment-input-group button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(254, 161, 22, 0.35);
}

.comment-input-group button:active {
    transform: scale(0.97);
}

.spinning {
    animation: spin 0.8s linear infinite;
    font-size: 28px;
    color: rgba(254, 161, 22, 0.5);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Share Modal */
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

.share-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
}

.share-panel {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    background: #0f1115;
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    animation: sharePop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

@keyframes sharePop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.share-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.share-header h3 i {
    color: #fea116;
    font-size: 20px;
}

.close-share-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.6);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.close-share-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.share-body {
    padding: 22px;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s;
}

.share-option:hover {
    transform: translateY(-3px);
}

.share-option:active {
    transform: scale(0.92);
}

.share-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    transition: box-shadow 0.2s;
}

.share-option:hover .share-icon {
    box-shadow: 0 4px 16px rgba(255,255,255,0.15);
}

.share-icon.fb { background: #1877f2; }
.share-icon.tw { background: #000; }
.share-icon.wa { background: #25d366; }
.share-icon.tg { background: #0088cc; }
.share-icon.msgr { background: #00b2ff; }
.share-icon.li { background: #0a66c2; }
.share-icon.pin { background: #e60023; }
.share-icon.red { background: #ff4500; }
.share-icon.copy { background: #555; }
.share-icon.native { background: linear-gradient(135deg, #fea116, #e59010); }

.share-label {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    text-align: center;
    line-height: 1.2;
    max-width: 64px;
}

/* Hide home layout header/footer on reels page */
.reels-body header,
.reels-body .main-header,
.reels-body .main-footer {
    display: none !important;
}
