/* ===== Variables ===== */
:root {
    --tc-primary: #2c3e50;
    --tc-secondary: #27ae60;
    --tc-accent: #e74c3c;
    --tc-light: #ecf0f1;
    --tc-dark: #1a252f;
    --tc-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --tc-radius: 8px;
    --tc-transition: all 0.3s ease;
}

/* ===== Contenedor Principal ===== */
.tc-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ===== Tablas ===== */
.tc-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--tc-radius);
    box-shadow: var(--tc-shadow);
    overflow: hidden;
    margin: 1rem 0;
}

.tc-table th {
    background: var(--tc-primary);
    color: #fff;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tc-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.tc-table tr:hover {
    background: #f8f9fa;
}

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

/* ===== Badges y Logos ===== */
.tc-badge {
    width: 40px;
    height: 40px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

.tc-badge-sm {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
}

.tc-player-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
}

.tc-team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* ===== Cards Grid ===== */
.tc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.tc-card {
    background: #fff;
    border-radius: var(--tc-radius);
    box-shadow: var(--tc-shadow);
    overflow: hidden;
    transition: var(--tc-transition);
}

.tc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ===== Match Cards ===== */
.tc-match-card .tc-match-header {
    background: var(--tc-primary);
    color: #fff;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.tc-match-card .tc-match-body {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.tc-match-card .tc-team {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tc-match-card .tc-team-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.tc-match-card .tc-score {
    text-align: center;
}

.tc-match-card .tc-score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tc-primary);
}

.tc-match-card .tc-score-value.tc-live {
    color: var(--tc-accent);
    animation: tc-pulse 2s infinite;
}

.tc-match-card .tc-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

.tc-status-FT { background: #95a5a6; color: #fff; }
.tc-status-NS { background: #3498db; color: #fff; }
.tc-status-1H, .tc-status-2H { background: var(--tc-accent); color: #fff; }
.tc-status-HT { background: #f39c12; color: #fff; }

@keyframes tc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===== Standings ===== */
.tc-standings-table .tc-pos {
    font-weight: 700;
    width: 50px;
    text-align: center;
}

.tc-standings-table .tc-points {
    font-weight: 700;
    color: var(--tc-secondary);
}

.tc-standings-table .tc-champions {
    border-left: 4px solid var(--tc-secondary);
    background: #f0fff4;
}

.tc-standings-table .tc-relegation {
    border-left: 4px solid var(--tc-accent);
    background: #fff5f5;
}

/* ===== Scorers ===== */
.tc-scorers-table .tc-rank {
    font-weight: 700;
    color: var(--tc-primary);
    width: 40px;
}

.tc-scorers-table .tc-goals {
    font-weight: 700;
    color: var(--tc-accent);
    font-size: 1.1rem;
}

/* ===== Teams & Stadiums Cards ===== */
.tc-team-card .tc-team-header {
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--tc-primary), var(--tc-dark));
}

.tc-team-card .tc-team-body {
    padding: 1rem;
    text-align: center;
}

.tc-team-card h4 {
    margin: 0.5rem 0;
    color: var(--tc-dark);
}

.tc-stadium-card .tc-stadium-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.tc-stadium-card .tc-stadium-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.tc-stadium-card .tc-stadium-body {
    padding: 1rem;
}

/* ===== Estados y Utilidades ===== */
.tc-no-data, .tc-error {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: var(--tc-radius);
    box-shadow: var(--tc-shadow);
    color: #666;
}

.tc-error {
    color: var(--tc-accent);
    border: 1px solid #fadbd8;
    background: #fdedec;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .tc-grid {
        grid-template-columns: 1fr;
    }
    
    .tc-match-card .tc-match-body {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .tc-table {
        font-size: 0.85rem;
    }
    
    .tc-table th,
    .tc-table td {
        padding: 0.6rem 0.5rem;
    }
    
    .tc-hide-mobile {
        display: none;
    }
}

/* ===== Loading State ===== */
.tc-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.tc-loading::after {
    content: '⚽';
    display: inline-block;
    animation: tc-bounce 1s infinite;
}

@keyframes tc-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}