* {
    box-sizing: border-box;
}

body {
    margin: 20px;
    font-family: Arial, sans-serif;
}

/* RESTORED BOARD STYLES */
svg {
    background: #fff;
}

#info {
    margin-top: 10px;
    font-size: 14px;
}

.path-line {
    stroke: #999;
    stroke-width: 1;
    stroke-dasharray: 5, 5;
    fill: none;
}

.grid-dot {
    fill: #ddd;
}

.shape {
    fill: #fff;
    stroke: #000;
    stroke-width: 1.5;
}

.label {
    font-size: 10px;
    text-anchor: middle;
    fill: #000;
    display: none;
}

.type-label {
    font-size: 8px;
    text-anchor: middle;
    fill: #000;
}

#gameContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    min-height: 100vh;
}

#mapPanel {
    padding: 20px;
    background: transparent;
    position: relative;
    display: flex;
    justify-content: center;
    border: 2px solid black;
    border-radius: 24px;
}

/* SCORING SECTION */
#scoringSection {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0px; /* No gap between columns */
    width: auto;
    padding-left: 0px;
    margin-top: 0px;
}

.score-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0 2px; /* Minimal side padding */
}

.sign-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 7.5px;
    width: 15px; /* Narrower sign columns */
}

.score-box {
    width: 35px;
    height: 35px;
    border: 1px solid #000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 400;
    background: #fff;
    flex-shrink: 0;
    overflow: visible;
}

#total-box-1, #total-box-2, #total-box-3,
#final-box-1, #final-box-2, #final-box-3, #final-box-4,
#sixth-box-4 {
    border-color: transparent !important;
    background: transparent !important;
}

.multiplier-box {
    width: 10px !important;
    border-color: transparent !important;
    background-color: transparent !important;
}

.score-sign {
    font-size: 14px;
    font-weight: 800;
    color: #000;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pink-score { color: rgb(210, 50, 110); }
.blue-score { color: rgb(40, 150, 210); }
.purple-score { color: rgb(110, 60, 140); }
.green-score { color: rgb(70, 170, 70); }

.total-score .score-box {
    color: #000; /* Total score boxes should have black text */
}

.sixth-score .score-box {
    color: #000;
}

.total-score .score-sign {
    visibility: hidden;
}

.sixth-score .score-sign {
    visibility: hidden;
}

.multiplier-box {
    border-color: transparent !important;
    background-color: transparent !important;
}

.score-box:empty {
    background: #fff;
    border-style: solid;
    border-width: 1px;
}

.hub-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgb(70, 170, 70); /* Green color */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

#touristScoreRow {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: -12px; /* High overlap */
    width: auto;
    padding-left: 0px;
    margin-top: -5px;
}

.tourist-score-node {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    width: 40px;
    height: 40px;
}

/* MODERNIZED CARD OVERLAY */
#cardOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#overlayPanel {
    animation: cardEntrance 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
    width: 95%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 2px solid black;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 30px;
}

#currentCardSection {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

#centerCardDisplay {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    /*border: 2px solid black;*/
    /*border-radius: 24px;*/
}

#historySection {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.overlay-label {
    margin: 0;
    /*font-size: 0.7em;*/
    /*font-weight: 800;*/
    /*color: #bdc3c7;*/
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-align: center;
}

#historyCardsArea {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

#overlayControls {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#roundCompleteMessage {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 16px;
    border: 2px solid #e9ecef;
}

.round-title {
    margin: 0;
    font-size: 1.5em;
    color: #2c3e50;
    font-weight: 800;
}

.round-subtitle {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    color: #7f8c8d;
}

.instruction {
    margin: 10px 0 0 0;
    font-size: 0.7em;
    font-weight: 600;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#aiMessage {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75em;
    text-align: center;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Card Entrance Animations */
@keyframes cardEntrance {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.center-card {
    /*animation: cardEntrance 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;*/
}

.side-card {
    flex-shrink: 0;
}

.grand-total-display {
    width: 60px !important;
    height: 35px !important;
    border-radius: 4px;
    background: transparent !important;
    color: #000 !important;
    /*font-size: 24px !important;*/
    font-weight: 900 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000 !important;
    z-index: 20;
    position: relative;
}

#grand-box-4 {
    /* Base container should not constrain the display */
    overflow: visible;
}
