/* Faustball - Component Styles (scoped under .FaustballApp) */

/* Faustball Card */
.FaustballApp .faustball-card {
    background: white;
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.faustball-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.faustball-card .card-header {
    background: var(--fb-light-bg);
    padding: 1rem;
    border-bottom: 1px solid var(--fb-border);
}

.faustball-card .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
}

.faustball-card .card-body {
    padding: 1.5rem;
}

/* Match Row */
.match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--fb-border);
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.match-row:hover {
    background: var(--fb-light-bg);
    padding-left: 1.5rem;
}

.match-row .team {
    flex: 1;
    font-weight: 500;
}

.match-row .vs {
    color: var(--fb-secondary);
    padding: 0 0.75rem;
}

.match-row .time {
    color: var(--fb-secondary);
    font-size: 0.9rem;
    min-width: 60px;
    text-align: right;
}

.match-row .status {
    color: var(--fb-primary);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 1rem;
}

/* Standings Table */
.standings-table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table thead {
    background: var(--fb-dark-bg);
    color: white;
}

.standings-table th,
.standings-table td {
    padding: 0.75rem;
    text-align: center;
}

.standings-table th:first-child,
.standings-table td:first-child {
    text-align: left;
}

.standings-table tbody tr {
    border-bottom: 1px solid var(--fb-border);
}

.standings-table tbody tr:hover {
    background: var(--fb-light-bg);
}

.standings-table tbody tr:nth-child(1) {
    background: rgba(16, 185, 129, 0.05);
}

.standings-table tbody tr:nth-child(2) {
    background: rgba(59, 130, 246, 0.05);
}

.standings-table tbody tr:nth-child(3) {
    background: rgba(249, 115, 22, 0.05);
}

/* Live Matches Grid */
.live-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.live-match-card {
    background: white;
    border: 2px solid var(--fb-danger);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.live-match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--fb-danger), var(--fb-warning));
    animation: slide 2s infinite;
}

@keyframes slide {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.live-match-card:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
    transform: translateY(-4px);
}

.live-match-card .match-header {
    text-align: center;
    margin-bottom: 1rem;
}

.live-match-card .match-teams {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.live-match-card .team-a,
.live-match-card .team-b {
    text-align: center;
}

.live-match-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.live-match-card .match-divider {
    text-align: center;
    color: var(--fb-secondary);
    font-weight: bold;
}

.live-match-card .match-info {
    text-align: center;
    font-size: 0.9rem;
    color: var(--fb-secondary);
}

/* Tournament Cards */
.tournament-card {
    background: white;
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.tournament-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--fb-primary);
}

.tournament-card p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--fb-secondary);
}

.tournament-card .date {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #999;
}

.tournament-card:hover {
    border-color: var(--fb-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--fb-secondary);
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Tournament Detail Tabs */
.tournament-tabs {
    margin-top: 2rem;
}

.tab-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-content h2 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

/* Error Container */
.error-container {
    background: #fee2e2;
    border: 1px solid var(--fb-danger);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #7f1d1d;
}

.error-container h1 {
    color: var(--fb-danger);
    margin-bottom: 1rem;
}

/* Loading Container */
.loading-container {
    text-align: center;
    padding: 2rem;
    color: var(--fb-secondary);
}

/* Match Detail Page */
.match-detail-page {
    max-width: 700px;
    margin: 0 auto;
}

.match-detail-card {
    text-align: center;
    padding: 2rem;
}

.match-detail-header {
    margin-bottom: 1.5rem;
}

.match-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.match-team-side {
    flex: 1;
    text-align: center;
}

.match-team-side .team-name {
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
    color: var(--fb-dark-bg);
}

.match-team-side .team-sets-won {
    font-size: 3rem;
    font-weight: 800;
    color: var(--fb-primary);
    line-height: 1;
}

.match-separator {
    font-size: 2rem;
    color: var(--fb-secondary);
    font-weight: 700;
}

.match-winner {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--fb-success);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    color: #065f46;
}

.current-set-display {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--fb-light-bg);
    border-radius: 8px;
}

.current-set-label {
    font-size: 0.85rem;
    color: var(--fb-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.current-set-score {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.set-points {
    font-size: 2rem;
    font-weight: 700;
    color: var(--fb-dark-bg);
}

.set-separator {
    font-size: 1.5rem;
    color: var(--fb-secondary);
}

.detail-info p {
    margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .live-matches-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .match-row {
        flex-wrap: wrap;
        padding: 0.85rem;
        gap: 0.25rem;
    }

    .match-row .team {
        font-size: 0.9rem;
    }

    .match-row .time {
        flex-basis: 100%;
        text-align: left;
        margin-top: 0.5rem;
        font-size: 0.85rem;
    }

    .match-row .status {
        margin-left: 0;
        margin-top: 0.25rem;
    }

    .standings-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .standings-table th,
    .standings-table td {
        padding: 0.5rem 0.4rem;
        white-space: nowrap;
    }

    .tab-content {
        padding: 1rem;
    }

    .tab-content h2 {
        font-size: 1.2rem;
    }

    .live-match-card {
        padding: 1rem;
    }

    .tournament-card {
        padding: 0.85rem;
    }
}

@media (max-width: 480px) {
    .match-row .vs {
        padding: 0 0.4rem;
    }

    .standings-table th,
    .standings-table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
    }

    .match-score-display {
        gap: 0.75rem;
    }

    .match-team-side .team-name {
        font-size: 1rem;
    }

    .match-team-side .team-sets-won {
        font-size: 2.5rem;
    }

    .set-points {
        font-size: 1.5rem;
    }

    .match-detail-card {
        padding: 1rem;
    }
}
