/* ================================================
   DASHBOARD WIDGETS - CONSOLIDATED CSS
   Todos los estilos de widgets consolidados
   Febrero 2026 - Versión Mejorada
   ================================================ */

/* ================================================
   01 - VARIABLES
   ================================================ */

:root {
    /* Spacing */
    --widget-padding-x: 2.75rem;
    --widget-padding-y: 2.5rem;
    --widget-header-padding: 1.75rem 2.5rem;
    --widget-gap: 2rem;
    
    /* Border Radius */
    --widget-border-radius: 16px;
    --widget-element-radius: 10px;
    
    /* Transitions */
    --widget-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --widget-transition-fast: all 0.2s ease;
}

/* ================================================
   02 - BASE LAYOUT
   ================================================ */

.dashboard-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: var(--widget-gap);
    margin-bottom: 2rem;
    padding: 0.5rem;
}

.widget-wide {
    grid-column: span 2;
}

/* ================================================
   03 - WIDGET STRUCTURE
   ================================================ */

.dashboard-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-widget:hover {
    box-shadow: 0 8px 24px var(--shadow);
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

/* Edit mode states */
.edit-mode .dashboard-widget {
    cursor: move;
    user-select: none;
}

.dashboard-widget.editable {
    border: 2px dashed var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.dashboard-widget.editable:hover {
    border-color: var(--accent-red);
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.dashboard-widget.dragging {
    opacity: 0.6;
    transform: scale(0.98);
    cursor: grabbing;
}

.dashboard-widget.drag-over {
    border: 2px solid var(--accent-gold);
    transform: scale(1.03);
    box-shadow: 0 12px 32px rgba(212, 175, 55, 0.3);
}

/* Widget header */
.widget-header {
    display: flex;
    align-items: center;
    padding: 1.75rem 2.5rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.03) 0%, 
        rgba(255, 255, 255, 0.01) 100%);
    border-bottom: 1px solid var(--border-color);
    gap: 0.875rem;
    position: relative;
}

.widget-drag-handle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: grab;
    user-select: none;
    opacity: 0;
    transition: all 0.2s ease;
    padding: 0.25rem;
}

.edit-mode .widget-drag-handle {
    opacity: 0.5;
}

.edit-mode .widget-drag-handle:hover {
    opacity: 1;
    color: var(--accent-gold);
}

.widget-drag-handle:active {
    cursor: grabbing;
}

.widget-title {
    flex: 1;
    margin: 0;
    font-size: 1.075rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.widget-actions {
    display: flex;
    gap: 0.5rem;
}

.widget-toggle,
.widget-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.15rem;
    padding: 0.375rem;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.widget-toggle:hover,
.widget-action-btn:hover {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
    transform: rotate(15deg);
}

/* Widget body */
.widget-body {
    padding: 2.5rem 2.75rem;
}

/* Widget states */
.widget-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
}

.widget-hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ================================================
   04 - STATS WIDGETS
   ================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.75rem;
}

/* Variante de 2 columnas para mejor legibilidad */
.stats-grid-two-cols {
    grid-template-columns: repeat(2, 1fr);
}

.stat-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.02) 100%);
    padding: 1.75rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--accent-primary) 0%, 
        var(--accent-secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-primary);
}

.stat-card:hover::before {
    opacity: 0.08;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stat-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* ================================================
   05 - LIST WIDGETS
   ================================================ */

.widget-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.widget-list-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.04) 0%, 
        rgba(255, 255, 255, 0.02) 100%);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
}

.widget-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, 
        var(--accent-primary) 0%, 
        var(--accent-secondary) 100%);
    border-radius: 12px 0 0 12px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.widget-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(6px);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.widget-list-item:hover::before {
    opacity: 1;
}

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

.match-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.match-meta {
    display: flex;
    gap: 0.875rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.match-promotion,
.match-date {
    white-space: nowrap;
    font-weight: 500;
}

.match-rating {
    font-weight: 800;
    font-size: 1.1rem;
    white-space: nowrap;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

/* Rating colors with gradients */
.rating-excellent {
    color: #FFD700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.rating-great {
    color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
}

.rating-good {
    color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
}

.rating-average {
    color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
}

.rating-below-average {
    color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
}

/* ================================================
   06 - TIMELINE WIDGET
   ================================================ */

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-height: 840px; /* ~12 meses visibles a la vez */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 1rem;
}

.timeline-items::-webkit-scrollbar {
    width: 8px;
}

.timeline-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.timeline-items::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.timeline-items::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
    padding-left: 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-secondary), 0 0 0 6px rgba(212, 175, 55, 0.2);
    z-index: 2;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1.05rem;
    top: 1.5rem;
    bottom: -2rem;
    width: 2px;
    background: linear-gradient(180deg, 
        var(--border-color) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    z-index: 1;
}

.timeline-date {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 180px;
    letter-spacing: -0.01em;
}

.timeline-content {
    flex: 1;
}

.timeline-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.timeline-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 100px;
}

.timeline-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.timeline-rating {
    font-weight: 700;
    font-size: 1rem;
    min-width: 80px;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    text-align: center;
}

