body {
    background-image: url("../assets/combinAce-background.png");
}

#hand-cards {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    overflow-x: auto;
    z-index: 10;
}

#combination {
    display: flex;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    padding: 20px 10px;
    border-radius: 15px;
    background-color: black;
    box-shadow: 0px 0px 100px rgb(159, 159, 0);
}
#combination .cardd {
    margin: 0 5px !important;
    float: left;
}
#card-pile {
    position: absolute;
    width: 120px;
    height: 160px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}
#draw-buttons {
    position: absolute;
    width: 180px;
    height: 280px;
    top: 40%;
    left: calc(50% + 200px);
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#hand-cards .cardd {
    margin-left: -57px;
}

.cardd {
    position: relative;
    width: 89px;
    height: 133px;
    min-width: 89px;
    min-height: 133px;
    background-color: white;
    border: 2px black solid;
    border-radius: 5px;
    /*box-shadow: 0px 0px 12px #000;*/
    user-select: none;
    transition: transform 0.3s ease;
}
.card:hover {
    transform: perspective(1000px) rotateY(10deg);
}
#hand-cards .cardd:first-child {
    margin-left: 0;
}

.cardd.card-A, .cardd.card-JOKER {
    animation: card-rainbow 5s infinite;
}
@keyframes card-rainbow {
    0% { box-shadow: 0px 0px 12px red; border: 2px rgb(255, 0, 0) solid; }
    16.66% { box-shadow: 0px 0px 12px rgb(0, 255, 145); border: 2px rgb(0, 255, 145) solid; }
    33.33% { box-shadow: 0px 0px 12px yellow; border: 2px rgb(255, 255, 0) solid; }
    50% { box-shadow: 0px 0px 12px rgb(0, 255, 0); border: 2px rgb(0, 255, 0) solid; }
    66.66% { box-shadow: 0px 0px 12px blue; border: 2px rgb(0, 0, 255) solid; }
    83.33% { box-shadow: 0px 0px 12px rgb(0, 255, 247); border: 2px rgb(0, 255, 247) solid; }
    100% { box-shadow: 0px 0px 12px rgb(255, 0, 255); border: 2px rgb(255, 0, 255) solid; }
}

.card-icon {
    font-size: 25px;
    font-weight: bold;
    position: absolute;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
}
.card-icon-hearts, .card-icon-diamonds {
    color: red;
}
.card-icon-spades, .card-icon-clover {
    color: black;
}

.card-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66px;
    height: 33px;
    font-size: 33px;
    line-height: 33px;
    text-align: center;
}
.card-value-small {
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    width: 30px;
    line-height: 30px;
    text-align: center;
    top: 30px;
}
.card-value-small.card-value-JOKER {
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    top: 0;
}

.card-value-hearts, .card-value-diamonds {
    color: red;
}
.card-value-spades, .card-value-clover {
    color: black;
}
.card-value-JOKER, .card-value-A, .cardd.card-A .card-icon {
    font-weight: bold;
    animation: rainbow 5s infinite;
}

.card-value-JOKER {
    width: 80px;
    font-size: 22px;
}
@keyframes rainbow {
    0% { color: rgb(255, 0, 0); }
    16.66% { color: rgb(0, 255, 145); }
    33.33% { color: rgb(255, 255, 0); }
    50% { color: rgb(0, 255, 0); }
    66.66% { color: rgb(0, 0, 255); }
    83.33% { color: rgb(0, 255, 247); }
    100% { color: rgb(255, 0, 255); }
}

.top-left {
    top: 0;
    left: 0;
}
  
.bottom-right {
    bottom: 0;
    right: 0;
}

#lucky-number-container {
    position: absolute;
    top: 40%;
    left: calc(50% - 150px);
    width: 300px;
    text-align: center;
    z-index: 9;
}

#lucky-number {
    font-size: 21px;
    font-weight: bold;
    animation: rainbow 10s infinite;
    text-align: center;
}
#lucky-number-label {
    font-size: 21px;
    font-weight: bold;
    margin-right: auto;
}

#play-combination-btn {
    position: absolute;
    bottom: 140px;
    padding: 10px 20px;
    left: calc(50% - 80px);
    z-index: 12;
    box-shadow: 0px 0px 30px rgb(159, 159, 0);
    background-color: black;
    color: white;
    font-weight: bold;
    border: 4px solid rgb(159, 159, 0);
}

#menu {
    position: absolute;
    top: 0;
    left: 0;
    height: 10%;
    width: 100%;
    min-width: 420px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 20;
    border-bottom: 1px white solid;
}
#player-turn {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    color: white;
    z-index: 10;
}

#rules-object-container {
    position: absolute;
    left: 100%;
    width: 800px;
    height: 500px;
    z-index: 10;
    padding: 20px;
    background-color: grey;
}
#rules-object {
    width: 100%;
    height: 100%;
}

#bord {
    position: absolute;
    width: 100%;
    height: 90%;
    min-width: 920px;
    min-height: 400px;
    top: 10%;
}

#show-rules {
    margin-left: 10px;
}

#bot1 {
    position: absolute;
    left: 0;
    top: 70%;
    transform-origin: left top;
    transform: rotate(-90deg);
}
#bot2 {
    position: absolute;
    right: 0;
    top: 70%;
    transform-origin: right top;
    transform: rotate(-270deg);
}
#hand-cards-bot1, #hand-cards-bot2 {
    display: flex;
    align-items: flex-end;
}
#hand-cards-bot1 .cardd, #hand-cards-bot2 .cardd {
    width: 60px;
    min-width: 60px;
    height: 90px;
    min-height: 90px;
    margin-left: -40px;
}
#bot1 #name-bot1, #bot2 #name-bot2 {
    display: inline-block;
    font-weight: bold;
    transform-origin: right center;
    transform: rotate(180deg);
}

#endgame-div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: white;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}
#endgame-div #endgame-text {
    font-size: 30px;
    font-weight: bold;
}

#sortBtnsDiv {
    display: flex;
    justify-content: center;
    gap: 10px;
    position: absolute;
    bottom: 0;
    margin-left: calc(50% - 100px);
    z-index: 10;
}

#sortBtnsDiv button {
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border: 4px solid black;
    background-color: #333;
    color: white;
    opacity: 0.9;
    cursor: pointer;
}