.tps-card {
    max-width: 420px;
    background: #141829;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #c8cdd8;
}

/* Float variants */
.tps-float-right {
    float: right;
    margin: 4px 0 20px 24px;
}
.tps-float-left {
    float: left;
    margin: 4px 24px 20px 0;
}
.tps-float-none {
    float: none;
    max-width: 600px;
    margin: 24px auto;
}

/* Header */
.tps-header {
    background: linear-gradient(135deg, #0d2137, #163a5c, #1a5276);
    color: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.tps-name {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    font-style: italic;
    line-height: 1.2;
    color: #fff;
}
.tps-meta {
    display: flex;
    gap: 12px;
    font-size: 15px;
    margin-bottom: 8px;
}
.tps-rank {
    font-weight: 600;
    color: #5dade2;
}
.tps-points {
    opacity: .75;
    color: #a0b4c8;
}
.tps-bio {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 13px;
    color: #8a9bb5;
}

/* Sections */
.tps-section {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.tps-section:last-of-type {
    border-bottom: none;
}
.tps-section-muted {
    background: #0f1320;
}
.tps-section-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    font-style: italic;
    color: #5dade2;
}

/* Stats grid */
.tps-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    margin-bottom: 12px;
}
.tps-stat {
    padding: 10px 6px;
    background: rgba(93,173,226,.08);
    border: 1px solid rgba(93,173,226,.15);
    border-radius: 8px;
}
.tps-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.tps-stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #6b7a8d;
    margin-top: 2px;
    letter-spacing: .3px;
}

/* Surface bars */
.tps-surfaces h5 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #8a9bb5;
    font-weight: 600;
}
.tps-surface-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.tps-surface-name {
    width: 50px;
    font-size: 12px;
    font-weight: 600;
    color: #8a9bb5;
    flex-shrink: 0;
}
.tps-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,.06);
    border-radius: 4px;
    overflow: hidden;
}
.tps-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #2e86c1, #48c9b0);
    transition: width .6s ease;
}
.tps-surface-stat {
    font-size: 12px;
    color: #6b7a8d;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

/* Upcoming matches */
.tps-upcoming {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tps-upcoming-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    background: rgba(93,173,226,.06);
    border-left: 3px solid #2e86c1;
}
.tps-upcoming-date {
    font-weight: 700;
    color: #5dade2;
    min-width: 46px;
    flex-shrink: 0;
}
.tps-upcoming-opponent {
    font-weight: 600;
    color: #dce1ea;
}
.tps-upcoming-detail {
    color: #6b7a8d;
    font-size: 12px;
}
.tps-upcoming-tourney {
    color: #505a6b;
    font-size: 12px;
    margin-left: auto;
    text-align: right;
}

/* Form badges */
.tps-form {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.tps-form-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.tps-form-win {
    background: #1e8449;
}
.tps-form-loss {
    background: #922b21;
}
.tps-form-unknown {
    background: #3a4050;
    color: #8a9bb5;
}

/* Match rows */
.tps-matches {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tps-match-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
}
.tps-match-win {
    background: rgba(30,132,73,.12);
    border-left: 3px solid #1e8449;
}
.tps-match-loss {
    background: rgba(146,43,33,.12);
    border-left: 3px solid #922b21;
}
.tps-match-outcome {
    flex-shrink: 0;
}
.tps-match-opponent {
    font-weight: 600;
    color: #dce1ea;
    min-width: 120px;
}
.tps-match-score {
    color: #8a9bb5;
    min-width: 90px;
}
.tps-match-tourney {
    color: #505a6b;
    font-size: 12px;
    margin-left: auto;
    text-align: right;
}

/* Footer */
.tps-footer {
    padding: 10px 24px;
    text-align: right;
    font-size: 11px;
    color: #3e4757;
    border-top: 1px solid rgba(255,255,255,.04);
}

/* Error */
.tps-error {
    padding: 16px;
    color: #e74c3c;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .tps-card,
    .tps-float-right,
    .tps-float-left {
        float: none;
        max-width: 100%;
        margin: 16px 0;
    }
}
@media (max-width: 480px) {
    .tps-card {
        border-radius: 8px;
    }
    .tps-header {
        padding: 16px;
    }
    .tps-name {
        font-size: 18px;
    }
    .tps-section {
        padding: 12px 16px;
    }
    .tps-match-tourney {
        display: none;
    }
    .tps-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    .tps-stat-value {
        font-size: 16px;
    }
}
