:root {
    --bg-dark: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --border-glow: rgba(56, 189, 248, 0.3);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #38bdf8;
    --accent-purple: #818cf8;
    --accent-green: #34d399;
    --accent-red: #f87171;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-blue), transparent 70%);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Typography & Layout */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo h1 span {
    color: var(--accent-blue);
}

.version-badge {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Inputs & Forms */
.bankroll-setup {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bankroll-setup label {
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .currency {
    position: absolute;
    left: 1rem;
    color: var(--accent-blue);
    font-weight: bold;
}

.input-group input {
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 0.8rem 1rem 0.8rem 2rem;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    width: 150px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.input-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px var(--border-glow);
}

/* Glassmorphism Cards */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.match-card {
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.match-card:hover::before {
    opacity: 1;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.match-teams {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vs {
    font-size: 0.9rem;
    color: var(--accent-purple);
    font-style: italic;
    align-self: center;
}

.match-odds {
    display: flex;
    justify-content: space-between;
    background: rgba(0,0,0,0.3);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.odd-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.odd-pill span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.odd-pill strong {
    color: var(--accent-blue);
    font-family: 'Outfit', sans-serif;
}

.btn-analyze {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.1s ease;
}

.btn-analyze:active {
    transform: scale(0.98);
}

.btn-analyze:hover {
    opacity: 0.9;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.glass-panel {
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--accent-red);
}

/* Analysis State */
.analyzing-state {
    text-align: center;
    padding: 3rem 0;
}

.scanner {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Markdown styling for Result */
.result-state {
    line-height: 1.6;
}

.result-state h1, .result-state h2, .result-state h3 {
    color: var(--accent-blue);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.result-state p {
    margin-bottom: 1rem;
}

.result-state strong {
    color: var(--accent-green);
}

.team-container { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.team-logo { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)); }
.time { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); padding: 0.3rem 0.8rem; border-radius: 20px; font-weight: 600; font-size: 0.75rem; border: 1px solid rgba(56, 189, 248, 0.3); white-space: nowrap; }

.controls-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.search-box { flex-grow: 1; display: flex; align-items: center; background: var(--panel-bg); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 0.5rem 1rem; }
.search-box input { background: none; border: none; color: white; width: 100%; padding-left: 10px; font-family: 'Outfit', sans-serif; font-size: 1rem; outline: none; }
.api-switch { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--text-secondary); }
.api-switch select { background: var(--panel-bg); color: white; border: 1px solid var(--accent-blue); padding: 0.5rem 1rem; border-radius: 8px; font-weight: bold; outline: none; cursor: pointer; }
.quick-filters { display: flex; gap: 0.5rem; margin-bottom: 2rem; overflow-x: auto; padding-bottom: 0.5rem; }
.filter-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-secondary); padding: 0.5rem 1rem; border-radius: 20px; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; }
.filter-btn.active, .filter-btn:hover { background: var(--accent-blue); color: #000; font-weight: bold; }

/* ==========================================
   Analysis Studio & Visual Picks Layout
   ========================================== */
.hidden {
    display: none !important;
}

.analysis-studio {
    animation: fadeIn 0.4s ease-out;
}

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

.studio-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: white;
    color: black;
    border-color: white;
}

.studio-title-container h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
}

.competition-badge {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-blue);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.studio-loading {
    text-align: center;
    padding: 6rem 0;
}

.studio-loading h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.studio-loading p {
    color: var(--text-secondary);
}

.studio-workspace {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.studio-report {
    flex: 3;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2.5rem;
    line-height: 1.7;
    backdrop-filter: blur(20px);
}

.report-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.report-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: var(--accent-blue);
    margin-top: 1.5rem;
    margin-bottom: 0.7rem;
    font-family: 'Outfit', sans-serif;
}

.markdown-body p {
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
}

.markdown-body th, .markdown-body td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.markdown-body th {
    background: rgba(255,255,255,0.05);
    color: var(--accent-purple);
    font-weight: bold;
}

/* Columna de Widgets */
.studio-sidebar {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 20px;
}

.studio-pick-card {
    width: 100%;
}

.pick-visual-card {
    background: linear-gradient(145deg, rgba(30,41,59,0.9), rgba(15,23,42,0.95));
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.pick-visual-card.bet-approved {
    border: 2px solid var(--accent-green);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.2);
}

.pick-visual-card.bet-declined {
    border: 2px solid rgba(248, 113, 113, 0.4);
    box-shadow: 0 0 30px rgba(248, 113, 113, 0.05);
}

.pick-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.5rem 1.5rem;
    border-bottom-left-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.badge-win {
    background: var(--accent-green);
    color: #000;
}

.badge-lose {
    background: var(--text-secondary);
    color: #fff;
}

.pick-market-container {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.pick-market-container .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.pick-market {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.pick-odds-display {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pick-odds-display span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: bold;
}

.pick-odds-display strong {
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-family: 'Outfit', sans-serif;
}

.veto-warning {
    color: var(--accent-red);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.divider-line {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 1.5rem 0;
}

.pick-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-box {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-box .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
    font-weight: bold;
}

.stat-box .value {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.text-green { color: var(--accent-green); }
.text-orange { color: #f97316; }
.text-blue { color: var(--accent-blue); }

.stake-projection-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stake-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.stake-row span {
    color: var(--text-secondary);
}

.stake-value {
    font-size: 1.3rem;
    color: white;
}

.profit-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.return-row {
    margin-top: 0.5rem;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(255,255,255,0.1);
}

.return-value {
    font-size: 1.2rem;
    color: var(--accent-purple);
}

.pick-justification {
    margin-top: 1.5rem;
}

.pick-justification .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.pick-justification p {
    font-style: italic;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.error-pick-card {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid var(--accent-red);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    color: var(--accent-red);
}

/* Responsividad */
@media (max-width: 900px) {
    .studio-workspace {
        flex-direction: column;
    }
    
    .studio-sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
}

/* ==========================================
   Matrix de Probabilidades (v2.7.0 Pro)
   ========================================== */
.pick-matrix-card {
    background: linear-gradient(145deg, rgba(30,41,59,0.7), rgba(15,23,42,0.85));
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.matrix-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 0.8rem;
}

.matrix-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.badge-v2 {
    background: rgba(147, 51, 234, 0.15);
    color: var(--accent-purple);
    padding: 0.15rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid rgba(147, 51, 234, 0.3);
}

/* Pestañas Neomórficas Premium */
.matrix-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.03);
}

.matrix-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.6rem 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.matrix-tab-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.02);
}

.matrix-tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(147, 51, 234, 0.25));
    border: 1px solid rgba(147, 51, 234, 0.2);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.1);
}

/* Grid Espaciado y Holgado */
.matrix-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.4rem;
}

/* Personalización del Scrollbar */
.matrix-grid::-webkit-scrollbar {
    width: 6px;
}
.matrix-grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}
.matrix-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

