/* Replay View Specific Styles */

/* Consolidated card rank font weight */
.card-vertical .rank,
.compact-card-horizontal .rank {
    font-weight: 900;
}

html body {
    padding-top: 100px;
}

body {
    background-color: #426a53;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.replay-container {
    width: 768px;
    margin: 0 auto;
    padding: 20px;
}

/* Game Info Bar */
.game-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.scores {
    display: flex;
    gap: 30px;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-label {
    color: #FFF8DC;
    font-weight: 600;
}

.score {
    font-size: 24px;
    font-weight: bold;
    color: #FFF8DC;
}

.trump-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trump-label {
    color: #FFF8DC;
    font-weight: 600;
}

.trump-suit {
    font-size: 28px;
}

.spectator-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFF8DC;
}

.spectator-icon {
    width: 24px;
    height: 24px;
}

/* Game Board */
.game-board {
    position: relative;
    width: 728px;
    height: 600px;
    margin: 0 auto;
}

/* Player Positions */
.player-position {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.player-north {
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
}

.player-south {
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
}

.player-east {
    right: 60px;
    top: 47%;
    transform: translateY(-50%);
}

.player-west {
    left: 60px;
    top: 47%;
    transform: translateY(-50%);
}

/* Player Info */
.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
}

.player-name {
    color: #FFF8DC;
    font-weight: 600;
}

.dealer-badge {
    background: #FFF8DC;
    color: #426a53;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
}

/* Desktop Fanned Cards */
.fanned-cards:not(.mobile-cards) {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    width: 140px;
}

.fanned-cards:not(.mobile-cards) .fanned-card {
    position: absolute;
    width: 70px;
    height: 98px;
    background: white;
    border: 1px solid #999;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile Fanned Cards - using same styles as euchre-game */
.fanned-cards.mobile-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px; /* Space between cards */
    height: 70px;
    width: auto; /* Auto width for north/south */
}

.fanned-cards.mobile-cards-east-west {
    flex-direction: column; /* Stack vertically for east/west */
    height: auto; /* Auto height based on content */
    width: auto; /* Auto width based on content */
    gap: -25px; /* Overlap for east/west cards */
}

.fanned-cards.mobile-cards .fanned-card {
    position: relative; /* Not absolute anymore */
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Use exact same card styles as euchre-game */
.fanned-cards.mobile-cards .playing-card {
    width: 48px;
    height: 64px;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
    transition: transform 0.2s ease;
}

.fanned-cards.mobile-cards .playing-card:hover {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
}


/* Smaller cards for east/west players on mobile */
.fanned-cards.mobile-cards-east-west .playing-card {
    width: 42px;
    height: 56px;
}


/* Compact HTML card for horizontal east/west layout */
.compact-card-horizontal {
    width: 52px;
    height: 36px;
    background: white;
    border: 1px solid #999;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 8px 2px;
    box-sizing: border-box;
}

/* Vertical card for north/south layout */
.card-vertical {
    width: 48px;
    height: 64px;
    background: white;
    border: 1px solid #999;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
    box-sizing: border-box;
}

.card-vertical .rank {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 3px;
}

.card-vertical .suit {
    font-size: 22px;
    line-height: 1;
}

/* Card colors for vertical cards */
.card-vertical .rank.red-suit,
.card-vertical .suit.red-suit {
    color: var(--card-red);
}

.card-vertical .rank.black-suit,
.card-vertical .suit.black-suit {
    color: var(--card-black);
}

/* Smaller cards for very small screens */
@media (max-width: 440px) {
    .card-vertical {
        width: 40px;
        height: 54px;
        padding: 3px;
    }

    .card-vertical .rank {
        font-size: 18px;
    }

    .card-vertical .suit {
        font-size: 18px;
    }

    /* Move south player's username up */
    .player-south .player-info {
        margin-top: 0 !important;
        position: relative;
        top: -12px !important;
    }

    html .player-info {
        padding: 4px 8px;
    }

    /* Smaller font for all player names */
    .player-name {
        font-size: 12px;
    }

    html body {
        padding-top: 60px !important;
    }

    .replay-logo-container {
        display: none !important;
    }

    .game-board {
        height: 400px !important;
    }

    .player-south .indicators-container {
        top: calc(100% - 8px) !important;
    }

    /* Hide skip to start/end buttons on small screens */
    #replay-skip-start,
    #replay-skip-end {
        display: none;
    }

    /* Horizontal score display on small screens */
    html .game-score-display {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: auto;
        background: none;
        right: 10px;
        top: -55px;
        padding: 0px;
    }

    .game-score-display::after {
        content: "-";
        color: var(--off-yellow);
        opacity: 0.6;
        font-size: 20px;
        order: 2;
    }

    .score-team-ns {
        order: 1;
    }

    .score-team-ew {
        order: 3;
    }

    .score-team {
        padding: 0;
    }

    /* Hide only north player's absolute positioned speech bubbles on mobile */
    .player-north .player-speech-bubble {
        display: none !important;
    }

    /* Style mobile speech content to replace username for north player */
    .mobile-speech-content {
        display: inline-block;
        background: rgba(255, 255, 255, 0.9);
        color: #666 !important; /* Override team colors */
        padding: 2px 8px;
        border-radius: 8px;
        font-size: 12px;
        white-space: nowrap;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        font-weight: normal; /* Override player-name font-weight */
    }

    /* Remove current-turn background when speech bubble is showing for north player */
    .player-north .player-info.current-turn:has(.mobile-speech-content) {
        background: transparent;
        border-color: transparent;
    }

    /* Suit symbols in mobile speech content */
    .mobile-speech-content .red-suit,
    .mobile-speech-content .black-suit {
        font-size: 16px;
        font-weight: bold;
    }
}

