body {
    font-family: Arial, sans-serif;
    background: #2c3e50;
    color: #ecf0f1;
    margin: 0;
    padding: 10px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
}

#container {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 5px;
}

/* Main gameplay area */
#gameArea {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
    background: #34495e;
    border-radius: 15px;
    padding: 15px;
    gap: 0;
}

/* Game header: responsive width */
#gameHeader {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
    position: relative;
    box-sizing: border-box;
    gap: 0;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 5px 10px;
    background: #2c3e50;
    border-radius: 0;
    box-sizing: border-box;
}

.top-row {
    padding: 8px 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    background: #2c3e50;
}

.bottom-row {
    margin-bottom: 0;
    background: #3a4d61;
    padding: 8px 15px;
}

.header-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

#gameTitle {
    font-size: clamp(20px, 6vw, 24px);
    font-weight: bold;
    background: linear-gradient(135deg, #f1c40f 0%, #e67e22 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 0 4px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

#gameTitle:hover {
    background: linear-gradient(135deg, #f1c40f 0%, #e74c3c 50%, #f1c40f 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 2s ease infinite;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#restartButton,
#showInstructions,
#showLeaderboard {
    background: rgba(236, 240, 241, 0.1);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #ecf0f1;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

#restartButton::before {
    content: "↺";
    font-weight: bold;
    font-size: 24px;
    transform: translateY(-1px);
}

#showInstructions::before {
    content: "?";
    font-weight: bold;
    font-size: 24px;
    font-family: Arial, sans-serif;
}

#showLeaderboard::before {
    content: "🏆";
    font-weight: bold;
    font-size: 20px;
    font-family: Arial, sans-serif;
}

#restartButton:hover,
#showInstructions:hover,
#showLeaderboard:hover {
    background: rgba(236, 240, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

#restartButton:active,
#showInstructions:active,
#showLeaderboard:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Add a subtle glow effect on hover */
#restartButton:hover::after,
#showInstructions:hover::after,
#showLeaderboard:hover::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.game-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#scoreDisplay,
#cardsLeftDisplay {
    font-size: clamp(18px, 5vw, 22px);
    font-weight: bold;
}

/* Grid container */
#grid {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    background: #ecf0f1;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Score breakdown display */
#handEvaluation {
    width: 100%;
    margin: 0;
    padding: 12px 15px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 1;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #2c3e50;
    border-radius: 0;
    backdrop-filter: blur(5px);
    box-shadow: none;
}

.hand-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.selected-hand {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 3px;
    border-radius: 6px;
}

.hand-type {
    font-size: clamp(16px, 5vw, 18px);
    font-weight: 600;
    color: #f1c40f;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    background: rgba(241, 196, 15, 0.1);
    border-radius: 6px;
    white-space: nowrap;
}

.score-breakdown {
    font-size: clamp(14px, 4vw, 16px);
    color: rgba(236, 240, 241, 0.9);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.score-base,
.score-multiplier {
    color: #3498db;
    font-weight: 600;
    margin: 0 1px;
}

.score-value {
    color: rgba(236, 240, 241, 0.95);
    font-weight: 600;
    margin: 0 1px;
}

.score-total {
    color: #2ecc71;
    font-weight: 600;
    margin-left: 2px;
}

.hand-instruction {
    color: rgba(236, 240, 241, 0.7);
    font-size: clamp(14px, 4vw, 16px);
    font-style: italic;
    text-align: center;
}

.selected-card {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    min-width: 24px;
    text-align: center;
    color: #2c3e50; /* Default color */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: clamp(12px, 3.5vw, 14px);
}

/* Replace .red with specific suit colors */
.selected-card.hearts {
    color: #e74c3c;
}

.selected-card.diamonds {
    color: #e67e22;
}

.selected-card.clubs {
    color: #2980b9;
}

.selected-card.spades {
    color: #2c3e50;
}

.selected-card.joker {
    font-weight: bold;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(241, 196, 15, 0.5);
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.2);
}

/* Update joker colors for each suit */
.selected-card.joker.hearts {
    color: #e74c3c;
    text-shadow: 0 0 2px rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
}

