/* ==========================================================================
CRYPTOSIM PRO - ESTILOS PRINCIPALES
Versión: 2.0.0 - Corregida y Optimizada
========================================================================== */

/* ==========================================================================
VARIABLES CSS GLOBALES
========================================================================== */
:root {
    /* Colores de fondo */
    --bg-color: #0f172a;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --card-bg: #1e293b;
    
    /* Colores de texto */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Colores de acento */
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --accent-orange: #f59e0b;
    --accent-purple: #8b5cf6;
    
    /* Colores EduCoin */
    --educoin-base: #3b82f6;
    --educoin-stable: #10b981;
    --educoin-grow: #f59e0b;
    --educoin-tech: #8b5cf6;
    --educoin-risk: #ef4444;
    --educoin-master: #ec4899;
    
    /* Bordes e inputs */
    --border-color: #334155;
    --input-bg: #020617;
    
    /* Layout */
    --nav-height: 65px;
    --safe-area-bottom: env(safe-area-inset-bottom);
    --safe-area-top: env(safe-area-inset-top);
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
RESET Y BASE
========================================================================== */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', sans-serif; 
    -webkit-tap-highlight-color: transparent; 
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    padding-top: var(--safe-area-top);
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom));
}

/* ==========================================================================
SECCIONES FULL WIDTH
========================================================================== */
.full-width-section,
.markets-section-full {
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

/* Scroll horizontal para tablas largas */
.table-responsive-full {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Tabla con ancho mínimo */
.table-full-width {
    min-width: 1100px !important;
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.table-full-width th,
.table-full-width td {
    white-space: nowrap !important;
    padding: 12px 15px !important;
    text-align: left;
    vertical-align: middle;
}

/* Anchuras de columnas específicas */
.table-full-width th:nth-child(1), .table-full-width td:nth-child(1) { width: 15%; min-width: 150px; }
.table-full-width th:nth-child(2), .table-full-width td:nth-child(2) { width: 12%; min-width: 100px; }
.table-full-width th:nth-child(3), .table-full-width td:nth-child(3) { width: 15%; min-width: 120px; }
.table-full-width th:nth-child(4), .table-full-width td:nth-child(4) { width: 15%; min-width: 120px; }
.table-full-width th:nth-child(5), .table-full-width td:nth-child(5) { width: 13%; min-width: 110px; }
.table-full-width th:nth-child(6), .table-full-width td:nth-child(6) { width: 13%; min-width: 100px; }
.table-full-width th:nth-child(7), .table-full-width td:nth-child(7) { width: 17%; min-width: 130px; }

/* ==========================================================================
BADGES Y ETIQUETAS
========================================================================== */
.badge {
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-buy { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.badge-sell { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

/* Badge de apalancamiento */
.badge-leverage {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}
.lev-1x { background-color: #64748b; }
.lev-2x { background-color: #3b82f6; }
.lev-5x { background-color: #f59e0b; }
.lev-10x { background-color: #ef4444; }

/* Badge P&L */
.pnl-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}
.pnl-badge.positive {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.pnl-badge.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Colores P&L */
.pnl-positive { color: #10b981 !important; font-weight: 600; }
.pnl-negative { color: #ef4444 !important; font-weight: 600; }

/* ==========================================================================
HEADER Y NAVEGACIÓN
========================================================================== */
header {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: var(--safe-area-top);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent-blue);
    white-space: nowrap;
}
.logo span { color: var(--text-primary); }

.stats-bar { display: none; gap: 15px; }
@media (min-width: 768px) { .stats-bar { display: flex; } }

.stat-item { text-align: right; }
.stat-item small { display: block; color: var(--text-secondary); font-size: 0.65rem; text-transform: uppercase; }
.stat-item strong { font-size: 0.95rem; color: var(--text-primary); font-weight: 600; }

.btn-logout {
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
    border: 1px solid rgba(239, 68, 68, 0.3); 
    padding: 6px 12px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 0.8rem; 
    font-weight: 600; 
    white-space: nowrap;
}

/* Navegación Desktop */
.nav-tabs-desktop { 
    display: none; 
    gap: 5px; 
    padding: 10px 0; 
    overflow-x: auto; 
    scrollbar-width: none; 
}
.nav-tabs-desktop::-webkit-scrollbar { display: none; }

@media (min-width: 769px) {
    .nav-tabs-desktop { display: flex; }
    .nav-tabs-mobile { display: none !important; }
    body { padding-bottom: 0; }
}

/* Navegación Móvil */
.nav-tabs-mobile {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 8px 0 calc(8px + var(--safe-area-bottom));
    z-index: 1000;
    justify-content: space-around;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
}

.nav-tabs-mobile .tab-btn {
    flex-direction: column;
    font-size: 0.6rem;
    padding: 4px 2px;
    gap: 4px;
    position: relative;
}
.nav-tabs-mobile .tab-btn span { font-size: 1.4rem; line-height: 1; }
.nav-tabs-mobile .tab-btn.active { color: var(--accent-blue); background: transparent !important; }
.nav-tabs-desktop .tab-btn.active { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }

.tab-btn .badge-count {
    background: var(--accent-blue);
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 8px;
    font-weight: 700;
}
.nav-tabs-mobile .tab-btn .badge-count {
    position: absolute;
    top: 0px;
    right: 50%;
    transform: translateX(50%);
    font-size: 0.55rem;
    padding: 2px 4px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
CONTENIDO PRINCIPAL
========================================================================== */
main {
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0 1rem 20px 1rem;
    width: 100%;
    flex: 1;
    overflow-x: hidden;
    box-sizing: border-box;
}

.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

h2 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
MERCADO - LAYOUT Y CONTROLES
========================================================================== */
.market-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
}

@media (min-width: 1024px) {
    .market-layout { grid-template-columns: 1fr 380px; align-items: start; }
    .trade-panel { position: sticky; top: 140px; }
}

.market-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    min-width: 0;
}

.market-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}
@media (min-width: 600px) { .market-controls { grid-template-columns: 2fr 1fr; } }

.control-group { display: flex; flex-direction: column; gap: 6px; }
.control-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }

.select-wrapper { position: relative; }
select {
    width: 100%;
    padding: 10px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    appearance: none;
    cursor: pointer;
}
.select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* ==========================================================================
GRÁFICO PRINCIPAL
========================================================================== */
.main-chart-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.chart-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-title { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.chart-subtitle { color: var(--text-secondary); font-size: 0.8rem; }
.chart-price-block { text-align: right; }
.chart-price { font-size: 1.5rem; font-family: 'Courier New', monospace; font-weight: 700; }
#chart-change { font-size: 0.85rem; font-weight: 600; }

.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 350px; 
}

@media (max-width: 768px) {
    .chart-canvas-wrapper {
        height: 220px !important;
        max-height: 40vh;
    }
    .chart-title { font-size: 1rem; }
    .chart-price { font-size: 1.2rem; }
    .chart-header-info { gap: 5px; }
}

/* Estadísticas del mercado en gráfico */
.chart-market-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 15px 0;
    padding: 15px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.chart-market-stats .stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 6px;
}

.chart-market-stats .stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
}

.chart-market-stats .stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.chart-market-stats .stat-value.high { color: var(--accent-green); }
.chart-market-stats .stat-value.low { color: var(--accent-red); }

/* Market Depth Info */
.market-depth-info {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.market-price-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: rgba(30, 41, 59, 0.6);
    padding: 6px 12px;
    border-radius: 6px;
    min-width: 85px;
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.market-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.market-value {
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
}
.market-value.bid { color: var(--accent-green); }
.market-value.ask { color: var(--accent-red); }
.market-value.spread { color: var(--accent-blue); }

/* ==========================================================================
PANEL DE TRADING
========================================================================== */
.trade-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .trade-panel {
        margin-top: 0 !important;
        padding-top: 15px !important;
        top: 20px !important;
    }
    .trade-panel h2 {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

.selector-group {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}
.selector-group::-webkit-scrollbar { display: none; }

.btn-select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    flex: 1;
    text-align: center;
}
.btn-select.active { background: var(--accent-blue); color: white; border-color: var(--accent-blue); }

.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 6px; font-size: 0.85rem; color: var(--text-secondary); }

input[type="number"], input[type="text"], .readonly-input {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    outline: none;
    font-size: 1rem;
    box-sizing: border-box;
}
input:focus { border-color: var(--accent-blue); }

/* Botones de porcentaje */
.percent-buttons-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.btn-percent {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-percent:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
}
.btn-percent:active { transform: translateY(0); }

/* Botones de acción */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.btn-trade {
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-buy { background: var(--accent-green); }
.btn-sell { background: var(--accent-red); }
.btn-trade:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-stop {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Información de tenencias */
.holding-info {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-bottom: 15px; 
}
.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.info-label { color: var(--text-secondary); }
.info-value { font-weight: 600; color: var(--text-primary); }

/* Panel de información de mercado */
.market-info-panel {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.market-price-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.price-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.market-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.market-stats-grid .stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: var(--bg-primary);
    border-radius: 6px;
    font-size: 0.8rem;
}

.market-stats-grid .stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.market-stats-grid .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}
.market-stats-grid .stat-value.bid { color: var(--accent-green); }
.market-stats-grid .stat-value.ask { color: var(--accent-red); }
.market-stats-grid .stat-value.high { color: var(--accent-green); }
.market-stats-grid .stat-value.low { color: var(--accent-red); }

/* Información de saldo */
.balance-info {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.balance-item:last-child { margin-bottom: 0; }

.balance-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.balance-value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

/* Información de fees */
.fee-info {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.fee-row:last-child {
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 1rem;
}

.fee-row span:last-child {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Responsive para panel de trading */
@media (max-width: 768px) {
    .market-stats-grid { grid-template-columns: 1fr; }
    .quantity-input-wrapper { flex-direction: column; }
    .quick-percent-buttons { flex-direction: row; flex-wrap: wrap; }
    .btn-percent { flex: 1; min-width: 60px; }
    .market-depth-info { gap: 8px; justify-content: center; }
    .market-price-item { min-width: 75px; padding: 5px 10px; }
    .market-label { font-size: 0.6rem; }
    .market-value { font-size: 0.8rem; }
    .market-stats-block { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px; }
    .chart-market-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; }
    .chart-market-stats .stat-label { font-size: 0.65rem; }
    .chart-market-stats .stat-value { font-size: 0.8rem; }
    .percent-buttons-container { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
TABLAS RESPONSIVAS
========================================================================== */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 600px;
}

th {
    text-align: left;
    color: var(--text-secondary);
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 10;
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    white-space: nowrap;
}

tr:last-child td { border-bottom: none; }

/* Botón cancelar */
.btn-cancel {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    min-width: 60px;
    text-align: center;
}
.btn-cancel:active { background: var(--accent-red); color: white; transform: scale(0.95); }

/* Botón cerrar orden */
.btn-close-order {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-close-order:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Info de activo */
.asset-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asset-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7931a, #ffb347);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    box-shadow: 0 2px 8px rgba(247, 147, 26, 0.3);
}

.asset-icon.eth {
    background: linear-gradient(135deg, #627eea, #8a95d6);
    box-shadow: 0 2px 8px rgba(98, 126, 234, 0.3);
}

.asset-icon.sol {
    background: linear-gradient(135deg, #00ffa3, #00d4aa);
    box-shadow: 0 2px 8px rgba(0, 255, 163, 0.3);
}

.asset-details {
    display: flex;
    flex-direction: column;
}

.asset-symbol {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.asset-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Porcentaje de portafolio */
.portfolio-percent {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.portfolio-percent span {
    font-weight: 600;
    min-width: 50px;
    text-align: right;
    font-size: 0.9rem;
}

.percent-bar {
    flex: 0 0 100px;
    height: 12px;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.percent-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 6px;
    transition: width 0.6s ease;
    position: relative;
    min-width: 3px;
}

.percent-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.percent-fill.high { background: linear-gradient(90deg, #10b981, #34d399); }
.percent-fill.medium { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.percent-fill.low { background: linear-gradient(90deg, #3b82f6, #8b5cf6); }

/* ==========================================================================
DASHBOARD Y GRÁFICOS
========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (min-width: 600px) { .dashboard-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}
.stat-card h3 { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; }
.stat-card .value { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.stat-card .sub { font-size: 0.75rem; margin-top: 4px; color: var(--text-secondary); }

.charts-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
}
@media (min-width: 900px) { .charts-row { grid-template-columns: 1fr 1fr; } }

.chart-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
}
.chart-box h3 { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 12px; font-weight: 600; }
.mini-chart-container {
    position: relative;
    height: 220px;
    width: 100%;
}

/* ==========================================================================
TICKER DESLIZANTE
========================================================================== */
#crypto-ticker {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

#ticker-content {
    display: inline-block;
    animation: scroll-left 120s linear infinite;
    will-change: transform;
}

#crypto-ticker:hover #ticker-content { animation-play-state: paused; }

.ticker-item {
    display: inline-block;
    padding: 0 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-right: 1px solid var(--border-color);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.ticker-item strong {
    color: var(--text-primary);
    font-weight: 700;
}

.ticker-item .price {
    font-weight: 600;
    margin: 0 5px;
}

.ticker-item span.up { color: var(--accent-green); font-weight: 600; }
.ticker-item span.down { color: var(--accent-red); font-weight: 600; }

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }
}

/* ==========================================================================
GRÁFICOS DE REFERENCIA
========================================================================== */
#info-charts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
}

.info-chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    flex: 1 1 calc(25% - 15px);
    min-width: 200px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    opacity: 0;
    transition: opacity 0.3s;
}

.info-chart-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.info-chart-card:hover::before { opacity: 1; }

.info-chart-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
}

.info-chart-stats strong { color: var(--text-primary); font-weight: 600; }

@media (max-width: 1024px) {
    .info-chart-card { flex: 1 1 calc(50% - 10px); }
    .info-chart-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .info-chart-card { flex: 1 1 100%; }
}

/* ==========================================================================
GAMIFICACIÓN
========================================================================== */
.gamification-bar {
    display: none;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.5);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
@media (min-width: 768px) { .gamification-bar { display: flex; } }

.level-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 80px;
}
.xp-bar-bg {
    width: 100%;
    height: 6px;
    background: #334155;
    border-radius: 3px;
    overflow: hidden;
}
.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    width: 0%;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}
.streak-info {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(249, 115, 22, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(249, 115, 22, 0.2);
}
.streak-count {
    font-weight: 800;
    color: #f97316;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

/* Badges de logros */
#badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
}
#badges-container > div {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    min-width: 120px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
#badges-container > div:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}
#badges-container .badge-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}
#badges-container .badge-name {
    font-weight: bold;
    color: #f8fafc;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}
#badges-container .badge-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    display: block;
}

/* ==========================================================================
SECCIONES FULL WIDTH - ÓRDENES, TENENCIAS Y MERCADOS
========================================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.section-header h2 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.section-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}

.section-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-item {
    padding: 8px 14px;
    background: var(--bg-primary);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.stat-item strong {
    margin-left: 5px;
    color: var(--text-primary);
    font-weight: 600;
}

.btn-close-all {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-close-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Tabla Full Width */
.table-responsive-full {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-primary);
    -webkit-overflow-scrolling: touch;
}

.table-full-width {
    width: 100% !important;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}

.table-full-width thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-full-width th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-full-width td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-full-width tbody tr {
    transition: all 0.2s;
}

.table-full-width tbody tr:hover {
    background: var(--bg-secondary);
}

/* ==========================================================================
MERCADOS - FULL WIDTH
========================================================================== */
.markets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.markets-header h2 {
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.market-stats-summary {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--bg-primary);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-badge.up {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-badge.down {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.market-filters-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.search-box-full {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.search-box-full input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-box-full input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-tabs-full {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab-full {
    padding: 10px 18px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-tab-full:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
}

.filter-tab-full.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.markets-table-container-full {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-primary);
}

.markets-table-full {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.markets-table-full thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.markets-table-full th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.markets-table-full td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.markets-table-full tbody tr {
    transition: all 0.2s;
}

.markets-table-full tbody tr:hover {
    background: var(--bg-secondary);
    transform: scale(1.005);
}

/* Colores condicionales para mercados */
.price-positive { color: #10b981; font-weight: 600; }
.price-negative { color: #ef4444; font-weight: 600; }
.change-positive { color: #10b981; font-weight: 600; }
.change-negative { color: #ef4444; font-weight: 600; }
.volume-high { color: #f59e0b; font-weight: 600; }
.volume-medium { color: #3b82f6; }
.volume-low { color: var(--text-secondary); }

.coin-info-full {
    display: flex;
    align-items: center;
    gap: 15px;
}

.coin-icon-full {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.coin-details-full {
    display: flex;
    flex-direction: column;
}

.coin-symbol-full {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.coin-name-full {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.price-display {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.change-display {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
}

.change-display.positive {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.change-display.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.volume-display,
.marketcap-display {
    display: flex;
    flex-direction: column;
}

.volume-value,
.marketcap-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.volume-label,
.marketcap-change {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.action-buttons-full {
    display: flex;
    gap: 8px;
}

.btn-trade-full {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-buy-full {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-buy-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-sell-full {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-sell-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Responsive para Full Width */
@media (max-width: 1024px) {
    .section-header,
    .markets-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .section-stats {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-item {
        width: 100%;
        text-align: center;
    }
    
    .market-filters-full {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box-full {
        max-width: 100%;
    }
    
    .filter-tabs-full {
        justify-content: center;
    }
    
    .table-full-width th:nth-child(6),
    .table-full-width td:nth-child(6),
    .table-full-width th:nth-child(8),
    .table-full-width td:nth-child(8),
    .markets-table-full th:nth-child(4),
    .markets-table-full td:nth-child(4),
    .markets-table-full th:nth-child(5),
    .markets-table-full td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .table-full-width th:nth-child(4),
    .table-full-width td:nth-child(4),
    .table-full-width th:nth-child(7),
    .table-full-width td:nth-child(7),
    .markets-table-full th:nth-child(4),
    .markets-table-full td:nth-child(4),
    .markets-table-full th:nth-child(5),
    .markets-table-full td:nth-child(5) {
        display: none;
    }
    
    .btn-close-order {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .asset-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .action-buttons-full {
        flex-direction: column;
    }
    
    .btn-trade-full {
        width: 100%;
    }
}

/* Forzar layout de tabla correcto */
.table-full-width {
    table-layout: fixed !important;
    width: 100% !important;
}

.table-full-width th,
.table-full-width td {
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-responsive-full {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
}

#market > .full-width-section:first-of-type {
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 !important;
}

#market-active-orders-body tr td:last-child {
    text-align: right;
}

/* ==========================================================================
TOAST NOTIFICATIONS
========================================================================== */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: 90%;
    max-width: 400px;
    background: var(--card-bg);
    border-left: 4px solid var(--accent-blue);
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { border-left-color: var(--accent-red); }
.toast.success { border-left-color: var(--accent-green); }

/* ==========================================================================
SISTEMA DE REFERIDOS
========================================================================== */
.referral-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.referral-card h3 {
    color: var(--accent-blue);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.referral-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.referral-code-display code {
    background: var(--input-bg);
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    border: 2px dashed var(--accent-blue);
    letter-spacing: 2px;
}

.btn-copy {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-copy:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.referral-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 10px;
}

.referral-link {
    margin: 25px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.referral-link label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.link-display {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.link-display input {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.9rem;
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.stat-box {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-blue);
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.referrals-list {
    margin-top: 30px;
}

.referrals-list h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

#referrals-table {
    width: 100%;
    border-collapse: collapse;
}

#referrals-table th,
#referrals-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

#referrals-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

#referrals-table tbody tr:hover {
    background: var(--bg-secondary);
}

@media (max-width: 768px) {
    .referral-code-display code {
        font-size: 1.2rem;
        padding: 12px 20px;
    }
    
    .referral-stats {
        grid-template-columns: 1fr;
    }
    
    .link-display {
        flex-direction: column;
    }
    
    .link-display input {
        min-width: 100%;
    }
}

/* ==========================================================================
MINERÍA EDUCOIN - ESTILOS
========================================================================== */
.mining-dashboard {
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.mining-header {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--background) 100%);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.mining-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--accent-blue);
}

.mining-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Stats Grid */
.mining-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.mining-stat {
    background: linear-gradient(145deg, var(--card-bg), var(--background));
    border: 1px solid var(--border-color);
    text-align: center;
    padding: 1.25rem;
    border-radius: var(--radius);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mining-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

.mining-stat h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mining-stat .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.mining-stat small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Mining Grid Layout */
.mining-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .mining-grid { grid-template-columns: 1fr; }
}

/* Mining Cards */
.mining-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.mining-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.mining-card .card-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

/* Transaction List */
.mining-tx-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

.mining-tx-list .tx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.mining-tx-list .tx-item:last-child { border-bottom: none; }
.mining-tx-list .tx-item:hover { background: rgba(255, 255, 255, 0.03); }
.mining-tx-list .tx-amount { color: var(--accent-green); font-weight: 600; font-family: monospace; }

/* Mining Status & Progress */
.mining-status-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    min-height: 24px;
    font-size: 0.95rem;
}

.mining-progress-wrapper {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.progress-bar-bg {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-bar-fill.mining {
    animation: pulse-progress 1.5s infinite;
}

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

.progress-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Mining Button */
.btn-mining-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    margin: 1rem 0;
}

.btn-mining-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-mining-primary:active { transform: translateY(0); }

.btn-mining-primary:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.btn-mining-primary.mining {
    background: linear-gradient(135deg, var(--accent-red), #dc2626);
    animation: pulse-btn 1.5s infinite;
}

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.btn-icon { font-size: 1.2rem; }

/* Mining Coin Selector */
.mining-coin-selector {
    margin: 1.5rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.mining-coin-selector label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.select-mining {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.select-mining:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Mining Info Box */
.mining-info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
}

.mining-info-box small {
    color: var(--text-secondary);
    line-height: 1.5;
}

.mining-info-box strong { color: var(--accent-blue); }

/* Blockchain List */
.mining-blockchain-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.blockchain-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Block Card */
.block-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
}

.block-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-blue);
}

.block-card.genesis {
    border-left: 3px solid var(--accent-orange);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--background));
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.block-index {
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 1rem;
}

.block-reward {
    background: var(--accent-green);
    color: var(--background);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.block-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.block-detail span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

.block-hash {
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: var(--card-bg);
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    word-break: break-all;
    color: var(--accent-green);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.block-hash:hover { background: var(--border-color); }
.block-hash.verified { color: var(--accent-blue); }

.block-tx-count {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.block-timestamp {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
}

/* Mining Footer */
.mining-footer {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    text-align: center;
}

.mining-footer small {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Mining Status States */
.mining-status {
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.mining-status.mining {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    animation: pulse 2s infinite;
}

.mining-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

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

.progress-text {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-family: monospace;
}

.progress-text.success {
    color: var(--accent-green);
    font-weight: 600;
}

.block-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

.block-hash.verified {
    color: var(--accent-green);
    font-weight: 600;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mining-section {
    animation: fadeIn 0.3s ease;
}

.mining-status {
    transition: all 0.3s ease;
}

.mining-status.mining {
    background: rgba(59, 130, 246, 0.2) !important;
    color: var(--accent-blue) !important;
    animation: pulse 2s infinite;
}

.mining-status.success {
    background: rgba(16, 185, 129, 0.2) !important;
    color: var(--accent-green) !important;
}

.admin-table code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    color: var(--accent-green);
}

/* ==========================================================================
GRÁFICO DE HASHRATE MEJORADO - CSS
========================================================================== */

/* Contenedor principal con efecto glassmorphism */
.hashrate-chart-container {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo animado */
.hashrate-chart-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(59, 130, 246, 0.05) 50%,
        transparent 70%
    );
    animation: shine 8s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Tarjetas de estadísticas con animación */
.stat-card-hashrate {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card-hashrate:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Barra de progreso animada */
.progress-bar-hashrate {
    height: 6px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.75rem;
    position: relative;
}

.progress-fill-hashrate {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    animation: gradientShift 3s ease infinite;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Contador animado tipo slot machine */
.animated-counter {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    display: inline-block;
    min-width: 120px;
}

/* Indicador de actividad con partículas */
.mining-active-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 600;
}

.mining-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    animation: pulse-dot 1.5s infinite;
}

.mining-dot::before,
.mining-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: ripple 1.5s infinite;
}

.mining-dot::after {
    animation-delay: 0.5s;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

@keyframes ripple {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* Gráfico de barras animado */
.bars-chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 150px;
    gap: 4px;
    padding: 1rem 0;
    position: relative;
}

.bar-item {
    flex: 1;
    background: linear-gradient(180deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
    position: relative;
    min-height: 4px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.bar-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px 2px 0 0;
}

.bar-item.peak {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* Círculo de progreso */
.circular-progress {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 0 auto;
}

.circular-progress svg {
    transform: rotate(-90deg);
}

.circular-progress .bg {
    fill: none;
    stroke: rgba(59, 130, 246, 0.2);
    stroke-width: 8;
}

.circular-progress .progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    transition: stroke-dashoffset 0.5s ease;
}

/* Efecto de partículas flotantes */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(59, 130, 246, 0.6);
    border-radius: 50%;
    animation: float 10s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Badge de nuevo bloque con animación */
.new-block-badge {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    animation: slideIn 0.5s ease, pulse-glow 2s infinite;
    z-index: 1000;
    display: none;
}

.new-block-badge.show { display: block; }

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 8px 32px rgba(16, 185, 129, 0.7); }
}

/* Temperatura simulada */
.temperature-gauge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.temp-value {
    font-weight: 700;
    color: #f59e0b;
    font-family: 'Courier New', monospace;
}

.temp-icon {
    animation: heatPulse 2s infinite;
}

@keyframes heatPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* ==========================================================================
MINING INTERFACE STYLES - CORREGIDO
========================================================================== */

/* ✅ SELECTORES UNIFICADOS - SIN DUPLICADOS */
.mining-status {
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.mining-status.mining {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    animation: pulse 2s infinite;
}

.mining-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

/* ✅ ACCESIBILIDAD - Estados de foco */
.btn-mining-primary:focus-visible,
.select-mining:focus-visible,
.lev-btn:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

/* ✅ PERFORMANCE - will-change para animaciones */
.bar-item,
.progress-bar-fill,
.stat-card-hashrate {
    will-change: transform, opacity;
}

/* ✅ RESPONSIVE - Móviles muy pequeños */
@media (max-width: 480px) {
    .mining-header h2 { font-size: 1.2rem; }
    .mining-stat .value { font-size: 1.2rem; }
    .bars-chart-container { height: 100px; gap: 2px; }
    .mining-stats-grid { grid-template-columns: 1fr; }
    
    .stat-card-hashrate:hover,
    .block-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ✅ INCLUSIVIDAD - Respetar preferencias de movimiento */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .particles-container { display: none; }
}

/* ✅ KEYFRAMES UNIFICADOS - AL FINAL DEL ARCHIVO */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

@keyframes ripple {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 8px 32px rgba(16, 185, 129, 0.7); }
}

@keyframes heatPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Scrollbars personalizados */
.mining-tx-list::-webkit-scrollbar,
.mining-blockchain-list::-webkit-scrollbar {
    width: 6px;
}

.mining-tx-list::-webkit-scrollbar-track,
.mining-blockchain-list::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 3px;
}

.mining-tx-list::-webkit-scrollbar-thumb,
.mining-blockchain-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.mining-tx-list::-webkit-scrollbar-thumb:hover,
.mining-blockchain-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mining-header h2 { font-size: 1.4rem; }
    .mining-stat .value { font-size: 1.4rem; }
    
    .block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .block-detail {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}

.mining-terminal-wrapper {
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}
.terminal-header {
    background: #111;
    padding: 8px 15px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.8rem;
}
.terminal-status { color: #10b981; }
.terminal-body {
    height: 150px;
    overflow-y: hidden; /* Oculta scroll manual */
    padding: 10px;
    color: #00ff00;
    font-size: 0.75rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Empuja texto hacia abajo */
}
.log-line { margin: 2px 0; opacity: 0.8; }
.log-line.success { color: #10b981; font-weight: bold; text-shadow: 0 0 5px #10b981; }
.log-line.fail { color: #555; }

/* ==========================================
   MINERÍA MEJORADA - ESTILOS ADICIONALES
   ========================================== */

/* Stats Grid Avanzado */
.mining-stats-grid.advanced {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mining-stats-grid.advanced .stat-card {
    background: linear-gradient(145deg, var(--card-bg), var(--card-bg-light));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mining-stats-grid.advanced .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.mining-stats-grid.advanced .stat-card h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.mining-stats-grid.advanced .stat-card .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.25rem;
}

.mining-stats-grid.advanced .stat-card small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Pool Mining Styles */
.pool-selector {
    margin: 1rem 0;
}

.pool-selector .select-mining {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.pool-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pool-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.pool-stat-row:last-child {
    border-bottom: none;
}

.pool-stat-row strong {
    color: var(--accent-green);
}

/* Profitability Calculator */
.profitability-display {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.proj-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.proj-row strong {
    color: var(--accent-green);
    font-weight: 600;
}

/* Chart Type Toggle */
#chart-type-toggle {
    display: flex;
    gap: 4px;
}

.chart-type-btn {
    background: var(--card-bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.chart-type-btn:hover {
    background: var(--border-color-light);
}

.chart-type-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

/* Progress Bar para Próximo Bloque */
.mining-progress-wrapper {
    margin: 1rem 0;
}

.progress-bar-bg {
    background: var(--border-color);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .mining-stats-grid.advanced {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profitability-display {
        grid-template-columns: 1fr;
    }
}

/* Animación para notificaciones */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

.notification-success {
    animation: pulse-glow 2s infinite;
}