html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg,
        #0f0f0f 0%,
        #101a2a 30%,
        #1a0f12 60%,
        #141414 100%);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    min-height: 100%;
}

html { overflow-y: scroll; }
* { box-sizing: border-box; margin: 0; padding: 0; }

.container {
    padding-top: 112px;
    padding-bottom: 60px;
}

.container--no-hero {
    padding-top: 32px;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
    width: 100%;
    padding: 140px 0 80px;
    display: flex;
    justify-content: center;
}

.hero-inner {
    max-width: 952px;
    width: 100%;
    padding: 0 16px;
}

.hero-title {
    color: #fff;
    font-size: 52px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.hero-sub {
    color: #666;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    max-width: 520px;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hero-btn-primary {
    padding: 14px 28px;
    background: linear-gradient(90deg, #ff3b3b, #ff7a18);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.hero-btn-primary:hover {
    opacity: 0.88;
}

.hero-btn-secondary {
    padding: 14px 28px;
    background: none;
    border: 1px solid #333;
    border-radius: 8px;
    color: #aaa;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.hero-btn-secondary:hover {
    border-color: #ff3b3b;
    color: #fff;
}

/* ── Contenedor general ──────────────────────────────────── */
.container {
    padding-top: {% if user.is_authenticated %}112px{% else %}0{% endif %};
    padding-bottom: 60px;
}

.secctions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 52px;
    width: 100%;
}

.section {
    width: 100%;
    max-width: 952px;
}

/* ── Títulos de sección ──────────────────────────────────── */
.title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
    width: 100%;
}

.content_title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-bottom: 6px;
}

.txt_title {
    color: #f5f5f5;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.see_all {
    font-size: 13px;
    font-weight: 700;
    color: #ff3b3b;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.see_all:hover { opacity: 0.8; }

.separator {
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg,
        #ff3b3b 0%,
        #ff7a18 40%,
        rgba(255,255,255,0.05) 100%);
}

/* ── Cards de anime ──────────────────────────────────────── */
.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.card {
    width: 150px;
    height: 213px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    border: 2px solid transparent;
    box-sizing: border-box;
    position: relative;
    flex-shrink: 0;
}

.card a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.card_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 8px 8px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card:hover {
    border-color: #ff3b3b;
}

.card-title {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-score {
    color: #ff7a18;
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}

/* ── Feed de amigos ──────────────────────────────────────── */
.feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #161616;
    transition: background 0.15s;
    border-radius: 6px;
    padding-left: 8px;
}

.feed-item:hover {
    background: #0d0d0d;
}

.feed-img {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.feed-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feed-text {
    color: #777;
    font-size: 13px;
    line-height: 1.4;
}

.feed-username {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s;
}

.feed-username:hover { color: #ff3b3b; }

.feed-anime-title {
    color: #ccc;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s;
}

.feed-anime-title:hover { color: #ff3b3b; }

.feed-score {
    color: #ff7a18;
    font-weight: 700;
}

.feed-date {
    color: #444;
    font-size: 11px;
}

.feed-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    color: #444;
    font-size: 14px;
}

/* ── Populares ───────────────────────────────────────────── */
.popular-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 8px;
    border-bottom: 1px solid #161616;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
}

.popular-item:hover {
    background: #0d0d0d;
}

.popular-rank {
    color: #333;
    font-size: 18px;
    font-weight: 700;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.popular-item:hover .popular-rank {
    color: #ff3b3b;
}

.popular-img {
    width: 36px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.popular-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.popular-title {
    color: #ddd;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popular-item:hover .popular-title {
    color: #fff;
}

.popular-score {
    color: #ff7a18;
    font-size: 12px;
    font-weight: 700;
}

/* ── How it works ────────────────────────────────────────── */
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.how-item {
    background: #111;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.how-icon {
    color: #ff3b3b;
}

.how-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.how-text {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
}

/* ── Reviews home ────────────────────────────────────────── */
.reviews-home {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.review-home-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 8px;
    border-bottom: 1px solid #161616;
    border-radius: 6px;
    transition: background 0.15s;
}

.review-home-item:hover {
    background: #0d0d0d;
}

.review-home-img {
    width: 48px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.review-home-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.review-home-anime {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s;
}

.review-home-anime:hover { color: #ff3b3b; }

.review-home-body {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-home-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-home-user {
    color: #ff3b3b;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s;
}

.review-home-user:hover { opacity: 0.8; }

.review-home-date {
    color: #333;
    font-size: 11px;
}

/* ── Reacciones en reviews ───────────────────────────────── */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-reactions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #222;
    border-radius: 6px;
    color: #555;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.reaction-btn:hover {
    border-color: #444;
    color: #aaa;
}

.reaction-btn--liked {
    border-color: #4ade80;
    color: #4ade80;
}

.reaction-btn--liked:hover {
    border-color: #4ade80;
    color: #4ade80;
    opacity: 0.8;
}

.reaction-btn--disliked {
    border-color: #ff3b3b;
    color: #ff3b3b;
}

.reaction-btn--disliked:hover {
    border-color: #ff3b3b;
    color: #ff3b3b;
    opacity: 0.8;
}

.review-home-reactions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.recommendations-based {
    color: #444;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    max-width: 300px;
    line-height: 1.4;
}

.feed-avatar-wrap {
    flex-shrink: 0;
    text-decoration: none;
}

.feed-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff3b3b, #ff7a18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.feed-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {

    .container {
        padding-top: 88px;
        padding-bottom: 40px;
    }

    .container--no-hero {
        padding-top: 20px;
    }

    /* Hero */
    .hero {
        padding: 100px 16px 48px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-sub {
        font-size: 15px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-btn-primary,
    .hero-btn-secondary {
        width: 100%;
        text-align: center;
    }

    /* Secciones */

    .txt_title {
        font-size: 17px;
    }

    /* Cards */
    .cards {
        gap: 6px;
    }

    .card {
        width: calc(33.33% - 4px);
        height: auto;
        aspect-ratio: 2/3;
    }

    /* Feed */
    .feed-item {
        padding: 10px 0;
        gap: 10px;
    }

    .feed-img {
        width: 32px;
        height: 46px;
    }

    .feed-text {
        font-size: 12px;
    }

    /* Populares */
    .popular-item {
        padding: 10px 4px;
        gap: 12px;
    }

    .popular-title {
        font-size: 13px;
    }

    /* Reviews home */
    .review-home-item {
        gap: 12px;
        padding: 12px 0;
    }

    .review-home-img {
        width: 40px;
        height: 56px;
    }

    .review-home-anime {
        font-size: 13px;
    }

    .review-home-body {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    /* How it works */
    .how-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Recomendaciones */
    .recommendations-based {
        display: none;
    }

    /* Secctions */
    .secctions {
        gap: 32px;
    }

    .review-home-meta {
    flex-wrap: wrap;
    gap: 6px;
    }

    .review-home-date {
        font-size: 10px;
    }

    .review-home-reactions {
        margin-left: 0;
    }
}

.report-btn {
    margin-left: 4px;
    opacity: 0.3;
    color: #666;
    transition: opacity 0.2s, color 0.2s;
}

.report-btn:hover {
    opacity: 0.7;
    color: #aaa;  /* gris en hover, no rojo */
}

.report-btn.reported {
    opacity: 1;
    color: #ff3b3b;  /* rojo solo cuando está marcado */
}

.report-btn.reported:hover {
    opacity: 0.7;
    color: #ff3b3b;
}