/* Tarjetas Individuales Ampliadas */
.matrix-item {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 18px;
    padding: 1.1rem 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.matrix-item:hover {
    background: rgba(30, 41, 59, 0.45);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-3px);
}

.matrix-item-recommended {
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.04);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(0,0,0,0.3));
}

.matrix-item-recommended:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.15);
}

.matrix-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.matrix-item-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Logotipos y Avatars de Equipos */
.matrix-team-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.matrix-team-logo-draw {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.08);
}

.matrix-team-logos-combined {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.matrix-logo-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
}

.draw-small {
    background: rgba(255,255,255,0.05);
    padding: 0 0.3rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Iconos de Goles y BTTS */
.matrix-icon-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.matrix-icon-badge.bg-green { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.matrix-icon-badge.bg-red { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.matrix-icon-badge.bg-purple { background: rgba(147, 51, 234, 0.15); color: #c084fc; border: 1px solid rgba(147, 51, 234, 0.2); }
.matrix-icon-badge.bg-gray { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.2); }

.matrix-market-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
}

.rec-badge {
    background: var(--accent-green);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.matrix-progress-container {
    height: 16px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.03);
}

.matrix-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), #06b6d4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: width 0.8s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.matrix-item-recommended .matrix-progress-bar {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.matrix-prob-value {
    font-size: 0.75rem;
    font-weight: 800;
    color: #000;
    margin-right: 8px;
    font-family: 'Outfit', sans-serif;
}

.matrix-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.category-tag {
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.8px;
}

.ev-badge {
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.text-red { color: #f87171; }
.text-gray { color: var(--text-secondary); }

/* ==========================================
   Estilos de Navegación del Header
   ========================================== */
.header-nav {
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.nav-btn.active {
    color: white;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.3));
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

/* ==========================================
   Portafolio & KPIs Dashboard (v2.8.0)
   ========================================== */
.portfolio-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeInUp 0.4s ease-out;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.kpi-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.85));
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.1);
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0.2rem 0;
}

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

/* ==========================================
   Ledger / Historial de Apuestas
   ========================================== */
