:root {
    --bg-main: #0B1120;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --accent: #3B82F6;
    --accent-rgb: 59, 130, 246;
    --accent-hover: #2563EB;
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --eliminated-color: #fca5a5;
    --qualified-bg: rgba(16, 185, 129, 0.15);
    --qualified-border: rgba(16, 185, 129, 0.4);
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    background-image: radial-gradient(circle at 50% -20%, #1e3a8a 0%, var(--bg-main) 60%);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    background: rgba(11, 17, 32, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 2000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-wrap: wrap;
    gap: 1rem;
}

.header-nav {
    width: 100%;
    order: 3;
    display: flex;
    justify-content: center;
}

@media (min-width: 1024px) {
    .app-header {
        padding: 0.75rem 2.5rem;
        gap: 2rem;
    }
    .header-nav {
        width: auto;
        order: 2;
        margin-top: 0;
    }
    .header-controls {
        order: 3;
    }
}

.logo-container {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.sub-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: dot-pulse 1.5s infinite;
}

@keyframes dot-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.credits {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    line-height: 1.1;
}

.credits span {
    font-size: 0.55rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.8;
}

.credits strong {
    font-size: 0.65rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.2px;
}

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

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #3B82F6, #10B981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    background: var(--success-bg);
    color: var(--success);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-reset {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #2563EB);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-full {
    width: 100%;
}

.app-main {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.standings-pane, .tools-pane {
    min-width: 0;
}

.show-mobile {
    display: none !important;
}

@media (min-width: 1024px) {
    .tab-pane-mobile {
        display: block !important;
    }
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pane-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    padding-left: 0.75rem;
    border-left: 4px solid var(--accent);
}

.legend {
    font-size: 0.75rem;
    color: var(--success);
    background: var(--success-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--qualified-border);
}

.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow-x: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

td {
    padding: 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
    vertical-align: middle;
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.col-num {
    text-align: center;
    width: 45px;
}

.col-pos {
    width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
}

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

tbody tr.qualified {
    background: var(--qualified-bg);
}

tbody tr.qualified .col-pos {
    color: var(--success);
}

tbody tr.qualified:hover td {
    background: rgba(16, 185, 129, 0.2);
}

.tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

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

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 700px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.matches-list::-webkit-scrollbar {
    width: 6px;
}

.matches-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.match-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    width: 60px;
}

.team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    flex: 1;
}

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

.team.away {
    justify-content: flex-start;
    text-align: left;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.match-inputs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.match-inputs input {
    width: 38px;
    height: 34px;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: white;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--font-main);
}

.match-inputs input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.match-inputs span {
    color: var(--text-secondary);
    font-weight: 600;
}

.analysis-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.card .description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-box.danger { border-color: rgba(239, 68, 68, 0.3); background: var(--danger-bg); }
.stat-box.success { border-color: rgba(16, 185, 129, 0.3); background: var(--success-bg); }

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.stat-box.danger .stat-label { color: var(--danger); }
.stat-box.success .stat-label { color: var(--success); }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1rem;
}

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

select {
    width: 100%;
    padding: 0.85rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--accent);
}

.analysis-result {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.875rem;
}

.analysis-result.empty {
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

.scenario-p {
    margin-bottom: 0.5rem;
}
.scenario-p strong {
    color: var(--accent);
}

/* Progress bar for Monte Carlo */
.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    transition: width 0.1s;
}

/* Custom Tooltip */
.custom-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.custom-tooltip-text {
    visibility: hidden;
    width: max-content;
    max-width: 260px;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    text-align: left;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    position: absolute;
    z-index: 100;
    bottom: 140%;
    right: 0;
    font-size: 0.75rem;
    font-weight: 400;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    transform: translateY(10px);
    pointer-events: none;
    line-height: 1.4;
    white-space: normal;
}

.custom-tooltip-text span {
    font-weight: 600;
    color: #F8FAFC;
}

.custom-tooltip:hover .custom-tooltip-text,
.custom-tooltip:active .custom-tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Probabilities Bar Chart */
.prob-chart-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.prob-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prob-team {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    padding: 3px;
}

