/* Global Page Reset & Box Sizing */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrollbars globally */
    box-sizing: border-box;
    scroll-behavior: smooth; /* Added for smooth scrolling on anchor links */
}

*, *::before, *::after {
    box-sizing: inherit; /* All elements inherit box-sizing from html/body */
}

body {
    font-family: Arial, sans-serif;
    background-color: #166534; /* User specified page background */
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center children horizontally */
    justify-content: flex-start; /* Align content to the top */
    min-height: 100vh;
    padding-top: 10px; /* Reduced top padding to accommodate logo */
}

/* Logo styles */
#logo-container {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
}

#site-logo {
    max-width: 100px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Top Bar Styles */
#page-top-bar {
    background: linear-gradient(to bottom, rgba(22, 101, 52, 0.85), rgba(20, 80, 45, 0.95));
    padding: 10px 25px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    border-bottom: 2px solid rgba(10, 60, 30, 0.9);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#page-menu a {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #FFD700;
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.95em;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#page-menu a:hover {
    text-decoration: none;
    background-color: rgba(255, 215, 0, 0.15);
    color: #fff;
}

#page-menu a#back-to-games-link {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

#page-menu a#back-to-games-link:hover {
    background-color: rgba(255, 215, 0, 0.25);
    border-color: rgba(255, 215, 0, 0.6);
}

#page-menu a.disabled-look,
#page-menu a.disabled {
    color: #777 !important;
    pointer-events: none;
    text-decoration: none;
    background-color: transparent !important;
}

/* Board-based game info overlay */
#board-game-info {
    position: absolute;
    top: 10px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: Arial, sans-serif;
    color: white;
    font-size: 0.9em;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through to cards below */
}

#board-game-info > * {
    pointer-events: auto; /* Re-enable pointer events for child elements */
}

.board-info-left {
    display: flex;
    gap: 20px;
}

.board-info-left span {
    background-color: transparent;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: normal;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.board-info-right {
    display: flex;
    gap: 8px;
}

.board-button {
    color: white;
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.6);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-size: 0.85em;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

.board-button:hover:not(.disabled) {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.board-button.disabled {
    color: #777 !important;
    background-color: rgba(100, 100, 100, 0.3) !important;
    border-color: rgba(120, 120, 120, 0.3) !important;
    pointer-events: none;
    text-decoration: none;
}

.button-style {
    color: #FFD700;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.button-style:hover {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #fff;
}

.button-style.disabled {
    color: #777 !important;
    background-color: rgba(100, 100, 100, 0.1) !important;
    border-color: rgba(120, 120, 120, 0.3) !important;
    pointer-events: none;
    text-decoration: none;
}

.button-style.disabled-look {
    background-color: #666 !important;
    color: #999 !important;
    cursor: default !important;
    opacity: 0.6 !important;
}

.button-style.disabled-look:hover {
    background-color: #666 !important;
    color: #999 !important;
    transform: none !important;
}

/* Game Board Styles */
#game-board-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

#game-board {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 50px 22px 20px 22px; /* Match Yahtzee's padding with extra top space */
    background-color: #15803d; /* Match Solitaire green */
    border: 1px solid #103F2E; /* Darker, related green border */
    border-radius: 12px; /* Slightly more pronounced radius */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); /* Softer, slightly more defined shadow */
    width: 100%;
    max-width: 650px; /* CRITICAL MATCH - same as front page */
    margin: 30px auto 20px auto; /* CRITICAL MATCH - same as front page */
    min-height: 70vh; /* CRITICAL MATCH - same as front page */
    perspective: 1000px; /* Re-added for 3D card flips within the board */
    position: relative; /* Enable absolute positioning for overlay */
    box-sizing: border-box; /* Ensure padding is included in width calculations */
    order: 1; /* Ensure proper flex ordering */
}

/* Top row containing free cells and foundations */
.top-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    gap: 25px; /* Increased to better fill the board */
}

#free-cells {
    display: flex;
    gap: 8px; /* Increased for better spacing */
    justify-content: flex-start;
}

.cell-label {
    color: white;
    font-size: 10px;
    font-weight: bold;
    pointer-events: none;
    text-align: center;
    line-height: 1.1;
    z-index: 10;
    position: relative;
    display: block;
    width: 100%;
    white-space: pre-line;
}

/* Hide the label when the free cell has a card - handled in JavaScript */
.free-cell.has-card .cell-label {
    display: none;
}

#foundation-piles {
    display: flex;
    gap: 8px; /* Increased for better spacing */
    justify-content: flex-end;
}

