/* ============================================================
   Come API Sync - Frontend Styles
   ============================================================ */

/* Match Cards Grid */
.come-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.come-match-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 198, 255, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.come-match-card:hover {
    border-color: rgba(0, 198, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 198, 255, 0.15);
}

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

.come-match-type {
    background: rgba(0, 123, 255, 0.2);
    color: #00c6ff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.come-match-status {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.come-status-upcoming { background: rgba(0, 198, 255, 0.15); color: #00c6ff; }
.come-status-live { background: rgba(255, 59, 48, 0.2); color: #ff3b30; animation: come-pulse 2s infinite; }
.come-status-finished { background: rgba(52, 199, 89, 0.15); color: #34c759; }
.come-status-no-result, .come-status-abandoned, .come-status-cancelled { background: rgba(142, 142, 147, 0.15); color: #8e8e93; }
.come-status-unknown { background: rgba(142, 142, 147, 0.1); color: #999; }

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

.come-match-card-body {
    flex: 1;
}

.come-match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.come-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.come-team-logo, .come-team-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: contain;
}

.come-team-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 123, 255, 0.2);
    color: #00c6ff;
    font-weight: 700;
    font-size: 0.85rem;
}

.come-team-name {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.come-match-vs {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 0.25rem;
}

.come-match-scores {
    margin-top: 0.75rem;
}

.come-score-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.come-score-team { color: var(--text-muted, #b0c4de); }
.come-score-value { font-weight: 600; }

.come-match-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: var(--text-muted, #b0c4de);
}

/* Match Header */
.come-match-header {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.come-match-header-top {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.come-match-type-badge {
    background: rgba(0, 123, 255, 0.2);
    color: #00c6ff;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.come-match-title {
    font-size: 1.5rem;
    margin: 0.5rem 0 1.5rem;
    color: #fff;
}

.come-match-teams-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.come-match-team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.come-team-logo-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: contain;
}

.come-team-name-lg {
    font-size: 1.1rem;
    font-weight: 600;
}

.come-match-vs-lg {
    font-size: 1.2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
}

.come-match-scores-detail {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.come-score-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.95rem;
}

.come-score-detail-value {
    font-weight: 700;
    color: #00c6ff;
}

.come-match-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted, #b0c4de);
}

/* Fantasy Points Table */
.come-fantasy-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

.come-fantasy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.come-fantasy-table th {
    background: rgba(0, 123, 255, 0.15);
    color: #00c6ff;
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.come-fantasy-table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.come-fantasy-table tr:hover td {
    background: rgba(0, 198, 255, 0.05);
}

.come-player-name { font-weight: 600; }
.come-points-total { color: #00c6ff; }

.come-role {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.come-role-bat { background: rgba(52, 199, 89, 0.15); color: #34c759; }
.come-role-bowl { background: rgba(255, 59, 48, 0.15); color: #ff3b30; }
.come-role-all { background: rgba(0, 198, 255, 0.15); color: #00c6ff; }
.come-role-wk { background: rgba(255, 204, 0, 0.15); color: #ffcc00; }

/* Series List */
.come-series-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.come-series-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 198, 255, 0.15);
    border-radius: 10px;
    padding: 1.25rem;
}

.come-series-card h3 {
    margin: 0 0 0.5rem;
    color: #fff;
    font-size: 1rem;
}

.come-series-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted, #b0c4de);
}

/* Squad List */
.come-squad-list {
    margin: 2rem 0;
}

.come-squad-team {
    margin-bottom: 2rem;
}

.come-squad-team h3 {
    color: #00c6ff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 198, 255, 0.3);
}

.come-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.come-player-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.come-player-card .come-player-name {
    font-size: 0.9rem;
}

/* CTA Banner */
.come-cta-banner {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 198, 255, 0.1));
    border: 1px solid rgba(0, 198, 255, 0.3);
    border-radius: 12px;
}

.come-cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.come-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.5);
    color: #fff;
}

/* No Data */
.come-no-data {
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-muted, #b0c4de);
}

/* Fantasy Table Controls (Sort/Filter) */
.come-fantasy-table-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.come-fantasy-table-controls label {
    color: var(--text-muted, #b0c4de);
    font-size: 0.85rem;
    font-weight: 500;
}

.come-fantasy-sort-select {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 198, 255, 0.3);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

.come-fantasy-sort-select option {
    background: #1a1a2e;
    color: #fff;
}

.come-fantasy-table th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.2rem;
}

.come-fantasy-table th[data-sort]:hover {
    background: rgba(0, 123, 255, 0.25);
}

.come-fantasy-table th[data-sort]::after {
    content: '⇅';
    position: absolute;
    right: 0.3rem;
    font-size: 0.65rem;
    opacity: 0.5;
}

.come-fantasy-table th.come-sort-asc::after { content: '↑'; opacity: 1; }
.come-fantasy-table th.come-sort-desc::after { content: '↓'; opacity: 1; }

.come-rank {
    color: var(--text-muted, #b0c4de);
    font-size: 0.8rem;
}

/* Prediction Page Styles */
.come-prediction-header {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.come-prediction-meta-top {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.come-prediction-type-badge {
    background: rgba(255, 204, 0, 0.15);
    color: #ffcc00;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.come-review-status {
    background: rgba(142, 142, 147, 0.15);
    color: #8e8e93;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.come-prediction-title {
    font-size: 1.5rem;
    margin: 0.5rem 0 1rem;
    color: #fff;
}

.come-prediction-match-info {
    color: var(--text-muted, #b0c4de);
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.come-prediction-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    line-height: 1.8;
}

/* Team Page Styles */
.come-team-header {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.come-team-header-logo {
    margin-bottom: 1rem;
}

.come-team-logo-xl {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: contain;
}

.come-team-logo-placeholder-xl {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 123, 255, 0.2);
    color: #00c6ff;
    font-weight: 700;
    font-size: 1.5rem;
}

.come-team-title {
    font-size: 1.8rem;
    margin: 0.5rem 0;
    color: #fff;
}

.come-team-short {
    color: var(--text-muted, #b0c4de);
    font-size: 1rem;
    margin: 0;
}

.come-team-description {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    line-height: 1.8;
}

.come-player-style {
    font-size: 0.75rem;
    color: var(--text-muted, #b0c4de);
}

/* Legal Content Styles */
.come-legal-content h2 {
    color: #00c6ff;
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 198, 255, 0.15);
}

.come-legal-content p {
    color: var(--text-muted, #b0c4de);
    margin-bottom: 1rem;
}

.come-legal-content ul {
    color: var(--text-muted, #b0c4de);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.come-legal-content ul li {
    margin-bottom: 0.5rem;
}

.come-legal-content strong {
    color: #fff;
}

/* Footer Links */
.come-footer-links a:hover {
    color: #00c6ff !important;
    text-decoration: underline !important;
}

/* Series Name */
.come-series-name {
    color: var(--text-muted, #b0c4de);
    font-size: 0.95rem;
    margin: 0.5rem 0 0;
}

/* Match Summary */
.come-match-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    .come-matches-grid {
        grid-template-columns: 1fr;
    }
    .come-match-teams-row {
        flex-direction: column;
        gap: 1rem;
    }
    .come-match-vs-lg {
        transform: rotate(90deg);
    }
    .come-fantasy-table {
        font-size: 0.8rem;
    }
    .come-players-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .come-fantasy-table-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .come-prediction-meta-top {
        flex-direction: column;
    }
    .come-match-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    .come-team-logo-xl, .come-team-logo-placeholder-xl {
        width: 64px;
        height: 64px;
        font-size: 1rem;
    }
}

/* Teams Grid */
.come-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.come-team-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 198, 255, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.come-team-card:hover {
    border-color: rgba(0, 198, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 198, 255, 0.15);
}

.come-team-card-logo {
    margin-bottom: 0.5rem;
}

.come-team-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.come-team-card-name {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.come-team-card-short {
    color: var(--text-muted, #b0c4de);
    font-size: 0.85rem;
    font-weight: 500;
}

.come-team-card-matches {
    color: var(--text-muted, #b0c4de);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.come-team-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.come-team-card-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.come-team-card-actions .btn-primary {
    background: linear-gradient(135deg, #007bff, #00c6ff);
    color: #fff;
    border: none;
}

.come-team-card-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted, #b0c4de);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.come-team-card-actions .btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .come-teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    .come-team-card {
        padding: 1rem;
    }
    .come-team-card-actions {
        flex-direction: column;
        width: 100%;
    }
    .come-team-card-actions .btn {
        width: 100%;
    }
}