.compact-card-horizontal .rank {
    font-size: 18px;
    line-height: 1;
}

.compact-card-horizontal .suit {
    font-size: 17px;
    line-height: 1;
    margin-top: 1px;
}

/* Card colors for horizontal compact cards */
.compact-card-horizontal .rank.red-suit,
.compact-card-horizontal .suit.red-suit {
    color: var(--card-red);
}

.compact-card-horizontal .rank.black-suit,
.compact-card-horizontal .suit.black-suit {
    color: var(--card-black);
}

/* Card positioning handled dynamically via JavaScript */

/* Card Content */
.card-rank {
    position: absolute;
    top: 6px;
    left: 3px;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    width: 24px;
}

.card-suit {
    position: absolute;
    top: 28px;
    left: 3px;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    width: 24px;
}

.card-suit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}

.card-suit-bottom {
    position: absolute;
    bottom: 28px;
    right: 3px;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    width: 24px;
}

.card-rank-bottom {
    position: absolute;
    bottom: 6px;
    right: 3px;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    width: 24px;
}

/* Suit Colors */
.red-suit {
    color: var(--card-red);
}

.black-suit {
    color: var(--card-black);
}

/* Desktop Center Table */
.table-center:not(.mobile-table) {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 300px;
}

/* Mobile Center Table */
.table-center.mobile-table {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 200px;
}

/* Desktop played cards */
.played-card:not(.mobile-played-card) {
    position: absolute;
    width: 70px;
    height: 98px;
    background: white;
    border: 1px solid #999;
    border-radius: 6px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    display: none;
}

/* Mobile played cards - use exact same SVG styling as hand cards */
.played-card.mobile-played-card {
    position: absolute;
    background: transparent;
    border: none;
    box-shadow: none;
    display: none;
}

.played-card.mobile-played-card .playing-card {
    width: 48px;
    height: 64px;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
    transition: transform 0.2s ease;
}

.played-card.mobile-played-card .playing-card:hover {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
}


.played-card.card-visible {
    display: block;
}