#tableau {
    display: flex;
    gap: 2px; /* Slightly increased for better visual separation */
    justify-content: center; /* Center the tableau columns */
    align-items: flex-start;
    width: 100%;
}

/* Card Placeholders */
.card-placeholder {
    width: 62px; /* Increased to better fill the board */
    height: 88px; /* Increased to better fill the board */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px; /* Increased font size */
    color: #cccccc;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
    position: relative;
    transition: box-shadow 0.3s ease;
}

.card-placeholder.hint,
.card.hint {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: hint-pulse 1.5s infinite;
}

@keyframes hint-pulse {
    0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.8); }
    50% { box-shadow: 0 0 25px rgba(255, 215, 0, 1); }
    100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.8); }
}

.free-cell {
    background-color: rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
    position: relative;
}

.foundation {
    background-color: rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
    position: relative;
}

.foundation::before {
    color: rgba(255, 255, 255, 0.25);
    font-size: 40px; /* Match Solitaire's large suit icons */
    font-weight: bold;
    line-height: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.foundation[data-suit="hearts"]::before {
    content: "♥";
    color: #D90000; /* Match Solitaire's bright red */
}

.foundation[data-suit="diamonds"]::before {
    content: "♦";
    color: #D90000; /* Match Solitaire's bright red */
}

.foundation[data-suit="clubs"]::before {
    content: "♣";
    color: #333; /* Match Solitaire's dark gray/black */
}

.foundation[data-suit="spades"]::before {
    content: "♠";
    color: #333; /* Match Solitaire's dark gray/black */
}

/* Tableau Columns */
.tableau-column {
    width: 62px; /* Increased to match larger cards */
    min-height: 400px; /* Keep same height */
    position: relative;
}

/* Tableau empty placeholder element */
.tableau-empty-placeholder {
    width: 62px; /* Increased to match larger cards */
    height: 88px; /* Increased to match larger cards */
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
}

/* Hover effect for empty tableau placeholder */
.tableau-empty-placeholder:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.2), 0 0 5px rgba(255, 255, 255, 0.1);
}

/* Tableau Card Stacking - positioning handled in JS */

/* Card Styles */
.card {
    width: 62px; /* Increased to better fill the board */
    height: 88px; /* Increased to better fill the board */
    position: absolute;
    box-sizing: border-box;
    font-size: 12px; /* Increased font size for better readability */
    font-weight: bold;
    user-select: none;
    cursor: grab;
    transition: none !important;
    transform-style: preserve-3d;
}

/* Drag and Drop Styles */
.card.selected {
    transform: translateY(-8px);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    z-index: 40 !important; /* Override normal z-index when selected */
}

.card.sequence-selected {
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    z-index: 35 !important; /* Higher than normal but lower than primary selected */
    transform: translateY(-4px); /* Slight lift to show it's part of selection */
    position: relative;
}

/* Add a vertical connector line between cards in a sequence */
.card.sequence-selected::before {
    content: "";
    position: absolute;
    width: 2px;
    background-color: rgba(255, 215, 0, 0.6);
    height: 20px; /* Connects to the next card */
    top: -20px; /* Position above the card */
    left: 50%;
    transform: translateX(-50%);
    z-index: 34;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.is-face-down .card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 6px;
    border: 1px solid #333;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3px;
}

.card-front {
    background-color: white;
    z-index: 2;
}

.card-back {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1e3a8a 100%);
    transform: rotateY(180deg);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Card rank and suit positioning */