.portfolio-ledger {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.75));
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ledger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
}

.ledger-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
}

.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.no-picks-placeholder {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-secondary);
}

.no-picks-placeholder p {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

/* Items individuales del Ledger */
.ledger-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ledger-item:hover {
    background: rgba(30, 41, 59, 0.55);
    transform: translateX(4px);
    border-color: rgba(255,255,255,0.08);
}

/* Efectos por estados */
.ledger-item.status-ganado {
    border-left: 5px solid var(--accent-green);
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.05);
}

.ledger-item.status-perdido {
    border-left: 5px solid #ef4444;
    opacity: 0.75;
}

.ledger-item.status-pendiente {
    border-left: 5px solid #fbbf24;
}

.ledger-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ledger-teams-wrapper h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.2rem;
}

.competition-badge-small {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.ledger-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.ledger-item-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 12px;
}

.ledger-metric-box {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ledger-metric-box.small {
    max-width: 60px;
}

.ledger-metric-box .lbl {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: bold;
    letter-spacing: 0.5px;
}

.ledger-metric-box .val {
    font-size: 1rem;
    font-weight: bold;
    color: white;
}

.ledger-item.status-perdido .ledger-metric-box.highlight-profit .val {
    color: #ef4444 !important;
    text-decoration: line-through;
}

.ledger-item.status-pendiente .ledger-metric-box.highlight-profit .val {
    color: #fbbf24 !important;
}

/* Footer & Selectores de Estado del Ledger */
.ledger-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.status-lbl {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: bold;
}

.status-badge-group {
    display: flex;
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.03);
}

.badge-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.badge-toggle:hover {
    color: white;
}

.badge-toggle.toggle-pending.active {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.1);
}

.badge-toggle.toggle-won.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.badge-toggle.toggle-lost.active {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-delete-pick {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-delete-pick:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ==========================================
   Estilo del Botón de Guardado en la Pick Card
   ========================================== */
.btn-save-pick {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    color: white;
    padding: 0.9rem;
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-save-pick:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.35);
    filter: brightness(1.1);
}

.btn-save-pick:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-save-pick.saved {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid var(--accent-green);
    color: var(--accent-green) !important;
    box-shadow: none !important;
}

/* ==========================================
   Notificaciones Toast Premium
   ========================================== */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10000;
    backdrop-filter: blur(15px);
    transform: translateY(100px) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast-notification.success {
    border: 1px solid var(--accent-green);
    box-shadow: 0 0 25px rgba(52, 211, 153, 0.15);
}

.toast-notification.error {
    border: 1px solid #ef4444;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.15);
}

.toast-notification span {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: white;
}

/* Rediseño ultra-premium del Ledger */
.ledger-match-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.ledger-team {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.ledger-team.team-a {
    justify-content: flex-start;
}

.ledger-team.team-b {
    justify-content: flex-end;
    text-align: right;
}

.ledger-team-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.ledger-team span {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

.ledger-vs-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin: 0 1rem;
}

.ledger-played-market {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.8rem;
}

.played-market-lbl {
    font-size: 0.7rem;
    font-weight: 800;
    color: #818cf8;
    letter-spacing: 0.8px;
}

.played-market-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
}

.ledger-outcome-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.outcome-ganado {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.outcome-perdido {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.outcome-pendiente {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

/* ==========================================
   Matrix Manual Pick Modal & Row Actions (v2.8.8)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 15, 30, 0.75);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    width: 90%;
    max-width: 460px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.15);
    padding: 2rem;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
    margin-bottom: 1.2rem;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.btn-close-modal:hover {
    color: var(--accent-red);
}

.modal-match-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.modal-teams {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.modal-competition {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-market-box {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), rgba(147, 51, 234, 0.12));
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
}

.modal-market-box .label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent-blue);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.4rem;
}

.modal-market-box h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.4rem;
}

.modal-badge-prob {
    font-size: 0.75rem;
    color: #a78bfa;
    font-weight: bold;
}

.modal-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.modal-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.modal-input-group label {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.modal-input-group input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    outline: none;
    transition: all 0.3s ease;
}

.modal-input-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.modal-projection-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.modal-projection-row span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.modal-projection-row strong {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-green);
}

.btn-confirm-save {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    color: white;
    padding: 0.9rem;
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-confirm-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.35);
    filter: brightness(1.1);
}

/* Botón de Agregar en la Matriz */
.btn-matrix-add {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-matrix-add:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.2));
    border-color: rgba(16, 185, 129, 0.4);
    color: white;
    transform: translateY(-1px);
}