/* ================================================
   07 - CHART WIDGETS
   ================================================ */

.trends-chart {
    display: flex;
    gap: 1.25rem;
    align-items: flex-end;
    height: 280px;
    padding: 2rem 1rem;
    position: relative;
}

.trend-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    position: relative;
    min-width: 0;
}

.trend-value {
    width: 100%;
    background: linear-gradient(to top, 
        var(--accent-primary), 
        var(--accent-secondary));
    border-radius: 10px 10px 0 0;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 12px;
    box-shadow: 0 -2px 12px rgba(212, 175, 55, 0.35);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.trend-value:hover {
    opacity: 0.9;
    transform: scaleY(1.08);
    box-shadow: 0 -4px 20px rgba(212, 175, 55, 0.6);
}

.trend-label {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    background: var(--bg-primary);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    z-index: 10;
}

.trend-value:hover .trend-label {
    opacity: 1;
    top: -3rem;
}

.trend-month {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-align: center;
}

.trends-chart:empty::after {
    content: 'No hay datos suficientes para mostrar tendencias';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

/* ================================================
   08 - HALL OF FAME WIDGET
   ================================================ */

.hall-of-fame-item {
    position: relative;
    padding-left: 75px !important;
}

.rank-badge {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.rank-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.5), 0 0 0 3px rgba(255, 215, 0, 0.2);
    border: none;
}

.rank-silver {
    background: linear-gradient(135deg, #E8E8E8 0%, #A0A0A0 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 16px rgba(192, 192, 192, 0.5), 0 0 0 3px rgba(192, 192, 192, 0.2);
    border: none;
}

.rank-bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(205, 127, 50, 0.5), 0 0 0 3px rgba(205, 127, 50, 0.2);
    border: none;
}

.wrestler-info {
    flex: 1;
}

.wrestler-name {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.wrestler-name-link {
    color: inherit;
    text-decoration: none;
}

.wrestler-name-link:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.wrestler-stats {
    font-size: 0.8rem;
    opacity: 0.75;
    font-weight: 500;
}

.wrestler-avg-rating {
    font-size: 1.35rem;
    font-weight: 800;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
}

/* ================================================
   09 - MONTH SUMMARY WIDGET
   ================================================ */

.month-summary {
    padding: 0.5rem 0;
}

.month-header h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-comparison {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.stat-comparison.positive {
    color: #10b981;
}

.stat-comparison.positive::before {
    content: '↑ ';
}

.stat-comparison.negative {
    color: #ef4444;
}

.stat-comparison.negative::before {
    content: '↓ ';
}

.month-highlight {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.02) 100%);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.month-highlight:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-primary);
}

