.tab-page-match {
    padding: 0;
}

.match-detail {
    padding: 16px 12px calc(24px + var(--safe-bottom));
}

.match-detail-loading,
.match-detail-empty,
.match-detail-error {
    padding: 40px 16px;
    text-align: center;
    font-size: 17px;
    color: var(--color-text-muted);
}

.match-detail-head {
    background: var(--color-surface);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}

.match-detail-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.match-detail-meta {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.match-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.match-info-item {
    background: var(--color-surface);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;
    padding: 12px;
}

.match-info-label {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.match-info-value {
    font-size: 19px;
    font-weight: 600;
    color: var(--color-primary);
}

.match-info-value-text {
    color: var(--color-text);
}

.match-info-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.match-info-grid-result .match-info-item-rank {
    grid-column: 1 / -1;
}

.match-my-rank {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
}

.match-share-btn {
    background: transparent;
    color: var(--color-text);
    border: 1px solid rgba(201, 162, 39, 0.25);
}

.match-register-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: var(--color-primary);
    color: #1a1a20;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 18px;
}

.match-register-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.match-withdraw-btn {
    margin-top: 10px;
    background: transparent;
    border: 1px solid rgba(201, 162, 39, 0.25);
    color: var(--color-text-muted);
}

.match-rebuy-block-tip {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    color: #ec7063;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.35);
    text-align: center;
}

.match-register-tip {
    font-size: 15px;
    color: var(--color-text-muted);
    text-align: center;
    margin: -10px 0 16px;
}

.match-pay-panel {
    background: var(--color-surface);
    border: 1px solid rgba(201, 162, 39, 0.18);
    border-radius: 12px;
    padding: 12px;
    margin: 0 0 12px;
}

.match-pay-panel-live {
    margin-top: 8px;
}

.match-pay-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.match-pay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.match-pay-sheet {
    position: relative;
    width: 100%;
    max-width: 520px;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    background: linear-gradient(165deg, #22222a 0%, #16161c 100%);
    border: 1px solid rgba(201, 162, 39, 0.28);
    border-bottom: none;
    box-sizing: border-box;
}

.match-pay-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.match-pay-sheet-title {
    font-size: 16px;
    font-weight: 700;
}

.match-pay-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-muted);
    font-size: 18px;
    line-height: 32px;
    cursor: pointer;
}

.match-pay-confirm {
    margin-top: 14px;
    margin-bottom: 0;
}

.match-pay-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.match-pay-assets {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.match-pay-seg {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-pay-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    color: inherit;
    cursor: pointer;
}

.match-pay-item.is-on {
    border-color: rgba(201, 162, 39, 0.7);
    background: rgba(201, 162, 39, 0.12);
}

.match-pay-item.is-off,
.match-pay-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.match-pay-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.match-pay-desc {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.match-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-section-sub {
    font-size: 16px;
    color: var(--color-text-muted);
    font-weight: 400;
}

.match-participant-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-participant-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    background: var(--color-surface);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;
    padding: 12px;
}

.match-participant-item.has-bg {
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border-color: rgba(255, 255, 255, 0.16);
}

.match-participant-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 12, 16, 0.32), rgba(12, 12, 16, 0.1));
    pointer-events: none;
    z-index: 0;
}

.match-participant-item > .match-participant-avatar-wrap,
.match-participant-item > .match-participant-body {
    position: relative;
    z-index: 1;
}

.match-participant-tier {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
}

.match-score-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.match-tier-tag {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    color: #f5d76e;
    background: rgba(245, 215, 110, 0.16);
    border: 1px solid rgba(245, 215, 110, 0.28);
}