.card-rank-suit {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.card-rank-suit.top {
    align-self: flex-start;
}

.card-rank-suit.bottom {
    align-self: flex-end;
    transform: rotate(180deg);
}

.card-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.card-center .suit-large {
    font-size: 24px;
}

.rank {
    font-size: 12px;
    font-weight: bold;
}

.suit {
    font-size: 10px;
}

.card-back {
    background-color: #1a5f2e; /* Solid color for card back */
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card.red {
    color: #d00;
}

.card.black {
    color: #000;
}

.card .rank {
    position: absolute; 
    top: 3px;
    left: 4px;
    font-size: 16px;
    font-weight: bold;
}

.card .suit {
    position: absolute; 
    bottom: 3px;
    right: 4px;
    font-size: 26px; 
}

/* Top right suit icon */
.card .suit-top-right {
    position: absolute;
    top: 3px;
    right: 4px;
    font-size: 16px;
}

.card.red .card-front {
    color: red;
}

.card.black .card-front {
    color: black;
}

/* Additional styling for the drag over effect */
.valid-drop-target {
    outline: 2px solid #4caf50;
    box-shadow: 0 0 10px #4caf50;
}

.tableau-column.valid-drop-target::before, 
.free-cell.valid-drop-target::before,
.foundation.valid-drop-target::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
    animation: drop-pulse 1.5s infinite;
}

/* Style for indicating a valid drop target */
.drop-target-highlight {
    border: 2px dashed #33FF33 !important; /* Bright green dashed border */
    box-shadow: 0 0 8px rgba(51, 255, 51, 0.7), inset 0 0 8px rgba(51, 255, 51, 0.5); /* Green glow */
}

@keyframes drop-pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Rules Section */
#rules-section {
    background-color: transparent !important;
    color: #e0e0e0;
    padding: 25px 30px;
    margin: 40px auto;
    width: 90%;
    max-width: 750px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Add rules-container class to match the rules section styling */
.rules-container {
    background-color: transparent !important;
    color: #e0e0e0;
    padding: 25px 30px;
    margin: 40px auto;
    width: 90%;
    max-width: 750px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#rules-section h2, #rules-section h3, #rules-section h4 {
    color: #a3d9a5;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

/* Add heading styles for rules-container class */
.rules-container h2, .rules-container h3, .rules-container h4 {
    color: #a3d9a5;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

#rules-section h2 {
    text-align: center;
    margin-top: 0;
    font-size: 1.8em;
}

.rules-container h2 {
    text-align: center;
    margin-top: 0;
    font-size: 1.8em;
}

#rules-section h3 {
    font-size: 1.4em;
}

.rules-container h3 {
    font-size: 1.4em;
}

#rules-section h4 {
    font-size: 1.1em;
}

.rules-container h4 {
    font-size: 1.1em;
}

#rules-section ul {
    padding-left: 25px;
}

.rules-container ul {
    padding-left: 25px;
}

#rules-section ul ul {
    padding-left: 25px;
}

.rules-container ul ul {
    padding-left: 25px;
}

#rules-section li, #rules-section p {
    margin-bottom: 0.6em;
    line-height: 1.6;
}

.rules-container li, .rules-container p {
    margin-bottom: 0.6em;
    line-height: 1.6;
}

#rules-section strong {
    color: #f5f5f5;
    font-weight: 600;
}

.rules-container strong {
    color: #f5f5f5;
    font-weight: 600;
}

#rules-section a {
    color: #FFD700;
    text-decoration: none;
}

.rules-container a {
    color: #FFD700;
    text-decoration: none;
}

#rules-section a:hover {
    text-decoration: underline;
}

.rules-container a:hover {
    text-decoration: underline;
}

/* Modal Styles */
#confirmation-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

#confirmation-modal.modal-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: #fefefe;
    padding: 25px 35px;
    border: 1px solid #888;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    width: auto;
    max-width: 400px;
    min-width: 280px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#confirmation-modal.modal-visible .modal-content {
    transform: scale(1);
}

#modal-message {
    font-size: 1.1em;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-buttons button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    margin: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.modal-buttons button:hover {
    background-color: #45a049;
}

.modal-buttons button#modal-cancel-button {
    background-color: #f44336;
}

.modal-buttons button#modal-cancel-button:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.win-modal-button {
    display: none;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: white;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin: 5px 10px !important;
}

.win-modal-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

#modal-new-game-button.win-modal-button {
    background-color: #007bff;
}

#modal-restart-game-button.win-modal-button {
    background-color: #28a745;
}

/* Pause Overlay */
#pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    border-radius: 12px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    pointer-events: none;
}

#pause-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

#pause-overlay h2 {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

#resume-button-overlay {
    padding: 8px 18px;
    font-size: 1em;
    color: white;
    background-color: #4CAF50;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.2s ease;
}

#resume-button-overlay:hover {
    background-color: #45a049;
}

