/* css/feed.css */

#dashboard { 
    width: 100%; 
    max-width: 600px; 
    padding: 90px 15px 40px 15px; 
    box-sizing: border-box; 
    margin: 0 auto; 
    display: block; 
}

h1 { 
    font-family: 'Orbitron', sans-serif; 
    color: var(--neon-blue); 
    text-transform: uppercase; 
    text-align: center; 
    margin-bottom: 5px; 
    font-size: 1.5rem; 
    letter-spacing: 2px;
}

.subtitle {
    font-family: 'Orbitron', sans-serif; 
    font-size: 0.75rem; 
    color: rgba(255,255,255,0.6); 
    letter-spacing: 2px; 
    margin-bottom: 30px; 
    text-transform: uppercase;
    text-align: center;
}

/* ─── FEED ─────────────────────────────────────────────── */
.feed-container { display: flex; flex-direction: column; gap: 30px; }

.post-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 242, 255, 0.15);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

/* ─── HEADER DO POST ────────────────────────────────────── */
.post-header { display: flex; align-items: center; padding: 12px 15px; gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.post-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 242, 255, 0.1); display: flex; align-items: center; justify-content: center; color: var(--neon-blue); border: 1px solid rgba(0, 242, 255, 0.3); flex-shrink: 0; }
.post-meta { display: flex; flex-direction: column; gap: 2px; }
.post-mod { font-family: 'Orbitron', sans-serif; font-size: 0.9rem; color: #fff; font-weight: bold; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-time { font-family: 'Roboto', sans-serif; font-size: 0.7rem; color: #888; }

/* ─── BADGE DE TIPO (vídeo) ─────────────────────────────── */
.media-badge { 
    font-family: 'Orbitron', sans-serif; font-size: 0.6rem; letter-spacing: 1px;
    padding: 2px 8px; border-radius: 20px; display: inline-flex; align-items: center; gap: 3px;
}
.video-badge { background: rgba(255, 100, 0, 0.2); color: #ff8c42; border: 1px solid rgba(255, 100, 0, 0.4); }

/* ─── IMAGEM ────────────────────────────────────────────── */
.post-image-container {
    width: 100%; background: #000; position: relative; display: flex; align-items: center; justify-content: center;
    max-height: 750px; overflow: hidden;
}
.post-image { width: 100%; height: auto; max-height: 750px; object-fit: contain; display: block; }

/* ─── VÍDEO (iframe 16:9) ───────────────────────────────── */
.post-video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
    overflow: hidden;
}
.post-video-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Overlay de carregamento do vídeo */
.video-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.video-spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(0,242,255,0.2);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── ANIMAÇÃO DE CORAÇÃO ───────────────────────────────── */
.heart-pop { position: absolute; color: rgba(255, 255, 255, 0.8); font-size: 80px; opacity: 0; transform: scale(0.5); pointer-events: none; }
@keyframes popHeart { 0% { opacity: 0; transform: scale(0.5); } 15% { opacity: 1; transform: scale(1.2); } 30% { transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }

/* ─── AÇÕES E MÉTRICAS ─────────────────────────────────── */
.post-actions { display: flex; padding: 12px 15px; gap: 15px; align-items: center; }
.action-btn { background: transparent; border: none; color: #fff; font-size: 28px; cursor: pointer; transition: transform 0.2s, color 0.2s; padding: 0; display: flex; align-items: center; }
.action-btn:hover { transform: scale(1.1); }
.action-btn.liked { color: var(--danger); animation: bounce 0.3s; }
@keyframes bounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

.post-metrics { 
    font-family: 'Orbitron', sans-serif; font-size: 0.8rem; font-weight: bold; color: #fff; 
    padding: 0 15px; margin-top: -5px; margin-bottom: 5px; display: flex; gap: 15px;
}

/* ─── LEGENDA E COMENTÁRIOS ─────────────────────────────── */
.post-caption { padding: 5px 15px 10px 15px; font-family: 'Roboto', sans-serif; font-size: 0.85rem; color: #ccc; line-height: 1.4; }
.caption-author { font-family: 'Orbitron', sans-serif; font-weight: bold; color: #fff; margin-right: 5px; }

.comments-section { padding: 10px 15px 15px 15px; border-top: 1px solid rgba(255,255,255,0.05); }
.comments-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.comment { font-family: 'Roboto', sans-serif; font-size: 0.8rem; color: #ccc; line-height: 1.3; }
.comment b { color: #fff; font-family: 'Orbitron', sans-serif; font-size: 0.75rem; margin-right: 5px; }

.comment-input-area { display: flex; gap: 10px; align-items: center; }
.comment-input-area input { 
    flex: 1; background: rgba(0,0,0,0.4); border: 1px solid rgba(0,242,255,0.2); color: white; 
    padding: 10px 15px; border-radius: 20px; font-family: 'Roboto', sans-serif; font-size: 0.85rem; outline: none; transition: 0.3s;
}
.comment-input-area input:focus { border-color: var(--neon-blue); box-shadow: 0 0 10px rgba(0,242,255,0.1); }
.comment-btn { background: transparent; color: var(--neon-blue); font-weight: bold; border: none; font-family: 'Orbitron', sans-serif; cursor: pointer; transition: 0.2s; padding: 5px; }
.comment-btn:hover { color: #fff; transform: scale(1.05); }

.login-prompt { font-family: 'Roboto', sans-serif; font-size: 0.8rem; color: #888; text-align: center; padding: 10px; background: rgba(0,0,0,0.2); border-radius: 8px; border: 1px dashed rgba(255,255,255,0.1); }
.login-prompt a { color: var(--neon-blue); text-decoration: none; font-weight: bold; font-family: 'Orbitron', sans-serif; }

/* ─── SKELETON LOADER ───────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}
.skeleton-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    padding: 12px;
}
.skeleton-header, .skeleton-media, .skeleton-line {
    background: linear-gradient(90deg, #1e2530 25%, #2a3040 50%, #1e2530 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 6px;
}
.skeleton-header { height: 44px; margin-bottom: 10px; }
.skeleton-media  { height: 250px; margin-bottom: 12px; border-radius: 0; }
.skeleton-line   { height: 14px; margin-bottom: 8px; }
.skeleton-line.short { width: 60%; }

/* ─── SPINNER DE INFINITE SCROLL ────────────────────────── */
.feed-loader {
    display: none;
    justify-content: center;
    padding: 20px 0 40px;
}
.loader-dots { display: flex; gap: 8px; align-items: center; }
.loader-dots span {
    width: 10px; height: 10px;
    background: var(--neon-blue);
    border-radius: 50%;
    animation: dotPulse 1.2s ease-in-out infinite;
    opacity: 0.3;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }

/* ─── RESPONSIVIDADE ────────────────────────────────────── */
@media (max-width: 600px) {
    #dashboard { padding-top: 80px; padding-left: 0; padding-right: 0; }
    .post-card { border-radius: 0; border-left: none; border-right: none; }
}
