* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #fff;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.boxContainer {
    padding-top: 2rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    width: 100%;
    gap: 1rem;
}

.box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.boxContainer > #box1 {
    background: rgba(147, 112, 219, 0.7);
}

.boxContainer > #box2 {
    background: rgba(105, 105, 105, 0.7);
}

.boxContainer > #box3 {
    background: rgba(179, 27, 27, 0.7);
}

.box > h3, .box > h2 {
    padding: 5px;
}

.box > h2 {
    font-size: 2rem;
}

.hand {
    position: relative;
    top: 4rem;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.players-choice-display, .computer-choice-display {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

.vs {
    color: #ffcc00;
    margin: 0 1.5rem;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.players-choice-display > img, .computer-choice-display > img {
    padding-top: 1rem;
    width: 100px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Animation for choice display */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}

.bounce {
    animation: bounce 1s;
}

.result {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: 120px;
    width: 100%;
}

.answer {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.win {
    background: rgba(0, 128, 0, 0.3);
    color: #8aff8a;
}

.lose {
    background: rgba(255, 0, 0, 0.3);
    color: #ff8a8a;
}

.tie {
    background: rgba(128, 128, 128, 0.3);
    color: #ddd;
}

.option {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 3rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.option > * > h4 {
    display: flex;
    justify-content: center;
    width: 100%;
    align-items: center;
    margin-top: 10px;
    font-size: 1.1rem;
}

.option > .hoverImg {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 25%;
    align-items: center;
    border-radius: 15px;
    margin-top: 2rem;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.option > .hoverImg:hover {
    cursor: pointer;
    transform: translateY(-7px);
    border: 2px solid rgba(255, 204, 0, 0.8);
    background: rgba(255, 255, 255, 0.2);
}

.option > .hoverImg:active {
    transform: translateY(0);
}

.option > .hoverImg > img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.otherOption {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    margin-top: 19rem;
    width: 100%;
    height: 100%;
    gap: 30px;
    flex-wrap: wrap;
}

.btn-other {
    padding: 10px 20px;
    background: rgba(255, 204, 0, 0.4);
    border: none;
    border-radius: 7px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.otherOption > .btn-other:hover {
    background: rgba(255, 204, 0, 0.7);
    transform: translateY(-3px);
}

.otherOption > .btn-other:active {
    transform: translateY(0);
}

.hidden {
    display: none;
}

.blurBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1;
}

.modal {
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: rgba(25, 25, 25, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    width: 80%;
    max-width: 600px;
    position: relative;
    color: white;
    max-height: 80vh;
    overflow-y: auto;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #ffcc00;
}

#modal-title {
    margin-bottom: 20px;
    color: #ffcc00;
    text-align: center;
}

#modal-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.history-table th, .history-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table th {
    background-color: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
}

.history-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Stats Display */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.stat-label {
    font-weight: bold;
    color: #aaa;
}

.stat-value {
    font-weight: bold;
    color: #ffcc00;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    .hand {
        flex-direction: column;
        gap: 1rem;
    }

    .vs {
        margin: 1rem 0;
    }

    .option {
        flex-direction: column;
        gap: 1rem;
    }

    .option > .hoverImg {
        width: 80%;
    }

    .otherOption {
        margin-top: 30rem;
        flex-direction: column;
    }

    .result {
        padding-top: 200px;
    }
}




.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.history-table th, .history-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table th {
    background-color: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
}

.history-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.history-table th, .history-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table th {
    background-color: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
}

.history-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