/* Responsive Styles */
@media (max-width: 519px) {
    html, body {
        padding-top: 5px;
    }

    body {
        padding-left: 0;
        padding-right: 0;
    }

    #page-menu a {
        font-size: 0.8em;
        margin: 0 5px;
    }

    #board-game-info {
        font-size: 0.8em;
        top: 5px;
        left: 10px;
        right: 10px;
    }

    .board-info-left {
        gap: 15px;
    }

    .board-info-left span {
        font-size: 0.9em;
    }

    .board-button {
        font-size: 0.75em;
        padding: 3px 6px;
    }

    #game-board-wrapper {
        width: 100%; /* Full width for the scrollable wrapper */
        overflow-x: auto; /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        margin-bottom: 10px;
    }

    #game-board {
        padding: 35px 20px 10px 20px; /* Match Yahtzee's mobile padding exactly */
        gap: 10px; /* Match Yahtzee's gap */
    }
    
    .top-row {
        gap: 6px; /* Reduced gap for mobile */
    }
    
    #free-cells,
    #foundation-piles {
        gap: 6px; /* Reduced gap for mobile */
    }
    
    #tableau {
        gap: 2px; /* Very minimal gap for 8 columns on mobile */
    }
    
    .card-placeholder {
        width: 53px; /* Match Solitaire mobile card width */
        height: 75px; /* Match Solitaire mobile card height */
    }
    
    .card {
        width: 53px; /* Match Solitaire mobile card width */
        height: 75px; /* Match Solitaire mobile card height */
        border-radius: 4px; /* Increased radius for mobile */
    }
    
    .tableau-column {
        width: 53px; /* Match card width */
        min-height: 350px;
    }
    
    /* Update empty tableau placeholder for mobile */
    .tableau-empty-placeholder {
        width: 53px; /* Match mobile card width */
        height: 75px; /* Match mobile card height */
    }
    
    .card-face {
        padding: 1px; /* Reduced padding */
        border-radius: 4px; /* Ensure this matches .card */
    }
    
    .card .rank {
        font-size: 14px; /* Match Solitaire mobile font size */
        top: 1px;
        left: 1px;
    }
    
    .card .suit {
        font-size: 14px; /* Match Solitaire mobile font size */
        bottom: 1px;
        right: 1px;
    }
    
    .card .suit-top-right {
        font-size: 14px; /* Match other suit elements */
        top: 1px;
        right: 1px;
    }
    
    .foundation::before {
        font-size: 24px; /* Reduced font size for foundation placeholders */
    }
}

/* Hide modal when not visible */
.modal-hidden {
    display: none;
}

/* Individual card highlighting when it can receive a drop */
.card.valid-drop-card {
    box-shadow: 0 0 10px 3px rgba(255, 215, 0, 0.5);
    animation: drop-pulse 1.5s infinite;
    z-index: 25 !important; /* Ensure it's above other cards */
}

/* Card counter for sequences */
.sequence-counter {
    position: absolute;
    top: -12px;
    right: -12px;
    background-color: rgba(255, 215, 0, 0.9);
    color: #000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    z-index: 50;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* Drag clone container - used for the element that follows the mouse */
.drag-clone-container {
    position: fixed; 
    pointer-events: none; /* Crucial: Let events pass through to detect drops */
    z-index: 9999; /* Highest z-index */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* Subtle shadow for depth */
    /* background-color: transparent; Default, no need to set if empty */
    /* transition for slide-back is set in JS */
}

/* Drag and drop styles */
.card-drag-source-faded {
    opacity: 0 !important; /* Make original card invisible during drag */
    pointer-events: none !important; /* Prevent interaction with the invisible original */
}

.card-stack-clone {
    pointer-events: none;
    z-index: 1000;
}

/* Card hover effect - only for movable cards */
.card.movable {
    cursor: grab;
}

.card.movable:active {
    cursor: grabbing;
}

.card.movable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 30 !important;
}

/* Specific hover for tableau cards */
.tableau-column .card.movable:hover {
    transform: translateY(-2px);
}

.card:not(.movable):hover {
    cursor: default;
}

/* --- Ad Container Styles (updated for flex layout) --- */
.game-board-flex-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    gap: 32px;
}
.side-ad-container {
    width: 160px;
    min-width: 160px; /* Ensure minimum width for AdSense */
    max-width: 20vw;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    visibility: visible; /* Ensure containers are visible */
    position: relative; /* Add positioning context */
}
.side-ad-left {
    /* Left ad specific styles if needed */
    order: 0;
}
.side-ad-right {
    /* Right ad specific styles if needed */
    order: 2;
}
.ad-label {
    width: 100%;
    text-align: center;
    font-size: 12px;
    font-weight: normal;
    color: #999;
    margin-bottom: 6px;
    letter-spacing: 1px;
}
.ad-banner {
    width: 100%;
    min-width: 160px; /* Ensure minimum width for AdSense */
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Add positioning context */
}
.ad-banner .adsbygoogle {
    width: 160px !important; /* Set explicit width instead of 100% */
    min-width: 160px !important;
    min-height: 250px !important; /* Add minimum height */
    display: block !important;
    visibility: visible !important; /* Ensure visibility */
}
.ad-placeholder {
    width: 100%;
    height: 250px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
}
@media (max-width: 1100px) {
    .side-ad-container {
        display: none;
    }
    .game-board-flex-row {
        max-width: 100%;
        gap: 0;
    }
} 