.match-score-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.match-participant-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.match-participant-avatar {
    position: absolute;
    left: 15.5%;
    top: 15.5%;
    width: 69%;
    height: 69%;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2418, #1a1a20);
    border: 1px solid rgba(201, 162, 39, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    overflow: hidden;
    box-sizing: border-box;
}

.match-participant-avatar.has-frame {
    border-color: transparent;
}

.match-participant-avatar img,
.match-participant-avatar .app-avatar-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.match-avatar-frame {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    object-fit: contain;
}

.match-participant-name {
    font-size: 17px;
    font-weight: 500;
}

.match-participant-body {
    flex: 1;
    min-width: 0;
}

.match-participant-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.match-participant-eliminated {
    opacity: 0.72;
}

.match-participant-eliminated .match-participant-avatar,
.match-participant-eliminated .match-avatar-frame {
    filter: grayscale(0.85);
}

.match-alive-badge {
    flex-shrink: 0;
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.5;
}

.match-alive-badge-on {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.match-alive-badge-off {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.match-alive-badge-winner {
    color: var(--color-primary);
    background: rgba(201, 162, 39, 0.18);
    border: 1px solid rgba(201, 162, 39, 0.35);
}

.match-participant-winner {
    border-color: rgba(201, 162, 39, 0.35);
    background: rgba(201, 162, 39, 0.06);
}

.match-final-survivors {
    margin-bottom: 16px;
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px solid rgba(201, 162, 39, 0.28);
    background: rgba(201, 162, 39, 0.08);
}

.match-final-survivors-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.match-final-survivors-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-final-survivor-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--color-surface);
    border: 1px solid rgba(201, 162, 39, 0.25);
}

.match-final-survivor-item .match-participant-name {
    flex: 1;
    min-width: 0;
}

.match-participant-time {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.home-card-link {
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}

.home-card-link:active {
    transform: scale(0.99);
    border-color: rgba(201, 162, 39, 0.45);
}

.home-badge-register {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.match-tournament-rules {
    margin-bottom: 16px;
}

.match-rules-list {
    background: var(--color-surface);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;
    overflow: hidden;
}

.match-rules-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.match-rules-item:last-child {
    border-bottom: none;
}

.match-rules-label {
    flex-shrink: 0;
    font-size: 17px;
    color: var(--color-text-muted);
}

.match-rules-value {
    text-align: right;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
}

.match-blind-banner {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(201, 162, 39, 0.35);
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.16), rgba(26, 26, 32, 0.95));
}

.match-blind-banner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.match-blind-banner-title {
    font-size: 18px;
    color: var(--color-text-muted);
}

.match-blind-level {
    font-size: 17px;
    color: var(--color-primary);
    font-weight: 600;
}

.match-blind-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 6px;
}

.match-blind-next,
.match-blind-countdown {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.match-blind-countdown {
    color: #4ade80;
    margin-top: 2px;
}

.match-blind-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

.match-blind-footer .match-blind-countdown {
    margin-top: 0;
    flex: 1;
    min-width: 0;
}

.match-blind-countdown-placeholder {
    flex: 1;
    min-width: 0;
}

.match-blind-structure {
    margin-bottom: 16px;
}

.match-blind-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;
    background: var(--color-surface);
}

.match-blind-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.match-blind-table th,
.match-blind-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.match-blind-table th {
    color: var(--color-text-muted);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
}

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

.match-blind-table tr.is-current td {
    color: var(--color-primary);
    font-weight: 700;
    background: rgba(201, 162, 39, 0.08);
}

.match-live-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.match-action-btn {
    width: 100%;
    min-height: 0;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
}

.match-action-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.match-action-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.match-action-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

