/* --- 1. Design Tokens (Variáveis) --- */
:root {
    --bg-app: #0a0a0a;
    --bg-card: #121212;
    --bg-card-hover: #161616;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.18);
    --text-primary: #f4f4f4;
    --text-secondary: #a0a0a0;
    --accent: #e50914;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. Feed Container --- */
.feed-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 4.5rem 1rem;
    max-width: 680px;
    margin: 0 auto;
    font-family: var(--font-main);
}

/* --- 3. Feed Item (O "Post") --- */
.feed-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: background var(--transition), border-color var(--transition), transform 0.2s ease;
}

/* Interações apenas para dispositivos com mouse */
@media (hover: hover) {
    .feed-item:hover {
        background: var(--bg-card-hover);
        border-color: var(--border-color-hover);
    }
}

/* --- 4. Header (Autor e Tempo) --- */
.feed-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.feed-avatar-link {
    flex-shrink: 0;
    text-decoration: none;
}

.feed-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #1e1e1e;
    border: 1px solid var(--border-color);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.feed-actor-info {
    flex: 1;
    min-width: 0;
}

.feed-actor-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.actor-name {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.2px;
}

@media (hover: hover) {
    .actor-name:hover {
        text-decoration: underline;
    }
}

.feed-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- 5. Action (Conteúdo do Feed) --- */
.feed-action {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.feed-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2px;
}

.feed-action a {
    color: #38bdf8;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
    padding: 4px 0; /* Aumenta área de clique */
    display: inline-block;
}

.feed-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.feed-empty p {
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

@media (hover: hover) {
    .feed-action a:hover {
        color: #ffffff;
        text-decoration: underline;
        opacity: 0.9;
    }
}

/* --- 6. Card (Mídia anexada) --- */
.feed-item-card {
    margin-top: 1rem;
    max-width: 160px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

@media (hover: hover) {
    .feed-item-card:hover {
        transform: scale(1.02);
    }
}

.feed-item-card .rank-badge,
.feed-item-card .watchlist-btn {
    display: none !important;
}

/* --- 7. Responsividade (Otimização Mobile) --- */
@media (max-width: 600px) {
    .feed-wrapper {
        padding: 0 0.5rem;   /* Adiciona respiro lateral (8px) para não encostar nas bordas */
        gap: 0;
        width: 100%;         /* Garante que o container ocupe a largura total */
        box-sizing: border-box; /* Essencial: impede que o padding aumente a largura do container */
    }
    
    .feed-item {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.25rem 0.5rem; /* Ajuste interno para alinhar com o respiro do wrapper */
    }

    .actor-name {
        font-size: 1rem;
    }

    .feed-action {
        font-size: 1rem;
    }

    .feed-item-card {
        max-width: 140px;
    }
}