/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --fb-blue: #1877f2;
    --fb-green: #42b72a;
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f2f5;
    --text-primary: #050505;
    --text-secondary: #65676b;
    --border-color: #e4e6eb;
    --hover-bg: #f2f3f5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* Header */
.fb-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Left */
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    background-color: transparent !important;
    padding: 6px !important;
}

.logo-text {
    color: var(--fb-blue);
    font-size: 28px;
    font-weight: bold;
    letter-spacing: -0.5px;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Icon Buttons */
.icon-button {
    padding: 8px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 40px;
}

.icon-button:hover {
    background-color: var(--hover-bg);
}

.icon-button svg {
    width: 20px;
    height: 20px;
}

/* Messenger Button with Notification Badge */
.messenger-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #e41e3f;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-secondary);
}

/* Main Content */
.main-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 8px 0 32px;
}

/* Video Post */
.video-post {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
}

.post-author {
    display: flex;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.verified-badge {
    width: 16px;
    height: 16px;
    color: var(--fb-blue);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

.globe-icon {
    color: var(--text-secondary);
}

.more-button {
    padding: 8px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.2s;
}

.more-button:hover {
    background-color: var(--hover-bg);
}

/* Post Text */
.post-text {
    padding: 0 12px 12px;
}

.post-text p {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* VSL Smartplayer */
vturb-smartplayer {
    display: block;
    width: 100%;
    height: auto;
}

vturb-smartplayer iframe {
    width: 100%;
    height: auto;
    display: block;
}

/* Old styles - kept for backwards compatibility but not used anymore
.video-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 16px;
}

.overlay-title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 24px;
}

.btn-continue {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--fb-green);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}

.btn-continue:hover {
    opacity: 0.9;
}

.play-icon {
    fill: white;
}

.btn-restart {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-restart:hover {
    color: white;
}
*/

/* Engagement Stats */

.restart-icon {
    color: currentColor;
}

/* Engagement Stats */
.engagement-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

.reactions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.reaction-icons {
    display: flex;
    margin-left: -2px;
}

.reaction-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--bg-secondary);
    font-size: 10px;
}

.reaction-like {
    background: linear-gradient(to bottom, hsl(214, 89%, 60%), hsl(214, 89%, 45%));
    z-index: 3;
    margin-left: 0;
}

.reaction-like svg {
    color: white;
}

.reaction-haha {
    background: linear-gradient(to bottom, hsl(45, 100%, 60%), hsl(40, 100%, 45%));
    z-index: 2;
    margin-left: -4px;
}

.reaction-love {
    background: linear-gradient(to bottom, hsl(0, 84%, 65%), hsl(0, 84%, 50%));
    z-index: 1;
    margin-left: -4px;
}

.reaction-love svg {
    color: white;
}

.reaction-count {
    color: var(--text-secondary);
    font-size: 14px;
    margin-left: 4px;
    transition: all 0.3s ease;
}

.reaction-count.updating {
    color: var(--fb-blue);
    transform: scale(1.05);
}

.stats-right {
    display: flex;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.stat-icon {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.stat-text {
    font-weight: 400;
    transition: all 0.3s ease;
}

.stat-text.updating {
    color: var(--fb-blue);
    transform: scale(1.05);
}

.stat-label {
    display: inline;
}

/* Comments Header with animation */
.comments-header span {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.comments-header span.updating {
    color: var(--fb-blue);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.action-btn:hover {
    background-color: var(--hover-bg);
}

.action-label {
    display: none;
}

/* Comments Section */
.comments-section {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding-bottom: 16px;
}

.comments-header {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

/* Comment */
.comment {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-bubble {
    background-color: var(--bg-tertiary);
    border-radius: 16px;
    padding: 8px 12px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.comment-author-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.comment-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    word-wrap: break-word;
}

/* Imagem de transformação (antes e depois) */
.comment-bubble img {
    margin-top: 8px;
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    display: block;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    padding: 0 8px;
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-action {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.comment-action:hover {
    text-decoration: underline;
}

.comment-likes {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.comment-like-icon {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: linear-gradient(to bottom, hsl(214, 89%, 60%), hsl(214, 89%, 45%));
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-like-icon svg {
    width: 8px;
    height: 8px;
    color: white;
}

.comment-like-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Multiple Reactions Container */
.comment-reactions-icons {
    display: flex;
    margin-left: -2px;
}

.comment-reactions-icons .comment-like-icon,
.comment-reactions-icons .comment-love-icon {
    margin-left: -4px;
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

.comment-reactions-icons .comment-like-icon:first-child,
.comment-reactions-icons .comment-love-icon:first-child {
    margin-left: 0;
}

.comment-love-icon {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: linear-gradient(to bottom, hsl(0, 84%, 65%), hsl(0, 84%, 50%));
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-love-icon svg {
    width: 8px;
    height: 8px;
    color: white;
}

/* Load More */
.load-more {
    padding: 8px 12px 0;
}

.load-more-btn {
    color: var(--fb-blue);
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.load-more-btn:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 16px;
    margin-top: 20px;
}

.footer p {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Responsive Design */
@media (min-width: 640px) {
    .action-label {
        display: inline;
    }
    
    .main-content {
        padding: 8px 8px 32px;
    }
    
    .stats-right {
        gap: 16px;
    }
}

@media (min-width: 768px) {
    .header-container {
        padding: 8px 16px;
    }
    
    .overlay-title {
        font-size: 24px;
    }
}

/* Desktop - sem limite de largura para a DTC da VTurb */
@media (min-width: 1024px) {
    .main-content {
        max-width: none;
        padding: 8px 16px 32px;
    }
    
    .video-post {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .comments-section {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* DTC da VTurb usa largura total disponível */
    .video-container {
        max-width: none;
    }
}

@media (max-width: 639px) {
    .stat-label {
        display: none;
    }
    
    .stats-right {
        gap: 12px;
    }
    
    .stat-item {
        gap: 3px;
    }
    
    .stat-text {
        font-size: 13px;
    }
}
