body {
    font-family: Arial, sans-serif;
    color: #000;
}

h3 {
    display: block;
    font-size: 1.17em;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

.monopoly-step-label {
    font-size: 28px;
    font-weight: bold;
    margin-top: 20px;
}

.monopoly-info-label {
    margin: 10px 0 20px;
    font-size: 16px;
    color: #323232;
    font-weight: bold;
    line-height: 22px;
}

.monopoly-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    text-align: center;
    color-scheme: light;
}

.monopoly-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
}

.monopoly-cell {
    background-color: #fff5eb;
    aspect-ratio: 1/1;
    position: relative;
    border-radius: 10px;
    color: #000;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    overflow: hidden;
    border: 1.5px solid #000;
    padding: 10px;
}

.monopoly-cell[data-index="0"] {
    background-color: #f39b3a;
    color: #333;
    border: none;
}

.monopoly-highlight {
    background-color: #fdea4a !important;
}

.monopoly-land-animate {
    animation: monopoly-landAnim 0.4s ease-in-out;
}

@keyframes monopoly-landAnim {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.monopoly-dice {
    width: 60px;
    height: 60px;
    background-color: #fff;
    border: 1.5px solid #000;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
    cursor: pointer;
    margin: 10px auto;
    position: relative;
    z-index: 5;
    transition: transform 0.1s ease;
}

.monopoly-dice:hover {
    animation: monopoly-hoverShake 0.4s ease;
}

@keyframes monopoly-hoverShake {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(2px, -2px);
    }

    50% {
        transform: translate(-2px, 2px);
    }

    75% {
        transform: translate(2px, 2px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.monopoly-shake {
    animation: monopoly-shakeScale 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}

@keyframes monopoly-shakeScale {
    0% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(2px, -2px) scale(1.1);
    }

    50% {
        transform: translate(-2px, 2px) scale(1);
    }

    75% {
        transform: translate(2px, 2px) scale(1.05);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.monopoly-dice-dot {
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    place-self: center;
}

.monopoly-token {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.monopoly-token img {
    width: 80px;
    height: 80px;
}

.formalfixed {
    position: relative;
}

.monopoly-popup {
    position: absolute;
    top: 280px;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    display: none;
    z-index: 100;
    max-width: 90vw;
    background: transparent;
    padding: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.monopoly-show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.monopoly-popup-close-btn {
    position: absolute;
    top: 5px;
    right: -13px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    transition: transform 0.4s;
}

.monopoly-popup-close-btn:hover {
    transform: rotate(180deg) scale(1.1);
}

.monopoly-popup-close-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.monopoly-simple-popup-content {
    width: 420px;
    background-color: #fdea4a;
    border-radius: 8px;
    border: 3px solid #000;
    padding: 20px;
    text-align: center;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0px 8px 0px -1px rgba(0, 0, 0, 0.251);
    margin-top: 20px;
}

.monopoly-simple-popup-content img {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
}

.monopoly-card-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 20px;
    padding-bottom: 20px;
    width: 100%;
    position: relative;
}

.monopoly-card {
    width: 190px;
    height: 250px;
    perspective: 600px;
    position: relative;
}

.monopoly-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.monopoly-flipped .monopoly-card-inner {
    transform: rotateY(180deg);
}

.monopoly-card-front,
.monopoly-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 8px 0px -1px rgba(0, 0, 0, 0.251);
    border: 3px solid #000;
}

.monopoly-card-back.monopoly-fate {
    background-color: #fdea4a;
    color: #d7000f;
}

.monopoly-card-back.monopoly-opportunity {
    background-color: #d7000f;
    color: #fff;
}

.monopoly-card-front {
    background-color: #fdea4a;
    color: #000;
    transform: rotateY(180deg);
    padding: 12px;
    font-size: 18px;
    text-align: center;
    flex-direction: column;
}

.monopoly-card-back img,
.monopoly-card-front img {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
}

.monopoly-fate-title,
.monopoly-opportunity-title {
    color: #d7000f;
    font-weight: bold;
    font-size: 18px;
}

.monopoly-card-front-content {
    font-size: 18px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.monopoly-disabled {
    pointer-events: none;
}

@media (max-width: 568px) {
    .monopoly-card {
        width: 140px;
        height: 190px;
    }

    .monopoly-card-back img,
    .monopoly-card-front img,
    .monopoly-cell img {
        width: 50px !important;
        height: 50px !important;
    }

    .monopoly-cell {
        font-size: 16px !important;
    }

    .monopoly-card-front-content {
        font-size: 14px !important;
    }

    .monopoly-fate-title,
    .monopoly-opportunity-title {
        font-size: 16px !important;
    }

    .monopoly-simple-popup-content {
        width: 300px;
        font-size: 14px !important;
    }

    .monopoly-simple-popup-content img {
        width: 40px !important;
        height: 40px !important;
    }

    .monopoly-popup-close-btn {
        width: 28px;
        height: 28px;
    }

    .monopoly-popup {
        top: 165px;
    }

    .monopoly-info-label {
        font-size: 12px;
        color: #323232;
        font-weight: bold;
        line-height: 16px;
    }
}