.match-action-cost {
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.match-action-hint {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.78;
    line-height: 1.35;
    text-align: center;
}

.match-action-btn.is-primary {
    background: linear-gradient(135deg, #e0b83d, #c9a227 55%, #a8841a);
    color: #1a1a20;
    border-color: rgba(255, 220, 120, 0.35);
    box-shadow: 0 6px 16px rgba(201, 162, 39, 0.25);
}

.match-action-btn.is-primary .match-action-hint {
    color: rgba(26, 26, 32, 0.72);
    opacity: 1;
}

.match-action-btn.is-rebuy {
    background: linear-gradient(145deg, rgba(201, 162, 39, 0.22), rgba(26, 26, 32, 0.95));
    color: #f5d76e;
    border-color: rgba(201, 162, 39, 0.45);
}

.match-action-btn.is-rebuy .match-action-cost {
    color: var(--color-primary);
}

.match-action-btn.is-rebuy .match-action-hint {
    color: var(--color-text-muted);
    opacity: 1;
}

.match-action-btn.is-double {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: rgba(201, 162, 39, 0.35);
}

.match-action-btn.is-double .match-action-title,
.match-action-btn.is-double .match-action-cost {
    color: var(--color-primary);
}

.match-action-btn.is-double .match-action-hint {
    color: var(--color-text-muted);
    opacity: 1;
}

.match-payout-preview {
    margin-bottom: 16px;
}

.match-payout-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;
    background: var(--color-surface);
}

.match-payout-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.match-payout-table th,
.match-payout-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.match-payout-table th {
    color: var(--color-text-muted);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
}

.match-live-panel,
.match-reg-panel {
    margin-bottom: 14px;
}

.match-reg-hero-ticket {
    border-color: rgba(201, 162, 39, 0.35);
    background: linear-gradient(160deg, rgba(201, 162, 39, 0.14), var(--color-surface) 70%);
}

.match-reg-hero-count {
    color: var(--color-primary);
}

.match-live-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.match-live-hero-card {
    background: var(--color-surface);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;
    padding: 14px 12px;
    min-width: 0;
}

.match-live-hero-alive {
    border-color: rgba(74, 222, 128, 0.28);
    background: linear-gradient(160deg, rgba(74, 222, 128, 0.1), var(--color-surface) 70%);
}

.match-live-hero-label {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.match-live-hero-value {
    display: flex;
    align-items: baseline;
    gap: 2px;
    min-width: 0;
    line-height: 1.1;
    margin-bottom: 6px;
}

.match-live-hero-num {
    font-size: 32px;
    font-weight: 700;
    color: #4ade80;
    letter-spacing: -0.5px;
}

.match-live-hero-den {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.match-live-hero-stack {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    word-break: break-all;
}

.match-live-hero-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.match-live-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--color-surface);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;
    overflow: hidden;
}

.match-live-meta-item {
    padding: 12px 8px;
    text-align: center;
    min-width: 0;
    border-right: 1px solid rgba(201, 162, 39, 0.25);
}

.match-live-meta-item:last-child {
    border-right: none;
}

.match-live-meta-label {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
}

.match-live-meta-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
    word-break: break-all;
}

.match-live-meta-sub {
    margin-top: 3px;
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.3;
}

.match-bubble-alert {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.match-bubble-itm {
    background: rgba(39, 174, 96, 0.12);
    border: 1px solid rgba(39, 174, 96, 0.35);
    color: #58d68d;
}

.match-bubble-bubble {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.35);
    color: #ec7063;
}

.match-bubble-near {
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.3);
    color: var(--color-primary);
}

.match-flag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.match-flag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid rgba(201, 162, 39, 0.25);
    color: var(--color-text-muted);
}

.match-flag-closed {
    border-color: rgba(231, 76, 60, 0.45);
    color: #ec7063;
}

.match-flag-open {
    border-color: rgba(39, 174, 96, 0.4);
    color: #58d68d;
}

.match-flag-double {
    border-color: rgba(201, 162, 39, 0.45);
    color: var(--color-primary);
}

.match-payout-preview {
    margin: 8px 0 16px;
}

.match-blind-banner.is-break {
    border-color: rgba(52, 152, 219, 0.4);
}

.match-blind-banner.is-paused {
    border-color: rgba(231, 76, 60, 0.4);
    opacity: 0.85;
}

.match-clock-link {
    flex-shrink: 0;
    font-size: 15px;
    color: var(--color-primary);
    text-decoration: none;
}

.match-blind-break-tag {
    display: inline-block;
    font-size: 14px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(52, 152, 219, 0.15);
    color: #5dade2;
    vertical-align: middle;
}
