.all-schedule-page .page-wrapper {
    min-height: 100vh;
}

.all-schedule-page .hero-header {
    margin-bottom: 26px;
}

.all-schedule-main {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 0 15px;
}

.all-schedule-controls {
    display: flex;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.schedule-tabs {
    display: flex;
    flex: 1;
}

.schedule-tab {
    flex: 1;
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.schedule-tab:first-child { border-radius: 10px 0 0 10px; }
.schedule-tab:last-child { border-radius: 0 10px 10px 0; }
.schedule-tab + .schedule-tab { border-left: 0; }

.schedule-tab.active {
    color: var(--gold);
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.075);
    box-shadow: inset 0 -2px 0 var(--gold);
}

.schedule-filter select {
    min-height: 44px;
    max-width: 215px;
    padding: 8px 34px 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ddd;
    background: #0d0d12;
    font-family: inherit;
    font-size: 12px;
}

.schedule-filter-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.schedule-tab:focus-visible,
.schedule-filter select:focus-visible,
.global-match-link:focus-visible,
.schedule-retry:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.all-schedule-status {
    min-height: 18px;
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 11px;
    text-align: right;
}

.schedule-notice {
    margin: 12px 0;
    padding: 10px 14px;
    border: 1px solid rgba(255, 166, 0, 0.25);
    border-radius: 10px;
    color: #ffc15c;
    background: rgba(255, 149, 0, 0.065);
    font-size: 12px;
    line-height: 1.5;
}

.global-date-header {
    position: relative;
    display: flex;
    margin: 20px 0 12px;
    padding: 10px 18px;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
}

.global-date-header::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--gold), var(--gold-dark));
}

.global-date-header.overdue {
    border-color: rgba(255, 166, 0, 0.28);
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1), rgba(255, 149, 0, 0.025));
}

.global-date-header.overdue::before {
    background: linear-gradient(180deg, #ffbd52, #ba7100);
}

.global-date-text {
    color: var(--gold);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.global-date-header.overdue .global-date-text {
    color: #ffbd52;
}

.global-date-count {
    padding: 3px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    font-size: 11px;
}

.global-match-link {
    display: block;
    margin-bottom: 12px;
    color: inherit;
    text-decoration: none;
}

.global-match-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: var(--bg-card);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.global-match-link:hover .global-match-card,
.global-match-link:focus-visible .global-match-card {
    border-color: rgba(255, 215, 0, 0.16);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.global-match-card.unplayed-card {
    border-color: rgba(255, 215, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.03), var(--bg-card));
}

.global-match-card.unplayed-card::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 0 14px 0 8px;
    background: var(--green-accent);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
}

.global-match-top-bar {
    display: flex;
    min-height: 38px;
    padding: 7px 14px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.015);
}

.global-match-tournament {
    color: #9b9b9b;
    font-size: calc(11px + 1pt);
    font-weight: 800;
}

.global-match-time {
    color: #fff;
    font-family: 'Rajdhani', 'Noto Sans TC', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
}

.global-match-category {
    padding: 3px 11px;
    border-radius: 20px;
    color: #000;
    background: linear-gradient(135deg, #8b6508, #ffd700, #daa520);
    font-size: calc(10px + 1pt);
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.global-match-category.silver {
    background: linear-gradient(135deg, #757575, #e0e0e0, #9e9e9e);
}

.global-match-body {
    display: flex;
    padding: 14px 16px;
    align-items: center;
    gap: 8px;
}

.global-player-side {
    flex: 1;
    min-width: 0;
    padding: 6px 4px;
    text-align: center;
}

.global-player-name {
    display: block;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-player-rating {
    display: block;
    margin-top: 2px;
    color: var(--gold-dark);
    font-family: 'Rajdhani', 'Noto Sans TC', sans-serif;
    font-size: 16px;
    font-weight: 700;
    opacity: 0.7;
}

.global-player-side.winner .global-player-name {
    color: var(--gold);
    font-weight: 800;
    text-shadow: 0 0 12px var(--gold-glow);
}

.global-player-side.winner .global-player-rating {
    color: #fff;
    opacity: 1;
}

.global-player-side.loser .global-player-name {
    color: var(--loser-color);
    font-weight: 400;
}

.global-player-side.loser .global-player-rating {
    color: #444;
}

.global-player-side.unplayed .global-player-name {
    color: #fff;
    font-size: 19px;
    font-weight: 800;
}

.global-center-display {
    display: flex;
    flex: 0 0 auto;
    min-width: 80px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.global-vs-badge {
    padding: 6px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.global-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 0 15px var(--gold-glow);
}

.global-score-digit {
    width: 28px;
    text-align: center;
}

.global-score-dash {
    width: 40px;
    color: var(--text-dim);
    text-align: center;
}

.schedule-empty,
.schedule-error {
    margin-top: 24px;
    padding: 35px 16px;
    color: var(--text-dim);
    text-align: center;
    font-size: 14px;
    line-height: 1.65;
}

.schedule-error { color: #d6a2a2; }

.schedule-retry {
    min-height: 44px;
    margin-top: 12px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 10px;
    color: var(--gold);
    background: rgba(255, 215, 0, 0.06);
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}

.schedule-skeleton {
    display: grid;
    gap: 12px;
}

.schedule-skeleton span {
    display: block;
    height: 112px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.025) 30%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.025) 70%);
    background-size: 220% 100%;
    animation: allScheduleShimmer 1.3s linear infinite;
}

@keyframes allScheduleShimmer {
    to { background-position-x: -220%; }
}

@media (max-width: 680px) {
    .all-schedule-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .schedule-filter select {
        width: 100%;
        max-width: none;
    }

    .global-match-body {
        padding: 12px;
    }

    .global-player-name {
        font-size: 16px;
    }

    .global-player-side.unplayed .global-player-name {
        font-size: 17px;
    }

    .global-score-display {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-match-card,
    .schedule-skeleton span {
        transition: none;
        animation: none;
    }
}
.global-replay-badge {
    display: block;
    width: fit-content;
    margin: 0 14px 12px auto;
    padding: 5px 9px;
    color: #111;
    background: #ffd700;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}
