/**
 * LA TANDA - Hub Sections CSS
 * Estilos para las secciones del Hub Inteligente
 * Version: 1.0.0
 */

/* ================================
   ALERTS BANNER
   ================================ */
.hub-alerts-container {
    margin-bottom: 20px;
}

.hub-alerts-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hub-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInDown 0.3s ease;
    transition: all 0.3s ease;
}

.hub-alert:hover {
    transform: translateX(4px);
}

.hub-alert.dismissing {
    animation: slideOutRight 0.3s ease forwards;
}

.hub-alert.alert-urgent {
    border-left: 4px solid #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.hub-alert.alert-opportunity {
    border-left: 4px solid #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.hub-alert.alert-info {
    border-left: 4px solid #22d55e;
    background: rgba(34, 213, 94, 0.1);
}

.hub-alert.alert-reward {
    border-left: 4px solid #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}

.alert-content i {
    font-size: 18px;
}

.alert-message {
    font-size: 14px;
    color: var(--text-primary);
}

.alert-dismiss {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.alert-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ================================
   INSIGHTS PANEL
   ================================ */
.hub-insights-container {
    margin-bottom: 24px;
}

.hub-insights-panel {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px;
}

.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.insights-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tanda-cyan);
    font-weight: 600;
    font-size: 16px;
}

.insights-title i {
    font-size: 20px;
}

.insights-refresh {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--border-accent);
    color: var(--tanda-cyan);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.insights-refresh:hover {
    background: var(--tanda-cyan);
    color: var(--tanda-black);
}

.insights-refresh.spinning i {
    animation: spin 1s linear infinite;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hub-insight-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.hub-insight-card:hover {
    background: rgba(0, 255, 255, 0.05);
    transform: translateX(4px);
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.insight-content {
    flex: 1;
}

.insight-text {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.insight-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.insight-action:hover {
    gap: 10px;
}

.insight-action i {
    font-size: 11px;
}

/* ================================
   MODULE CARDS GRID
   ================================ */
.hub-modules-container {
    margin-bottom: 24px;
}

.hub-modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .hub-modules-grid {
        grid-template-columns: 1fr;
    }
}

.hub-module-card {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hub-module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(0, 255, 255, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hub-module-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hub-module-card:hover::before {
    opacity: 1;
}

.module-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.module-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.module-icon.finanzas {
    background: linear-gradient(135deg, #00FFFF, #7FFFD8);
    color: #000;
}

.module-icon.mercado {
    background: linear-gradient(135deg, #22d55e, #16a34a);
    color: #fff;
}

.module-icon.loteria {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #fff;
}

.module-icon.mineria {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #000;
}

.module-title {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.module-badge {
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.module-badge.alert {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    animation: pulse 2s infinite;
}

.module-badge.reward {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #fff;
}

.module-card-body {
    margin-bottom: 16px;
}

.module-stat-main {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.module-stat-main .stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.module-stat-main .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.module-stat-main.hot-numbers {
    flex-direction: row;
    gap: 8px;
}

.hot-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.tier-badge {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.module-stat-secondary {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-row i {
    width: 16px;
    text-align: center;
    color: var(--tanda-cyan);
}

.module-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-card);
    font-size: 13px;
    color: var(--tanda-cyan);
    font-weight: 600;
}

.module-card-action i {
    transition: transform 0.3s ease;
}

.hub-module-card:hover .module-card-action i {
    transform: translateX(4px);
}

/* ================================
   UNIFIED FEED
   ================================ */
.hub-feed-container {
    margin-bottom: 24px;
}

.hub-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.feed-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.feed-title i {
    color: var(--tanda-cyan);
}

.feed-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.feed-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feed-filter-btn:hover {
    border-color: var(--border-accent);
    color: var(--tanda-cyan);
}

.feed-filter-btn.active {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--tanda-cyan);
    color: var(--tanda-cyan);
}

.hub-feed-list {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    overflow: hidden;
}

.hub-activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-card);
    transition: all 0.2s ease;
}

.hub-activity-item:last-child {
    border-bottom: none;
}

.hub-activity-item:hover {
    background: rgba(0, 255, 255, 0.03);
}

.activity-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 1px solid;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.activity-source {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.activity-title {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-amount {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 600;
}

.feed-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.feed-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.feed-empty-state p {
    font-size: 16px;
    margin-bottom: 8px;
}

.feed-empty-state span {
    font-size: 13px;
    opacity: 0.7;
}

.feed-load-more {
    display: flex;
    justify-content: center;
    padding: 20px;
    color: var(--tanda-cyan);
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 480px) {
    .hub-alert {
        padding: 10px 12px;
    }

    .alert-message {
        font-size: 13px;
    }

    .hub-insight-card {
        padding: 12px;
    }

    .hub-module-card {
        padding: 16px;
    }

    .module-stat-main .stat-value {
        font-size: 20px;
    }

    .feed-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .feed-filter-btn {
        flex-shrink: 0;
    }
}