.highlight-label {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.month-stat-row {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ================================================
   10 - PROMOTION CHART WIDGET
   ================================================ */

.promotion-comparison {
    padding: 1rem 0;
}

.comparison-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comparison-row:last-child {
    margin-bottom: 0;
}

.promo-name {
    min-width: 90px;
    width: 90px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: right;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.promo-bar-container {
    flex: 1;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.promo-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    padding: 0 1rem;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bar-label {
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.promo-stats {
    display: flex;
    gap: 0.875rem;
    align-items: center;
    min-width: 140px;
    font-size: 0.85rem;
    font-weight: 600;
}

.promo-rating {
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
}

.promo-five-stars {
    opacity: 0.7;
    font-size: 0.8rem;
}

/* ================================================
   11 - MATCH OF THE WEEK WIDGET
   ================================================ */

.featured-match {
    padding: 1.75rem;
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.1) 0%, 
        rgba(220, 38, 38, 0.05) 100%);
    border-radius: 14px;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
    position: relative;
    overflow: hidden;
}

.featured-match::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(212, 175, 55, 0.1) 0%, 
        transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.featured-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 24px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.featured-content {
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.featured-content:hover {
    transform: scale(1.02);
}

.featured-rating {
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 0.625rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-title {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.featured-meta {
    font-size: 0.875rem;
    opacity: 0.85;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-weight: 500;
}

/* ================================================
   12 - RATING DISTRIBUTION WIDGET
   ================================================ */

.rating-distribution {
    padding: 0.75rem 0;
}

.distribution-row {
    margin-bottom: 1.25rem;
}

.distribution-row:last-child {
    margin-bottom: 0;
}

.distribution-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.distribution-bar-container {
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.distribution-bar {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

/* ================================================
   14 - HEATMAP WIDGET
   ================================================ */

.heatmap-container {
    padding: 0.25rem 0;
}

.heatmap-month-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 16px;
    gap: 3px;
    margin-left: 24px;
    margin-bottom: 5px;
}

.heatmap-month-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: visible;
}

.heatmap-body {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.heatmap-day-labels {
    display: grid;
    grid-template-rows: repeat(7, 16px);
    gap: 3px;
}

.heatmap-day-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 16px;
    text-align: right;
    width: 18px;
}

.heatmap-grid {
    display: grid;
    grid-template-rows: repeat(7, 16px);
    grid-auto-flow: column;
    grid-auto-columns: 16px;
    gap: 3px;
}

.heatmap-cell {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    cursor: default;
    transition: opacity 0.15s;
}

.heatmap-cell:hover {
    opacity: 0.8;
}

.heatmap-empty { background: transparent; }
.heatmap-level-0 { background: var(--bg-tertiary); }
.heatmap-level-1 { background: rgba(212, 175, 55, 0.22); }
.heatmap-level-2 { background: rgba(212, 175, 55, 0.45); }
.heatmap-level-3 { background: rgba(212, 175, 55, 0.70); }
.heatmap-level-4 { background: var(--accent-primary); }

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    margin-left: 24px;
}

.heatmap-legend-text {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-right: 2px;
}

/* ================================================
   15 - MATCH OF DAY / REROLL BUTTON
   ================================================ */

.reroll-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.45rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.reroll-btn:hover {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

/* ================================================
   13 - RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 1200px) {
    .widgets-grid {
        grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    }
}

@media (max-width: 1024px) {
    .widget-wide {
        grid-column: span 1;
    }

    .widgets-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .widget-header {
        padding: 1rem 1.25rem;
    }
    
    .widget-header::after {
        left: 1.25rem;
        right: 1.25rem;
    }
    
    .widget-body {
        padding: 1.25rem 1.5rem;
    }
    
    .widget-title {
        font-size: 0.95rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .timeline-items {
        max-height: 350px;
    }
    
    .timeline-date {
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    .hall-of-fame-item {
        padding-left: 60px !important;
    }
    
    .rank-badge {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    .promo-name {
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    .promo-stats {
        min-width: 110px;
        font-size: 0.75rem;
    }
    
    .featured-match {
        padding: 1.25rem;
    }
    
    .featured-title {
        font-size: 1rem;
    }
    
    .featured-rating {
        font-size: 1.5rem;
    }
    
    .trends-chart {
        height: 180px;
        padding: 1rem 0.25rem;
    }
    
    .trend-label {
        font-size: 0.65rem;
        top: -1.5rem;
    }
}

@media (max-width: 480px) {
    .widget-header {
        padding: 1rem;
    }
    
    .widget-header::after {
        left: 1rem;
        right: 1rem;
    }
    
    .widget-body {
        padding: 1rem 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hall-of-fame-item {
        padding-left: 55px !important;
    }
    
    .rank-badge {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
        left: 8px;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .dashboard-widget {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .dashboard-widget:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .stat-card {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .widget-list-item {
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .featured-match {
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

/* ================================================
   WIDGET SELECTOR MODAL
   ================================================ */

.widget-selector-modal {
    max-height: 85vh;
    overflow-y: auto;
}

.widget-selector-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.widget-selector-item {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.widget-selector-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.widget-selector-item.active {
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.08), 
        rgba(212, 175, 55, 0.04));
    border-color: var(--accent-primary);
}

.widget-checkbox-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    width: 100%;
}

.widget-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.widget-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 1rem;
}

.widget-selector-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.widget-type-badge {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.widget-selector-item.active .widget-type-badge {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-color: transparent;
}

/* Modal overlay click-to-close effect */
.modal {
    cursor: pointer;
}

.modal .modal-content {
    cursor: default;
}

/* ================================================
   MUSIC PLAYER WIDGET
   ================================================ */

.music-player {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.music-player-display {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.08), 
        rgba(139, 92, 246, 0.08));
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.music-player-icon {
    font-size: 2.5rem;
    animation: pulse-music 2s ease-in-out infinite;
}

@keyframes pulse-music {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.music-player-info {
    flex: 1;
}

.music-song-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.music-song-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.music-progress-container {
    width: 100%;
}

.music-progress-bar {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.music-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.5);
}

.music-progress-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.5);
}

.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

/* Botones minimalistas: sin fondo, solo icono */
.music-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.music-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.07);
    transform: none;
    box-shadow: none;
}

/* Botón play ligeramente más visible */
.music-btn-play {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.music-btn-play:hover {
    color: var(--accent-primary);
    background: rgba(212, 175, 55, 0.1);
}

/* Icono de modo activo resaltado */
.music-mode-btn.active {
    color: var(--accent-primary);
}

.music-volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.25rem;
}

.music-volume-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.music-volume-slider {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.music-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
}

.music-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: none;
}

/* Modal tracklist de música */
.music-tracklist-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.music-tracklist-modal.open {
    display: flex;
}

.music-tracklist-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    width: 720px;
    max-width: 92vw;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.2s ease;
}

.music-tracklist-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.music-tracklist-modal-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.music-tracklist-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
    line-height: 1;
}

.music-tracklist-modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.07);
}

.music-tracklist-modal-list {
    overflow-y: auto;
    flex: 1;
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem 1rem;
    align-content: start;
}

.music-tracklist-modal-list::-webkit-scrollbar {
    width: 6px;
}

.music-tracklist-modal-list::-webkit-scrollbar-track {
    background: transparent;
}

.music-tracklist-modal-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.music-track-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s ease, color 0.15s ease;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 6px;
}

.music-track-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.music-track-item.playing {
    background: rgba(212, 175, 55, 0.12);
    color: var(--accent-primary);
    font-weight: 700;
}

