:root {
    /* Otras propiedades */
    --puzzle-bg-color: #f0f0f0;
    --puzzle-border-color: #333;
    --puzzle-piece-border-color: #ccc;
    --text-color-light: #efefef;
    --text-color-dark: #555;
    --text-color-medium: #ccc;
    --accent-color-primary: #007bff;
    --accent-color-danger: #d9534f;
    --border-color-dark-theme: #444;
    --border-color-dark-theme-light: #555;
    --modal-bg-color: rgba(0, 0, 0, 0.8);
    --box-shadow-selected: 0 0 0 3px var(--accent-color-primary) inset;
}
#puzzle-wrapper {
    /* Modelo de caja */
    display: flex;
    /* Flexbox y Grid */
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    /* Márgenes */
    margin: 20px auto;
}
#puzzle-container {
    /* Modelo de caja */
    display: flex;
    /* Flexbox y Grid */
    flex-wrap: wrap;
    /* Bordes */
    border: 2px solid var(--puzzle-border-color);
    /* Fondos */
    background-color: var(--puzzle-bg-color);
}
.puzzle-piece {
    /* Modelo de caja */
    box-sizing: border-box;
    /* Bordes */
    border: 1px solid var(--puzzle-piece-border-color);
    /* Transiciones y animaciones */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, filter 0.2s;
    /* Interactividad */
    cursor: pointer;
}
.puzzle-piece.selected {
    /* Colores y efectos */
    box-shadow: var(--box-shadow-selected);
    /* Otras propiedades */
    transform: scale(0.95);
    filter: brightness(1.1);
}
#puzzle-container.solved .puzzle-piece {
    /* Bordes */
    border: none;
    /* Interactividad */
    cursor: default;
}
#reference-container {
    /* Dimensiones */
    width: 250px;
    min-width: 200px;
    /* Tipografía */
    text-align: center;
}
#game-stats-top {
    /* Modelo de caja */
    display: flex;
    /* Flexbox y Grid */
    justify-content: center;
    gap: 40px;
    /* Márgenes */
    margin-bottom: 15px;
    /* Tipografía */
    text-align: center;
}
.stat-item {
    /* Tipografía */
    text-align: center;
}
.stat-item h4 {
    /* Márgenes */
    margin: 0 0 5px 0;
    /* Tipografía */
    font-size: 1em;
    font-weight: normal;
    /* Colores y efectos */
    color: var(--text-color-dark);
}
#timer-display,
#moves-display {
    /* Tipografía */
    font-size: 1.8em;
    font-weight: bold;
    line-height: 1;
    /* Colores y efectos */
    color: var(--accent-color-danger);
}
#highscore-wrapper {
    /* Márgenes */
    margin-top: 20px;
}
#floating-timer {
    /* Posicionamiento */
    position: fixed;
    z-index: 1001;
    /* Modelo de caja */
    display: none;
    /* Relleno */
    padding: 4px 8px;
    /* Bordes */
    border: 1px solid #fff;
    border-radius: 4px;
    /* Fondos */
    background-color: rgba(0, 0, 0, 0.75);
    /* Tipografía */
    font-size: 1.1em;
    font-weight: bold;
    /* Colores y efectos */
    color: #fff;
    /* Interactividad */
    pointer-events: none;
}
.puzzle-modal-overlay {
    /* Posicionamiento */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    /* Modelo de caja */
    display: flex;
    /* Flexbox y Grid */
    justify-content: center;
    align-items: center;
    /* Dimensiones */
    width: 100%;
    height: 100%;
    /* Fondos */
    background-color: var(--modal-bg-color);
    /* Colores y efectos */
    opacity: 0;
    /* Transiciones y animaciones */
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    /* Otras propiedades */
    visibility: hidden;
}
.puzzle-modal-overlay.show {
    /* Colores y efectos */
    opacity: 1;
    /* Otras propiedades */
    visibility: visible;
    transition-delay: 0s;
}
.puzzle-modal-content {
    /* Modelo de caja */
    display: block;
    /* Dimensiones */
    max-width: 800px;
    max-height: 85vh;
    /* Márgenes */
    margin: auto;
    /* Bordes */
    border: 3px solid #fff;
    /* Transiciones y animaciones */
    transition: transform 0.3s ease;
    /* Otras propiedades */
    transform: scale(0.9);
}
.puzzle-modal-overlay.show .puzzle-modal-content {
    /* Otras propiedades */
    transform: scale(1);
}
.puzzle-modal-close {
    /* Posicionamiento */
    position: absolute;
    top: 15px;
    right: 35px;
    /* Tipografía */
    font-size: 40px;
    font-weight: bold;
    /* Colores y efectos */
    color: #f1f1f1;
    /* Transiciones y animaciones */
    transition: 0.3s;
    /* Interactividad */
    cursor: pointer;
}
.puzzle-modal-close:hover,
.puzzle-modal-close:focus {
    /* Tipografía */
    text-decoration: none;
    /* Colores y efectos */
    color: #bbb;
}
.highscore-title {
    /* Márgenes */
    margin-top: 0;
    margin-bottom: 10px;
    /* Relleno */
    padding-bottom: 5px;
    /* Bordes */
    border-bottom: 1px solid var(--border-color-dark-theme);
    /* Tipografía */
    font-size: 1.2em;
    /* Colores y efectos */
    color: var(--text-color-light);
}
.highscore-table {
    /* Dimensiones */
    width: 100%;
    /* Otras propiedades */
    border-collapse: collapse;
}
.highscore-table th,
.highscore-table td {
    /* Relleno */
    padding: 8px;
    /* Bordes */
    border-bottom: 1px solid var(--puzzle-border-color);
    /* Tipografía */
    text-align: left;
    /* Colores y efectos */
    color: var(--text-color-medium);
}
.highscore-table th {
    /* Tipografía */
    font-weight: bold;
    /* Colores y efectos */
    color: #fff;
}
.highscore-table .rank-col {
    /* Dimensiones */
    width: 1%;
    /* Tipografía */
    text-align: center;
    font-weight: bold;
}
.highscore-thumb {
    /* Dimensiones */
    height: 20px;
    width: 20px;
    /* Márgenes */
    margin-right: 8px;
    /* Bordes */
    border-radius: 3px;
    border: 1px solid var(--border-color-dark-theme-light);
    /* Otras propiedades */
    object-fit: cover;
    vertical-align: middle;
}
.puzzle-thumb {
    /* Dimensiones */
    max-width: 100%;
    height: auto;
    /* Transiciones y animaciones */
    transition: transform 0.2s ease-in-out;
}
.puzzle-thumb:hover {
    /* Otras propiedades */
    transform: scale(1.05);
}
.puzzle-panel-layout {
    /* Dimensiones */
    width: 100%;
    height: 210px;
    /* Otras propiedades */
    border-spacing: 0;
}
.puzzle-column-left {
    /* Dimensiones */
    width: 50%;
    /* Relleno */
    padding-right: 10px;
    /* Tipografía */
    text-align: center;
    /* Colores y efectos */
    color: var(--text-color-light);
    /* Otras propiedades */
    vertical-align: top;
}
.puzzle-column-right {
    /* Dimensiones */
    width: 50%;
    /* Relleno */
    padding-left: 10px;
    /* Bordes */
    border-left: 1px solid var(--border-color-dark-theme-light);
    /* Colores y efectos */
    color: var(--text-color-light);
    /* Otras propiedades */
    vertical-align: top;
}
.highscore-info {
    /* Márgenes */
    margin-top: 8px;
    /* Tipografía */
    text-align: center;
    font-size: 11px;
    /* Colores y efectos */
    color: var(--text-color-medium);
}
.puzzle-panel-layout .highscore-title {
    /* Márgenes */
    margin-bottom: 5px;
    /* Relleno */
    padding-bottom: 3px;
    /* Tipografía */
    font-size: 1.1em;
}
.puzzle-panel-layout .highscore-table th,
.puzzle-panel-layout .highscore-table td {
    /* Relleno */
    padding-top: 0;
    padding-bottom: 0;
}
.puzzle-panel-layout .highscore-table tbody tr:hover {
    /* Fondos */
    background-color: rgba(255, 255, 255, 0.1);
    /* Interactividad */
    cursor: default;
}
.puzzle-panel-layout .highscore-table a:hover .highscore-thumb {
    /* Colores y efectos */
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
    /* Otras propiedades */
    transform: scale(1.2);
}
.puzzle-preview-thumb {
    /* Modelo de caja */
    display: block;
    /* Dimensiones */
    width: 100%;
    height: 150px;
    /* Transiciones y animaciones */
    transition: opacity 0.5s ease-in-out;
    /* Otras propiedades */
    object-fit: cover;
}
.puzzle-preview-thumb.fading {
    /* Colores y efectos */
    opacity: 0;
}
.pre-game-wrapper {
    /* Dimensiones */
    width: 400px;
    max-width: 100%;
}
.pre-game-preview {
    /* Tipografía */
    text-align: center;
}
.pre-game-preview-img {
    /* Dimensiones */
    width: 120px;
    height: auto;
    /* Relleno */
    padding: 2px;
    /* Bordes */
    border: 1px solid var(--puzzle-piece-border-color);
}
.form-buttons-cell {
    /* Tipografía */
    text-align: center;
}
.win-message-img {
    /* Modelo de caja */
    display: block;
    /* Dimensiones */
    max-width: 200px;
    /* Márgenes */
    margin: 10px auto;
    /* Relleno */
    padding: 3px;
    /* Bordes */
    border: 2px solid var(--puzzle-piece-border-color);
}
.special-congrats {
    /* Márgenes */
    margin: 15px 0;
    /* Relleno */
    padding: 10px;
    /* Bordes */
    border-radius: 5px;
}
.special-congrats p {
    /* Márgenes */
    margin: 0;
    /* Tipografía */
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
}
#puzzle-container {
    /* Transiciones y animaciones */
    transition: opacity 0.5s ease-in-out;
    /* Otras propiedades */
    -webkit-transition: opacity 0.5s ease-in-out;
    -moz-transition: opacity 0.5s ease-in-out;
    -ms-transition: opacity 0.5s ease-in-out;
    -o-transition: opacity 0.5s ease-in-out;
}
#puzzle-image-link {
    /* Modelo de caja */
    display: inline-block;
    box-sizing: border-box;
    /* Dimensiones */
    width: 150px;
    height: 150px;
    /* Relleno */
    padding: 4px;
    /* Bordes */
    border: 1px solid var(--border-color);
    /* Fondos */
    background: transparent;
}
#puzzle-container.fading {
    /* Colores y efectos */
    opacity: 0;
}
#puzzle-container {
    /* Transiciones y animaciones */
    transition: opacity 0.5s ease-in-out;
}
#puzzle-container.fading {
    /* Colores y efectos */
    opacity: 0;
}
#puzzle-container {
    /* Transiciones y animaciones */
    transition: opacity 0.5s ease-in-out;
}
#puzzle-container.fading {
    /* Colores y efectos */
    opacity: 0;
}
#puzzle-container {
    /* Transiciones y animaciones */
    transition: opacity 0.5s ease-in-out;
}
#puzzle-container.fading {
    /* Colores y efectos */
    opacity: 0;
}
.personal-best-msg {
    /* Bordes */
    border: 1px solid rgba(40, 167, 69, 0.3);
    /* Fondos */
    background-color: rgba(40, 167, 69, 0.1);
    /* Colores y efectos */
    color: #28a745;
    /* Transiciones y animaciones */
    animation: pulse 2s infinite;
}
.new-record-msg {
    /* Bordes */
    border: 1px solid rgba(255, 193, 7, 0.3);
    /* Fondos */
    background-color: rgba(255, 193, 7, 0.1);
    /* Colores y efectos */
    color: #ffc107;
    /* Transiciones y animaciones */
    animation: pulse 2s infinite;
}
.no-record-msg {
    /* Bordes */
    border: 1px solid rgba(220, 53, 69, 0.3);
    /* Fondos */
    background-color: rgba(220, 53, 69, 0.1);
    /* Colores y efectos */
    color: #dc3545;
    /* Transiciones y animaciones */
    animation: pulse 2s infinite;
}
.zielony-text {
    /* Tipografía */
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    /* Colores y efectos */
    color: #2cfc5c;
}
.zolty-text {
    /* Tipografía */
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    /* Colores y efectos */
    color: #ffc107;
}
.czerwony-text {
    /* Tipografía */
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    /* Colores y efectos */
    color: #ff182f;
}
.wait-message {
    /* Márgenes */
    margin-top: 20px;
    /* Tipografía */
    text-align: center;
    font-size: 1em;
    font-style: italic;
    /* Colores y efectos */
    color: var(--text-color-medium);
}
.przycisk-listy-wrapper {
    /* Márgenes */
    margin-top: 10px;
    /* Tipografía */
    text-align: center;
}
.przycisk-listy-wrapper a.button {
    /* Tipografía */
    text-decoration: none !important;
}
.puzzle-list-container {
    /* Modelo de caja */
    display: flex;
    /* Flexbox y Grid */
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    /* Relleno */
    padding: 10px;
}
.puzzle-list-item {
    /* Modelo de caja */
    box-sizing: border-box;
    /* Dimensiones */
    width: 102px;
    /* Relleno */
    padding: 5px;
    /* Bordes */
    border: 1px solid #444;
    border-radius: 5px;
    /* Fondos */
    background-color: rgba(255, 255, 255, 0.05);
    /* Tipografía */
    text-align: center;
    /* Colores y efectos */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Transiciones y animaciones */
    transition: transform 0.2s, box-shadow 0.2s;
}
.puzzle-list-item:hover {
    /* Bordes */
    border-color: #666;
    /* Colores y efectos */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    /* Otras propiedades */
    transform: translateY(-5px);
}
.puzzle-list-item a {
    /* Modelo de caja */
    display: block;
    /* Tipografía */
    text-decoration: none;
    /* Colores y efectos */
    color: #ddd;
}
.puzzle-list-thumbnail {
    /* Dimensiones */
    width: 100%;
    height: 90px;
    /* Márgenes */
    margin-bottom: 5px;
    /* Bordes */
    border-radius: 3px;
    /* Otras propiedades */
    object-fit: cover;
}
.puzzle-list-title {
    /* Modelo de caja */
    display: flex;
    /* Flexbox y Grid */
    align-items: center;
    justify-content: center;
    /* Dimensiones */
    min-height: 40px;
    /* Tipografía */
    font-weight: bold;
    font-size: 12px;
}