.prob-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.prob-bar-wrapper {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    height: 26px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.prob-bar {
    height: 100%;
    background: linear-gradient(90deg, #1e40af, var(--accent));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
}

.prob-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* Miracle Button */
.btn-miracle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    font-weight: 800;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    animation: pulse-glow 2s infinite;
}

.btn-miracle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

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

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Standings Highlight */
.highlight-miracle {
    background-color: rgba(16, 185, 129, 0.25) !important;
    border-left: 4px solid var(--success) !important;
    transition: background-color 0.5s ease;
}

/* Reset Button Alert Pulse */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pulse-danger {
    animation: pulse-red 1.5s infinite !important;
    background-color: var(--danger) !important;
    color: white !important;
    border-color: var(--danger) !important;
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .app-header {
        flex-direction: column;
        padding: 1.25rem 1rem;
        gap: 1.5rem;
        text-align: center;
    }
    
    .title-row {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-title {
        font-size: 1.75rem;
    }
    
    .header-controls {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }
    
    .credits {
        text-align: center;
        order: 2;
    }
    
    #resetBtn {
        width: 100%;
        order: 1;
    }
    
    .app-main {
        grid-template-columns: 1fr;
        padding: 0.5rem;
        gap: 0;
    }
    .tab-pane-mobile {
        display: none;
    }
    .tab-pane-mobile.active {
        display: block;
    }
    .show-mobile {
        display: flex !important;
    }
    .hide-mobile {
        display: none;
    }
    table {
        min-width: 100%;
        width: 100%;
        table-layout: fixed;
    }
    th, td {
        padding: 0.4rem 0.2rem;
        font-size: 0.7rem;
    }
    .col-pos {
        width: 25px;
    }
    .col-team {
        width: auto;
        padding-left: 0.25rem;
    }
    .col-num {
        width: 32px;
    }
    .team-info {
        gap: 0.35rem;
    }
    .team-logo {
        width: 18px;
        height: 18px;
    }
    .team-name {
        font-size: 0.75rem;
    }
    .matches-list {
        max-height: 500px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tabs {
        flex-direction: row;
        width: 100%;
        gap: 0.25rem;
        justify-content: center;
    }
    .tab-btn {
        flex: 1;
        padding: 0.6rem 0.25rem;
        font-size: 0.75rem;
        text-align: center;
        justify-content: center;
    }
    .tab-btn.active {
        background: var(--accent);
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    }
    .app-header {
        padding: 0.75rem 1rem;
    }
    /* Tooltips en móvil se centran para no desbordar por los lados */
    .custom-tooltip-text {
        right: auto;
        left: 50%;
        transform: translateX(-80%) translateY(10px);
        max-width: 200px;
    }
    .custom-tooltip:hover .custom-tooltip-text,
    .custom-tooltip:active .custom-tooltip-text {
        transform: translateX(-80%) translateY(0);
    }
}

/* Footer & SEO Section */
.app-footer {
    margin-top: 4rem;
    padding: 3rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.seo-section {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.seo-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seo-section p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.seo-section strong {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Team Select */
.custom-select-container {
    position: relative;
    width: 100%;
    margin-top: 1rem;
    z-index: 100;
}

.select-trigger {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-weight: 600;
}

.select-trigger:hover {
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.8);
}

.select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.select-options.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

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

.option-item {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.option-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.option-item.selected {
    background: var(--accent-hover);
}

.option-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.option-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.option-item.is-eliminated .option-name {
    color: var(--eliminated-color);
    opacity: 0.8;
}

.option-item.is-eliminated::after {
    content: 'ELIMINADO';
    font-size: 0.6rem;
    font-weight: 800;
    background: var(--danger-bg);
    color: var(--danger);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: auto;
}

/* Collapsible Match Rounds */
.match-round-group {
    margin-bottom: 0.75rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.round-header {
    padding: 0.6rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.round-header span:first-child {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.round-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-left: auto;
    margin-right: 1.5rem;
}

.round-toggle {
    font-size: 0.6rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
}

.round-matches-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.75rem;
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .round-matches-list {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }
}

/* Row Highlight Animation */
.row-highlight {
    background: rgba(var(--accent-rgb), 0.25) !important;
    box-shadow: inset 4px 0 0 var(--accent);
    animation: pulseHighlight 2s infinite;
}

@keyframes pulseHighlight {
    0% { background: rgba(var(--accent-rgb), 0.15); }
    50% { background: rgba(var(--accent-rgb), 0.35); }
    100% { background: rgba(var(--accent-rgb), 0.15); }
}

/* Highlight transition for standings rows */
.standings-table tr {
    transition: background 0.5s ease;
}

/* Responsive Fixes for Fixture */
@media (max-width: 500px) {
    .match-card {
        padding: 0.75rem 0.4rem;
    }
    
    .match-teams {
        gap: 0.4rem;
        width: 100%;
    }

    .team {
        font-size: 0.72rem;
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .team.home {
        justify-content: flex-end;
        text-align: right;
    }
    
    .team.away {
        justify-content: flex-start;
        text-align: left;
    }

    .team img {
        width: 18px !important;
        height: 18px !important;
        flex-shrink: 0;
        object-fit: contain;
    }

    .match-inputs {
        gap: 0.25rem;
        padding: 0.15rem;
    }

    .match-inputs input {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .round-header {
        padding: 0.75rem 0.5rem;
    }

    .round-header span:first-child {
        font-size: 0.75rem;
    }

    .round-count {
        font-size: 0.6rem;
        margin-right: 0.5rem;
        padding: 0.15rem 0.4rem;
    }
}


/* Standings Data Distinctions */
.highlight-pts {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.gd-pos {
    color: #10B981 !important; /* Verde */
}

.gd-neg {
    color: #EF4444 !important; /* Rojo */
}

.gd-zero {
    color: #FBBF24 !important; /* Amarillo */
}
