/* Index page: matches, groups, payment (competition.css = shared shell) */

.index-page .container {
    max-width: 560px;
}

section.index-section {
    padding: 0 0 24px;
}

.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Match card — two-tone */
@keyframes match-highlight-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); border-color: rgba(56, 189, 248, 0.6); }
    60%  { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); border-color: rgba(56, 189, 248, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); border-color: rgba(255, 255, 255, 0.06); }
}

.match-card--highlight {
    animation: match-highlight-pulse 2s ease-out forwards;
}

.match-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #1a1d2e;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.match-card-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--bg-card-header);
    font-size: 0.82rem;
}

.match-card-stage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-self: start;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.match-card-time {
    text-align: end;
    font-weight: 600;
    color: var(--text-light);
}

.match-card-body {
    padding: 14px;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.match-side {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.match-side-home { justify-content: flex-start; }
.match-side-away { justify-content: flex-end; }

.match-center {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.match-teams .team-flag {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.match-teams .team-name {
    font-weight: 600;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-goals {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
}

.match-goals-sep {
    color: var(--text-muted);
    font-weight: 700;
}

.match-vs {
    color: var(--text-muted);
    font-weight: 700;
}

.match-forecast {
    margin-top: 12px;
    padding-top: 0;
    border-top: none;
}

.match-forecast-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.forecast-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.forecast-predict {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.forecast-predict[hidden] {
    display: none;
}

.forecast-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: start;
    transition: var(--transition);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.forecast-option:hover,
.forecast-option:active {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(37, 99, 235, 0.25);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.forecast-option .pick-flag {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.forecast-change-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(129, 140, 248, 0.12);
    color: #a5b4fc;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.forecast-results-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.forecast-results-footer .forecast-label-yours {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.match-highlights {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
}

.match-highlights:hover,
.match-highlights:active {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(37, 99, 235, 0.25);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.match-highlights img {
    width: 72px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

/* Group standings blocks */
.groups-standings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.standings-columns-header {
    display: grid;
    grid-template-columns: 1fr 48px 48px;
    gap: 8px;
    padding: 0 52px 8px 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.standings-columns-header span:first-child {
    text-align: start;
}

.group-standings-block {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.group-letter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    flex-shrink: 0;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 0.05em;
}

.group-standings-rows {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.standings-row {
    display: grid;
    grid-template-columns: 28px 1fr 40px 40px;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.standings-row--qualify {
    border-color: transparent;
}

.standings-row-rank {
    font-weight: 700;
    color: var(--text-muted);
}

.standings-row-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.standings-row-team img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.standings-row-team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.standings-row-mp,
.standings-row-pts {
    text-align: center;
    font-weight: 600;
}

.standings-row-pts {
    color: var(--text-light);
}

.group-color-a .group-letter-bar { background: #22c55e; }
.group-color-a .standings-row--qualify { background: rgba(34, 197, 94, 0.12); }
.group-color-b .group-letter-bar { background: #ef4444; }
.group-color-b .standings-row--qualify { background: rgba(239, 68, 68, 0.12); }
.group-color-c .group-letter-bar { background: #f97316; }
.group-color-c .standings-row--qualify { background: rgba(249, 115, 22, 0.12); }
.group-color-d .group-letter-bar { background: #3b82f6; }
.group-color-d .standings-row--qualify { background: rgba(59, 130, 246, 0.12); }
.group-color-e .group-letter-bar { background: #a855f7; }
.group-color-e .standings-row--qualify { background: rgba(168, 85, 247, 0.12); }
.group-color-f .group-letter-bar { background: #ec4899; }
.group-color-f .standings-row--qualify { background: rgba(236, 72, 153, 0.12); }
.group-color-g .group-letter-bar { background: #14b8a6; }
.group-color-g .standings-row--qualify { background: rgba(20, 184, 166, 0.12); }
.group-color-h .group-letter-bar { background: #eab308; color: #1a1a1a; }
.group-color-h .standings-row--qualify { background: rgba(234, 179, 8, 0.12); }
.group-color-i .group-letter-bar { background: #06b6d4; }
.group-color-i .standings-row--qualify { background: rgba(6, 182, 212, 0.12); }
.group-color-j .group-letter-bar { background: #84cc16; color: #1a1a1a; }
.group-color-j .standings-row--qualify { background: rgba(132, 204, 22, 0.12); }
.group-color-k .group-letter-bar { background: #6366f1; }
.group-color-k .standings-row--qualify { background: rgba(99, 102, 241, 0.12); }
.group-color-l .group-letter-bar { background: #f43f5e; }
.group-color-l .standings-row--qualify { background: rgba(244, 63, 94, 0.12); }

/* Loading / empty */
.loading, .no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.matches-show-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 8px 0 16px;
}

.matches-show-more-btn {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

/* Payment modal */
.payment-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.75);
}

.payment-modal.active {
    display: flex;
}

.payment-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.payment-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
}

body[dir="ltr"] .payment-close {
    left: auto;
    right: 12px;
}

.index-page footer {
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-logo {
    font-weight: 700;
    color: var(--text-light);
}

body[dir="ltr"] .match-card-header {
    direction: ltr;
}

.countdown.is-hidden {
    display: none;
}