.selected-card.joker.diamonds {
    color: #e67e22;
    text-shadow: 0 0 2px rgba(230, 126, 34, 0.1);
    border-color: rgba(230, 126, 34, 0.3);
}

.selected-card.joker.clubs {
    color: #2980b9;
    text-shadow: 0 0 2px rgba(41, 128, 185, 0.1);
    border-color: rgba(41, 128, 185, 0.3);
}

.selected-card.joker.spades {
    color: #2c3e50;
    text-shadow: 0 0 2px rgba(44, 62, 80, 0.1);
    border-color: rgba(44, 62, 80, 0.3);
}

/* Play button */
#playButton {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
    font-size: 18px;
    font-weight: 600;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 0 0 12px 12px;
    cursor: pointer;
    margin: 0;
    height: 50px;
    width: 100%;
    min-width: 140px;
    opacity: 0.3;
    pointer-events: none;
    transition: all 0.3s ease;
    touch-action: manipulation;
    box-shadow: none;
    transform: translateY(0);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    background: #95a5a6; /* Neutral color when disabled */
}

#playButton::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 100%
    );
}

#playButton.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    background: #2ecc71; /* Green color when enabled */
    cursor: pointer;
}

#playButton.visible:hover {
    background: #27ae60;
    transform: translateY(0);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

#playButton.visible:active {
    transform: translateY(0);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
}

/* Card styling */
.card {
    width: 20%; /* Wider cards for 4 columns */
    height: 13.33%; /* Shorter cards for 6 rows */
    line-height: normal;
    border: 2px solid #34495e;
    border-radius: 8px;
    position: absolute;
    font-size: clamp(14px, 4vw, 18px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    cursor: pointer;
    user-select: none;
    transition: top 0.5s ease, left 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
    touch-action: manipulation;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    z-index: 1;
    color: #2c3e50; /* Default color */
}

/* Add suit colors for main grid cards */
.card.hearts {
    color: #e74c3c;
}

.card.diamonds {
    color: #e67e22;
}

.card.clubs {
    color: #2980b9;
}

.card.spades {
    color: #2c3e50;
}

.card.empty {
    background: transparent;
    border: 1px dashed #bdc3c7;
    cursor: default;
}

.card.notSelectable {
    opacity: 0.4;
}

.card.selected {
    border-color: #f1c40f;
    background: rgba(241, 196, 15, 0.3);
    opacity: 1;
}

.card.removed {
    opacity: 0;
    transform: scale(0.1);
    pointer-events: none;
}

/* Drop-in animation for new cards */
.drop {
    animation: dropAnimation 0.5s ease forwards;
}

@keyframes dropAnimation {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Special style for Joker cards */
.card.joker {
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0.9) 5px,
        rgba(255, 215, 0, 0.1) 5px,
        rgba(255, 215, 0, 0.1) 10px
    );
    position: absolute;
}

.card.joker::before {
    content: "🎭";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8860b; /* Dark golden color */
    font-size: clamp(22px, 55%, 30px);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* When a Joker is selected */
.card.joker.selected {
    background: repeating-linear-gradient(
        45deg,
        rgba(241, 196, 15, 0.4),
        rgba(241, 196, 15, 0.4) 5px,
        rgba(241, 196, 15, 0.2) 5px,
        rgba(241, 196, 15, 0.2) 10px
    );
}

.card.joker.selected::before {
    color: #8b6914; /* Darker golden color when selected */
}

/* Modal adjustments for mobile */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #34495e;
    width: 95%;
    max-width: 600px;
    border-radius: 15px;
    margin: 10px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.instructions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .instructions-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-height: 85vh;
    }
}

.instructions-column {
    min-width: 0;
}

