* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}
/* Variables from sliding puzzle */
:root {
    /* Z-index hierarchy */
    --z-piece: 10;
    --z-piece-hover: 20;
    --z-piece-highlight: 500;
    --z-piece-dragging: 999;
    --z-piece-locked: 1;
    --z-modal: 1000;

    /* Colors - Matching Solitaire */
    --color-primary: #20314D;
    --color-accent: #84BC35;
    --color-primary-hover: #2c4056;
    --color-accent-hover: #9acc4a;
    --color-play-area: #ecf0f1;
    --color-border: #bdc3c7;
    --color-white: #ffffff;

    /* Spacing */
    --spacing-small: 10px;
    --spacing-medium: 20px;
    --spacing-large: 40px;

    /* Border radius */
    --radius-small: 4px;
    --radius-medium: 8px;
}
img {
    max-width: 100%;
}
.slider-game {
    width: 80%;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    margin-top: 5%;
}
.container {
    display: grid;
    width: 25em;
    height: 25em;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 7.6em;
}
.original-image {
    width: 25em;
    height: 25em;
}
.original-image img {
    height: 91%;
}
.original-image #frnArtCopyrightArticleImage {
    margin-top: 4px;
}
.image-container {
    border: 1px solid #ffffff;
}
.cover-screen {
    position: absolute;
    top: 0;
    left: 0;
    /*background-color: #edb506; */
    background-color: #84bc34;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#start-button {
    font-size: 1.2em;
    padding: 0.8em 2em;
    border: none;
    border-radius: 3em;
    cursor: pointer;
}
#moves {
    text-align: right;
}
.hiden {
    display: none;
}
#background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 999; /* Ensure it appears behind the congratulations overlay */
    display: none; /* Hidden by default */
}

#background-overlay.show {
    display: block; /* Show the overlay when active */
}
.slider-game .original-image {
    margin-left: 0; /* Default margin for mobile and laptop */
}
.neustart-button {
    display: block;
    margin: 20px auto; /* Center the button horizontally */
    background: #84bc34;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}

.neustart-button:hover {
    background-color: #76aa2c;
}
#congratulations {
    border-top: solid 2px #a3db52;
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #21314d;
    padding: 20px;

    text-align: center;
    font-size: 1.5rem;
    z-index: 1000;
    display: none;
    box-shadow: 5px 5px 10px 0px #333;
    -moz-box-shadow: 5px 5px 10px 0px #333;
    -webkit-box-shadow: 5px 5px 10px 0px #333;
}

#congratulations.show {
    display: block;
}
#congratulations .difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 10px; /* Add spacing between buttons */
    margin-top: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}
#congratulations .btn_level {
    background: #84bc34;
    color: #fff;
    padding: 6px 24px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    border: none;
}
#congratulations .btn_level:hover {
    background-color: #76aa2c;
}
.congratulations_cancel {
    cursor: pointer;
    position: absolute;
    top: 0px;
    left: 90%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    margin-top: 20px;
    background: #e3e6e8;
    padding: 5px;
    border-radius: 50%;
    padding-left: 6.5px;
    padding-right: 6.5px;
    padding-top: 0px;
    padding-bottom: 4px;
    color: #21314d;
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
}
/* Control Bar - Green Bar like Solitaire */
.puz-control-bar {
    background-color: var(--color-accent);
    padding: 15px 20px;
    margin-top: var(--spacing-medium);
    margin-bottom: var(--spacing-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-radius: var(--radius-medium);
}
/* Buttons - Matching Solitaire Style */
.puz-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-small);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.puz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.puz-btn-primary {
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-weight: 700;
}

.puz-btn-primary:hover:not(:disabled) {
    background-color: var(--color-accent-hover);
}

.puz-btn-secondary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.puz-btn-secondary:hover:not(:disabled) {
    background-color: var(--color-primary-hover);
}

.game-stats {
    display: flex;
    gap: 30px;
}
.puz-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}
@media only screen and (max-width: 768px) {
    .slider-game {
        flex-direction: column;
    }
    .container {
        width: 20em;
        height: 20em;
        grid-auto-rows: 6em;
    }
    .original-image {
        width: 20em;
        height: 22.73em;
    }
    .original-image img {
        height: 100%;
    }
}
@media (min-width: 1024px) {
    .slider-game .original-image {
        margin-left: 12px; /* Margin for desktop */
    }
}

.image {
    background-size: calc(100% * 3);
}
.image_part_001 {
    background-position: 0% 0%;
}
.image_part_002 {
    background-position: 50% 0%;
}
.image_part_003 {
    background-position: 100% 0%;
}
.image_part_004 {
    background-position: 0% 50%;
}
.image_part_005 {
    background-position: 50% 50%;
}
.image_part_006 {
    background-position: 100% 50%;
}
.image_part_007 {
    background-position: 0% 100%;
}
.image_part_008 {
    background-position: 50% 100%;
}
.image_part_009 {
    background: #fff !important;
}
