.player_name {
    visibility: hidden;
    position: absolute;
    width: 100px;
    text-align: center;
    font-size: 16pt;
    text-shadow: 2pt 2pt rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
}

.player_portrait {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    display: block;
    margin: 0 auto 8px auto;
    object-fit: cover;
    object-position: center;
    background: transparent;
}

.player_score {
    visibility: hidden;
    position: absolute;
    width: 100px;
    text-align: center;
    font-size: 28pt;
    text-shadow: 2pt 2pt rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
}

#select_passing_cards_message {
    visibility: hidden;
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 16pt;
    text-shadow: 2pt 2pt rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
}

.select_passing_card_region {
    position: absolute;
    opacity: 0;
    border-radius: 8px;
    background: #00000022;
    border: 2px solid white;
    width: 110px;
    height: 157px;
}

#confirm_passing_cards_region {
    position: absolute;
    transform: translate(-50%, 0%);
    width: 140px;
    height: 60px;
    visibility: hidden;
    opacity: 0;
}

#confirm_passing_cards_button {
    position: absolute;
    cursor: pointer;
    border:#FFFFFF 2px solid;
    border-radius:8px;
    background:#0a4a0a;
    color:white;
    width: 130px;
    height: 50px;
    font-size:14pt;
}

#confirm_passing_cards_button:hover {
    background:#0f5f0f;
}

#confirm_passing_cards_shadow {
    position: absolute;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    width: 130px;
    height: 50px;
    left: 15px;
    top: 10px;
}

#player_play_prompt {
    position: absolute;
    width: 200px;
    transform: translate(-50%,-50%);
    text-align: center;
    font-size: 16pt;
    text-shadow: 2pt 2pt rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
}

#moon_shoot_text {
    position: absolute;
    width: 100%;
    top: 15%;
    text-align: center;
    font-size: 24pt;
    text-shadow: 3pt 3pt rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
}

#BubbleScoreHeartTemplate {
    visibility: hidden;
    opacity: 0;
}

.BubbleScoreHeart {
    position: absolute;
    width: 112px;
    height: 100px;
    background-image: url('images/score_heart.png');
    text-align: center;
    pointer-events: none;
}

.BubbleScoreHeartsPoints {
    font-size: 22pt;
    line-height: 50px;
    font-weight: bold;
}

#BubbleScoreSpadeTemplate {
    visibility: hidden;
    opacity: 0;
}

.BubbleScoreSpade {
    position: absolute;
    width: 85px;
    height: 100px;
    background-image: url('images/score_spade.png');
    text-align: center;
    pointer-events: none;
}

.BubbleScoreSpadesPoints {
    font-size: 20pt;
    line-height: 50px;
    font-weight: bold;
}

#hint_button {
    position: absolute;
    cursor: pointer;
    width: 70px;
    height: 30px;
    background: rgba(0, 0, 0, 0);
    border:#FFFFFF 2px solid;
    border-width: 1px;
    border-radius: 7px;
    color:white;
    font-size: 13pt;
    visibility: hidden;
    opacity: 0;
}

#hint_button:hover {
    background: rgba(255, 255, 255, 0.3);
}

#GameOverView {
    z-index: 999;
    width: 340px;
    height:100px;
    background:#000000;
	border:#FFFFFF 2px solid;
	border-radius:10px;
	box-shadow: 30px 30px 0px rgba(0,0,0,0.5);
	position: absolute;
	top:50%;
	left: 50%;
	transform: translate(-50%, -50%);
    margin: auto;
    text-align: center;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
}

#GameOverResultText {
    margin-top: 10px;
    font-size: 24pt;
}

#GameOverResultText2 {
    margin-top: 10px;
    font-size: 20pt;
}

/* Score Display in Bottom Left Corner */
#score_display {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffffff;
    border-radius: 10px;
    padding: 15px;
    color: white;
    font-family: Arial, sans-serif;
    min-width: 120px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
}

.score_title {
    font-size: 14pt;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    color: #ffffff;
    border-bottom: 1px solid #ffffff;
    padding-bottom: 5px;
}

.score_row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12pt;
}

.score_player {
    font-weight: bold;
    color: #cccccc;
}

.score_value {
    color: #ffffff;
    font-weight: bold;
}

/* Difficulty Display above Scoreboard */
#difficulty_display {
    position: fixed;
    bottom: 190px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    font-family: Arial, sans-serif;
    min-width: 120px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
}

.difficulty_title {
    font-size: 12pt;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
    color: #cccccc;
    border-bottom: 1px solid #ffffff;
    padding-bottom: 3px;
}

.difficulty_value {
    font-size: 14pt;
    font-weight: bold;
    text-align: center;
    color: #ffffff;
}

/* Mobile Toggle Buttons - Hidden by default */
#mobile_toggle_buttons {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 101;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
}

.mobile_toggle_btn {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-family: Arial, sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    font-size: 12px;
}

.mobile_toggle_btn:hover {
    background: rgba(50, 50, 50, 0.9);
    transform: translateY(-1px);
}

.mobile_toggle_btn:active {
    transform: translateY(0px);
}

.toggle_icon {
    font-size: 14px;
}

.toggle_text {
    font-weight: bold;
    font-size: 11px;
}

/* Mobile Score Display Overlay */
.mobile_score_overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #ffffff;
    border-radius: 15px;
    padding: 20px;
    color: white;
    font-family: Arial, sans-serif;
    z-index: 200;
    max-width: 280px;
    width: 80vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.mobile_score_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #ffffff;
    padding-bottom: 10px;
}

.mobile_score_title {
    font-size: 16pt;
    font-weight: bold;
    color: #ffffff;
}

.mobile_close_btn {
    background: transparent;
    border: 1px solid #ffffff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile_close_btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile_score_row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14pt;
    padding: 5px 0;
}

.mobile_score_player {
    font-weight: bold;
    color: #cccccc;
}

.mobile_score_value {
    color: #ffffff;
    font-weight: bold;
}

/* Mobile Difficulty Display */
.mobile_difficulty_overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #ffffff;
    border-radius: 15px;
    padding: 20px;
    color: white;
    font-family: Arial, sans-serif;
    z-index: 200;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.mobile_difficulty_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #ffffff;
    padding-bottom: 10px;
}

.mobile_difficulty_title {
    font-size: 16pt;
    font-weight: bold;
    color: #ffffff;
}

.mobile_difficulty_value {
    font-size: 18pt;
    font-weight: bold;
    color: #ffffff;
    margin-top: 10px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    /* Hide desktop displays on mobile */
    #score_display,
    #difficulty_display {
        display: none !important;
    }
    
    /* Show mobile toggle buttons */
    #mobile_toggle_buttons {
        display: flex !important;
    }
}

@media screen and (max-width: 480px) {
    .mobile_toggle_btn {
        min-width: 70px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .toggle_text {
        font-size: 10px;
    }
    
    .toggle_icon {
        font-size: 12px;
    }
}

/* Play Again overlay */
.play-again {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2000; /* above game elements */
}
.play-again.hidden { display: none; }
.play-again-btn {
  padding: 14px 22px;
  font-size: 16px;
  color: #fff;
  background: #0c7a19;
  border: 2px solid #dfffdc;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  cursor: pointer;
}
.play-again-btn:hover { background: #0f8d1f; }