.modal-header {
    background: #2c3e50;
    padding: 20px;
    border-bottom: 2px solid #456789;
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-header h2 {
    font-size: clamp(20px, 6vw, 24px);
    margin: 0;
    text-align: center;
    color: #ecf0f1;
}

.modal-body {
    padding: 15px 0;
    color: #ecf0f1;
}

.instruction-section {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(44, 62, 80, 0.5);
    border-radius: 10px;
}

.instruction-section h3 {
    font-size: clamp(16px, 5vw, 20px);
    margin-top: 0;
    margin-bottom: 10px;
    color: #3498db;
}

.instruction-section p,
.instruction-section li {
    font-size: clamp(14px, 4vw, 16px);
    margin-bottom: 8px;
}

.modal-footer {
    padding: 15px;
    background: #2c3e50;
    display: flex;
    justify-content: center;
    position: sticky;
    bottom: 0;
    z-index: 1;
}

.modal-button {
    padding: 12px 40px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: clamp(14px, 4vw, 16px);
    min-height: 44px;
    transition: all 0.3s ease;
    margin: 0 8px;
}

.modal-button:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.modal-button.secondary {
    background: #34495e;
    color: #ecf0f1;
    border: 1px solid rgba(236, 240, 241, 0.2);
}

.modal-button.secondary:hover {
    background: #2c3e50;
    border-color: rgba(236, 240, 241, 0.3);
}

/* Redirect modal specific styles */
#redirectModal .modal-content {
    max-width: 500px;
    text-align: center;
}

#redirectModal .modal-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

#redirectModal .modal-header h2 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#redirectModal .modal-body {
    padding: 25px;
    font-size: clamp(16px, 4vw, 18px);
    line-height: 1.6;
}

#redirectModal .modal-body a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

#redirectModal .modal-body a:hover {
    color: #2980b9;
    text-decoration: underline;
}

#redirectModal .modal-footer {
    padding: 20px;
    gap: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 480px) {
    #redirectModal .modal-footer {
        flex-direction: column;
    }

    #redirectModal .modal-button {
        width: 100%;
        margin: 5px 0;
    }
}

/* Scoring table styles */
.scoring-section {
    height: 100%;
}

#scoringTableContainer {
    margin-top: 15px;
}

#scoringTable {
    width: 100%;
    background: rgba(44, 62, 80, 0.3);
    border-radius: 5px;
    border-collapse: collapse;
}

#scoringTable th,
#scoringTable td {
    padding: 8px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: clamp(12px, 3.5vw, 14px);
}

#scoringTable th {
    background: rgba(44, 62, 80, 0.5);
    font-weight: bold;
    color: #3498db;
}

/* Show instructions button */
#showInstructions {
    font-size: clamp(18px, 5vw, 20px);
    padding: 8px;
    min-height: 44px;
    min-width: 44px;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
}

.bonus-note {
    margin-top: 10px;
    font-style: italic;
    color: #f1c40f;
}

/* Remove old sidebar styles */
#sidebar {
    display: none;
}

/* High Scores styles */
#highScoresList {
    margin-top: 5px;
}