/* Desktop position played cards based on who played them */
.played-card:not(.mobile-played-card).from-north {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.played-card:not(.mobile-played-card).from-east {
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
}

.played-card:not(.mobile-played-card).from-south {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.played-card:not(.mobile-played-card).from-west {
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobile position played cards - adjusted for smaller size */
.played-card.mobile-played-card.from-north {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.played-card.mobile-played-card.from-east {
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.played-card.mobile-played-card.from-south {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.played-card.mobile-played-card.from-west {
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
}

/* Game Score Display - Top Right */
.game-score-display {
    position: absolute;
    top: -45px;
    right: 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px;
    z-index: 100;
    width: 60px;
    text-align: center;
}

.score-team {
    font-size: 28px;
    font-weight: bold;
    padding: 8px 0;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.score-team-ns {
    color: var(--lavendar);
    opacity: 0.8;
}

.score-team-ew {
    color: var(--coral);
}

/* Game Phase Display - Top Left */
.game-phase-display {
    position: absolute;
    left: 10px;
    top:-45px;
    font-size: 10px;
    color: var(--off-yellow);
    opacity: 0.5;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    line-height: 1.6;
    z-index: 10;
    font-size: 14px;
}

/* Replay Controls */
.replay-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    padding-bottom: max(30px, env(safe-area-inset-bottom));
    gap: 20px;
    z-index: 100;
}

.control-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.replay-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    touch-action: manipulation; /* Disable double-tap zoom */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
}

.replay-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.replay-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Large Navigation Controls (Mobile only) */
.large-nav-controls {
    position: fixed;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
    z-index: 95;
}

.large-nav-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.large-nav-btn:active:not(:disabled) {
    transform: scale(0.9);
    color: rgba(255, 255, 255, 0.9);
}

.large-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.large-nav-prev {
    margin-left: 5px;
}

.large-nav-next {
    margin-right: 5px;
}

.replay-btn.play-pause {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

.replay-btn.play-pause:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.3);
}

.replay-btn .icon {
    width: 18px;
    height: 18px;
    color: #FFF8DC;
}

.state-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.state-counter {
    color: #FFF8DC;
    font-weight: 600;
    font-size: 14px;
}

.state-timestamp {
    color: #FFF8DC;
    opacity: 0.8;
    font-size: 12px;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.speed-control label {
    color: #FFF8DC;
    font-size: 14px;
    font-weight: 500;
}

.speed-control select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #FFF8DC;
    padding: 4px 8px;
    font-size: 12px;
}

.speed-control select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

/* EuchreClub Logo - Bottom Left */
a.replay-logo-container,
.replay-logo-container {
    position: fixed;
    bottom: 120px;
    left: 30px;
    z-index: 98;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-decoration: none;
    color: inherit;
}

a.replay-logo-container:hover {
    text-decoration: none;
}

.replay-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--off-yellow);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.replay-logo-accent {
    color: rgba(255,255,255,0.8);
}

.replay-url {
    font-size: 10px;
    color: var(--off-yellow);
    opacity: 0.5;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    bottom: calc(70px + max(30px, env(safe-area-inset-bottom)) - 15px);
    left: 0;
    right: 0;
    padding: 10px 20px;
    z-index: 99;
}

.progress-bar {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    touch-action: manipulation; /* Disable double-tap zoom */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
}

.progress-bar::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #FFF8DC;
    cursor: pointer;
    border: 2px solid #426a53;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #FFF8DC;
    cursor: pointer;
    border: 2px solid #426a53;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar::-webkit-slider-track {
    background: linear-gradient(to right,
        rgba(34, 197, 94, 0.6) 0%,
        rgba(34, 197, 94, 0.6) var(--progress, 0%),
        rgba(255, 255, 255, 0.2) var(--progress, 0%),
        rgba(255, 255, 255, 0.2) 100%);
    border-radius: 3px;
    height: 6px;
}

.progress-bar::-moz-range-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    height: 6px;
    border: none;
}

.progress-bar::-moz-range-progress {
    background: rgba(34, 197, 94, 0.6);
    border-radius: 3px;
    height: 6px;
}

/* Enhanced Game Info Bar for Replay */
.game-info-bar {
    margin-bottom: 20px;
}

/* Adjust streaming container to account for bottom controls */
.replay-container {
    position: relative;
    padding-bottom: 130px;
}

.game-phase {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phase-label {
    color: #FFF8DC;
    font-weight: 500;
    opacity: 0.8;
}

.phase-text {
    color: #FFF8DC;
    font-weight: 600;
}

/* Player Badges */
.current-player-badge {
    background: rgba(255, 215, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.6);
    border-radius: 50%;
    padding: 2px 4px;
    font-size: 10px;
    margin-left: 4px;
    color: #FFD700;
}

/* Keyboard Shortcuts Help */
.keyboard-shortcuts {
    position: relative;
    margin-left: 8px;
    display: inline-block;
}

.shortcuts-icon {
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.shortcuts-icon:hover {
    opacity: 1;
}

.shortcuts-popup {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    transform: translateY(10px);
}

.keyboard-shortcuts:hover .shortcuts-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.shortcuts-header {
    color: #FFF8DC;
    font-weight: 600;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.shortcut {
    color: #FFF8DC;
    font-size: 12px;
    margin-bottom: 5px;
    opacity: 0.9;
}

/* Perspective Switcher */
.perspective-switcher {
    position: relative;
}

.perspective-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    min-width: 150px;
    z-index: 1000;
}

.perspective-header {
    color: #FFF8DC;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.perspective-option {
    display: block;
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: none;
    color: #FFF8DC;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.perspective-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.perspective-option.selected {
    background: rgba(147, 112, 219, 0.3);
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    /* Move EuchreClub logo to top-left on mobile */
    a.replay-logo-container,
    .replay-logo-container {
        top: 10px;
        bottom: auto;
        left: 10px;
    }

    .replay-logo-text {
        font-size: 16px;
    }

    .replay-url {
        display: none;
    }
}

@media (max-width: 500px) {
    .game-board {
        height: 540px;
    }
}

@media (max-width: 768px) {
    .replay-container {
        width: 100%;
        padding: 10px;
    }

    html body {
        padding-top: 85px;
    }

    .game-board {
        width: 100%;
    }

    .game-phase-display {
        font-size: 10px;
    }

    .game-score-display {
        width: 40px;
    }

    .score-team {
        font-size: 20px;
    }

    /* Position east/west players at screen edges on mobile */
    .player-east {
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .player-west {
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .replay-controls {
        /* Keep as horizontal row since state-info and speed-control are positioned absolutely */
        justify-content: center;
        padding: 10px 15px;
        padding-bottom: max(30px, env(safe-area-inset-bottom));
    }

    .control-group {
        justify-content: center;
    }

    /* Hide state info on mobile */
    .state-info {
        display: none;
    }

    /* Hide speed control on mobile */
    .speed-control {
        display: none;
    }

    .keyboard-shortcuts {
        display: none;
    }

    /* Adjust progress bar position since controls are shorter now */
    .progress-container {
        bottom: calc(70px + max(30px, env(safe-area-inset-bottom)) - 15px);
    }
}

@media (max-width: 480px) {
    .replay-btn {
        width: 36px;
        height: 36px;
    }

    .replay-btn .icon {
        width: 16px;
        height: 16px;
    }

    .control-group {
        gap: 6px;
    }

    .speed-control {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

/* Indicators Container - holds dealer and trump indicators */
.indicators-container {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Dealer Indicator - Simple white badge */
.dealer-indicator {
    position: static;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 8px;
    border-radius: 9px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
}

/* Trump Indicator - Shows trump suit */
.trump-indicator {
    position: static;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 9px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
}

.player-south .indicators-container {
    top: calc(100% - 65px);
}


/* Team colors for player names */
.team-ns .player-name {
    color: var(--lavendar);
}

.team-ew .player-name {
    color: var(--coral);
}

/* Turn indicator - only show background when it's their turn */
.player-info {
    background: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.player-info.current-turn {
    background: rgba(0, 0, 0, 0.3);
}

/* Desktop: Highlight winning card in completed trick */
.played-card.trick-winner:not(.mobile-played-card) {
    border: 1px solid black;
    background: #f7e7bf;
}

/* Mobile: Change SVG background and border for winning card */
.played-card.mobile-played-card.trick-winner {
    border: none;
    background: transparent;
}

.played-card.mobile-played-card.trick-winner .playing-card rect {
    fill: #f7e7bf;
    stroke: #000000;
    stroke-width: 2;
}

/* Trick winner for compact cards */
.fanned-card .compact-card-horizontal.trick-winner {
    background: #f7e7bf;
    border: 1px solid black;
}

/* Trick winner for vertical cards */
.played-card.trick-winner .card-vertical {
    background: #f7e7bf;
    border: 1px solid black;
}

/* Speech Bubbles for Pass */
.player-speech-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    bottom: calc(100% + 11px);
    left: 50%;
    transform: translateX(-50%);
}

/* Suit symbols in speech bubbles */
.player-speech-bubble .red-suit,
.player-speech-bubble .black-suit {
    font-size: 20px;
    font-weight: bold;
}

/* Add extra spacing for South player's info */
.player-south .player-info {
    margin-top: 25px;
    position: relative;
    top: 10px;
}

.player-position.player-north {
}

.player-position.player-south {
}