/* Scoreboard Polish */
.player-score {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 30px;
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
    transform: scale(0.95);
    position: relative;
    overflow: hidden;
}

.player-score::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.player-score.active {
    opacity: 1;
    transform: scale(1.05);
    background: rgba(20, 20, 25, 0.8);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-color: transparent;
}

.player-score.active::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, var(--primary-color), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 2s linear infinite;
    opacity: 0.5;
}

.player-score.p1.active {
    box-shadow: 0 0 30px rgba(255, 77, 77, 0.2);
}
.player-score.p1.active::after {
    background: linear-gradient(45deg, transparent, var(--p1-color), transparent);
}

.player-score.p2.active {
    box-shadow: 0 0 30px rgba(77, 121, 255, 0.2);
}
.player-score.p2.active::after {
    background: linear-gradient(45deg, transparent, var(--p2-color), transparent);
}

@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Avatar Polish */
.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.2rem;
    position: relative;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    z-index: 2;
}

.p1 .avatar {
    color: var(--p1-color);
    background: radial-gradient(circle at 30% 30%, #442222, #110505);
}
.p2 .avatar {
    color: var(--p2-color);
    background: radial-gradient(circle at 30% 30%, #222244, #050511);
}

.player-score.active .avatar {
    border-color: currentColor;
    box-shadow: 0 0 20px currentColor;
}

/* Info Text Polish */
.info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info .name {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 2px;
}

.info .score {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 0;
    background: linear-gradient(to bottom, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Segoe UI', sans-serif; /* Or a nice digital font if available */
}

.info .type {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 4px;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

.p2 .info .type {
    align-self: flex-end;
}

/* Adjust Top Bar Layout */
#top-bar {
    padding: 30px 50px;
}