.high-score-entry {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    font-size: clamp(14px, 4vw, 16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    transition: background-color 0.2s ease;
}

.high-score-entry:hover {
    background: rgba(255, 255, 255, 0.05);
}

.high-score-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.high-score-entry.empty {
    opacity: 0.3;
    background: none;
}

.high-score-entry.empty:hover {
    background: none;
}

.high-score-entry .rank {
    width: 30px;
    color: #f1c40f;
    font-weight: bold;
}

.high-score-entry .username {
    flex: 1;
    margin: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.high-score-entry .score {
    font-weight: bold;
    color: #3498db;
}

.high-score-entry.empty .rank,
.high-score-entry.empty .score {
    color: inherit;
}

/* Score submission styles */
.username-section {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.username-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.username-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #34495e;
    border-radius: 5px;
    font-size: clamp(14px, 4vw, 16px);
    background: #ecf0f1;
    color: #2c3e50;
    transition: border-color 0.3s;
    box-sizing: border-box;
    min-height: 44px;
}

.submit-score-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background: #3498db;
    color: white;
    font-size: clamp(14px, 4vw, 16px);
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
    min-height: 44px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .username-input-row {
        flex-direction: row;
    }

    .username-input {
        flex: 1;
    }

    .submit-score-button {
        width: auto;
        min-width: 100px;
    }
}

/* Username hint styling */
.username-hint {
    font-size: 12px;
    margin-top: 2px;
    margin-bottom: 5px;
    padding: 0 2px;
}

/* Game Over Screen Styles */
.game-over-score-value {
    font-size: 36px;
    margin: 10px 0;
}

.submit-score-button.success {
    background: #27ae60;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 5px 0;
}

.pagination-button {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, opacity 0.3s;
    min-width: 30px;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-button:not(:disabled):hover {
    background: #2980b9;
}

.page-info {
    font-size: 12px;
    color: #95a5a6;
    min-width: 80px;
    text-align: center;
}

/* Rank Information */
.rank-info {
    text-align: center;
    margin: 10px 0;
    padding: 8px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
}

.rank-info:not(:empty) {
    background: rgba(52, 152, 219, 0.1);
}

.submission-success {
    text-align: center;
    padding: 10px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 5px;
    color: #27ae60;
    font-weight: bold;
    margin-top: 10px;
}

/* Leaderboard type selector */
.leaderboard-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.leaderboard-type-button {
    padding: 5px 15px;
    border: none;
    border-radius: 5px;
    background: rgba(52, 152, 219, 0.2);
    color: #ecf0f1;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
}

.leaderboard-type-button.active {
    background: #3498db;
}

.leaderboard-type-button:hover:not(.active) {
    background: rgba(52, 152, 219, 0.4);
}

#playButton.finish {
    background: #e74c3c; /* Red color for finish button */
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

#playButton.finish:hover {
    background: #c0392b; /* Darker red on hover */
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

#playButton.finish:active {
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
}

/* Leaderboard Modal Close Button */
.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(236, 240, 241, 0.1);
    transform: rotate(90deg);
}

.modal-close::before {
    content: "×";
}

/* Leaderboard Modal Title */
.leaderboard-title {
    text-align: center;
    margin: 0;
    padding-right: 40px;
}

/* Add these styles */
#showHistory {
    background: rgba(236, 240, 241, 0.1);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #ecf0f1;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    margin-left: 12px;
}

#showHistory::before {
    content: "📜";
    font-size: 20px;
}

#showHistory:hover {
    background: rgba(236, 240, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

#showHistory:active {
    transform: translateY(0);
    box-shadow: none;
}

/* History modal specific styles */
.history-entry {
    padding: 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background-color 0.2s ease;
    display: flex;
    gap: 12px;
    position: relative;
}

.history-entry:hover {
    background: rgba(255, 255, 255, 0.08);
}

.history-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.history-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 120px;
    margin-left: auto;
}
.history-score {
    font-size: 1.4em;
    font-weight: bold;
    color: #2ecc71;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    background: rgba(46, 204, 113, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    margin-left: auto;
}

.history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.history-cards {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.history-cards .selected-card {
    font-size: 1em;
    padding: 4px 4px;
    min-width: 24px;
    height: 16px;
    line-height: 24px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-hand-type {
    font-size: 1em;
    color: #f1c40f;
    padding: 4px 12px;
    background: rgba(241, 196, 15, 0.1);
    border-radius: 4px;
    flex: 1;
    white-space: nowrap;
}

.history-score-breakdown {
    font-size: 0.9em;
    color: rgba(236, 240, 241, 0.8);
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    display: inline-block;
    margin-left: 36px;
}

.history-number {
    font-size: 1.1em;
    font-weight: bold;
    color: #f1c40f;
    min-width: 24px;
    padding-left: 4px;
}

#historyList {
    padding: 0 15px;
    max-height: 60vh;
    overflow-y: auto;
}
/* Add hover effect for history entries */
.history-entry::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    border-radius: 8px;
    z-index: 1;
}

.history-entry:hover::after {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .history-hand-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .history-info {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 8px;
    }

    .history-cards {
        width: 100%;
        justify-content: flex-start;
    }

    .history-score-breakdown {
        margin-left: 24px;
        margin-top: 4px;
    }
}

.title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#versionDisplay {
    font-size: 11px;
    color: rgba(236, 240, 241, 0.3);
    letter-spacing: 0.5px;
    margin-top: -4px;
    font-family: monospace;
    transition: color 0.3s ease;
}

#versionDisplay:hover {
    color: rgba(236, 240, 241, 0.5);
}
