/* ========== ESTILOS PARA EL HOME ========== */

.dynamic-panel {
    padding: 15px 0;
}

.home-section {
    margin-bottom: 25px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.home-section-header {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.home-section-header h5 {
    margin: 0;
    color: var(--primary);
    font-size: 1.1rem;
}

.home-section-header .text-muted {
    font-size: 0.85rem;
}

/* ========== CARRUSEL DE JUEGOS ========== */

.game-carousel-container {
    position: relative;
    margin: 0 -5px;
}

.game-carousel {
    display: flex;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(var(--bg-rgb), 0.5);
    min-height: 200px;
}

.carousel-slide {
    flex: 0 0 100%;
    transition: transform 0.5s ease;
    display: none;
}

.carousel-slide.active {
    display: block;
}

.game-carousel-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
}

.game-carousel-image {
    width: 100%;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.game-carousel-item:hover .game-carousel-image {
    transform: scale(1.05);
}

.game-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 15px;
}

.game-carousel-overlay h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-carousel-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.9;
}

.carousel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 0 10px;
}

.carousel-control {
    background: var(--primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-control:hover {
    background: var(--primary-dark);
}

.carousel-indicators {
    display: flex;
    gap: 8px;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--muted);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-indicator.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* ========== NOTICIAS DEL HOME ========== */

.home-news-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-news-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(var(--accent-rgb), 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-left: 3px solid var(--primary);
}

.home-news-item:hover {
    background: rgba(var(--accent-rgb), 0.1);
}

.home-news-item i {
    font-size: 1.2rem;
    margin-top: 2px;
}

.home-news-content {
    flex: 1;
}

.home-news-content h6 {
    margin: 0 0 5px 0;
    color: var(--text);
    font-size: 0.95rem;
}

.home-news-content p {
    margin: 0 0 5px 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.home-news-content small {
    font-size: 0.75rem;
}

/* ========== SECCIÓN DE CONTENIDO DEL HOME ========== */

.home-section-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(var(--bg-rgb), 0.7);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.home-item:hover {
    background: rgba(var(--accent-rgb), 0.1);
}

.home-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.home-item-image.manga-image {
    width: 50px;
    height: 75px;
    object-fit: cover;
}

.home-item-info {
    flex: 1;
}

.home-item-info h6 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: var(--text);
}

.home-item-info small {
    font-size: 0.8rem;
}

/* ========== CONTROLES DEL HOME ========== */

.home-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 576px) {
    .game-carousel-overlay h5 {
        font-size: 0.9rem;
    }

    .home-section {
        padding: 12px;
    }

    .home-item-image {
        width: 50px;
        height: 50px;
    }

    .home-item-image.manga-image {
        width: 40px;
        height: 60px;
    }
}

@media (min-width: 768px) {
    .home-news-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Forzar texto muted del Home a seguir el tema */
.home-news-content p.text-muted,
.home-news-content small.text-muted,
.home-section-header .text-muted,
.home-item-info small.text-muted {
  color: var(--muted) !important;
  opacity: 0.9;
}

/* ========== TARJETAS DE MANGA EN HOME (MEJORADAS) ========== */

.home-manga-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-manga-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: rgba(var(--bg-rgb, 0,0,0), 0.3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    align-items: flex-start;
}

.home-manga-card:hover {
    background: rgba(var(--accent-rgb, 110,168,254), 0.08);
    border-color: rgba(var(--primary-rgb, 110,168,254), 0.3);
    transform: translateX(3px);
}

.home-manga-cover-wrap {
    position: relative;
    flex-shrink: 0;
}

.home-manga-cover {
    width: 58px;
    height: 84px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.home-manga-fav-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.65);
    color: #ff6b9d;
    font-size: 0.65rem;
    border-radius: 4px;
    padding: 2px 4px;
    line-height: 1;
}

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

.home-manga-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.home-manga-desc {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-manga-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin-top: 2px;
}

.home-manga-status {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-ongoing  { background: rgba(40,167,69,0.18);  color: #28a745; }
.status-completed{ background: rgba(13,110,253,0.15); color: #6ea8fe; }
.status-hiatus   { background: rgba(255,193,7,0.18);  color: #ffc107; }
.status-cancelled{ background: rgba(220,53,69,0.15);  color: #dc3545; }

.home-manga-chips {
    font-size: 0.7rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

.home-manga-chips i {
    font-size: 0.68rem;
}

.home-manga-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.home-manga-genre {
    font-size: 0.66rem;
    padding: 1px 7px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb, 110,168,254), 0.1);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb, 110,168,254), 0.2);
}

@media (min-width: 768px) {
    .home-manga-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Estadísticas home */
.home-stats .stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid var(--border-color);
}
.home-stats h3 {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
    margin: 0;
}
.weekly-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.weekly-item {
    background: rgba(var(--primary-rgb), 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
}
.highlight-card {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
}

/* ========== ARTISTA DEL PROYECTO ========== */

.artist-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 4px;
}

.artist-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.artist-avatar-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.artist-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--muted);
}

.artist-verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--primary);
    border: 2px solid var(--card-bg);
}

.artist-info {
    min-width: 0;
    flex: 1;
}

.artist-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

.artist-role {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 2px 0 6px;
    display: flex;
    align-items: center;
}

.artist-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
}

.artist-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.artist-social-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(var(--primary-rgb, 110,168,254), 0.08);
    border: 1px solid rgba(var(--primary-rgb, 110,168,254), 0.2);
    color: var(--text);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.artist-social-btn:hover {
    background: var(--artist-color, var(--primary));
    border-color: var(--artist-color, var(--primary));
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .artist-card {
        flex-direction: column;
        text-align: center;
    }
}