body {
    background-image: url("casino-pattern.jpg");
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    text-align: center;
    margin: 0;
    padding: 2rem 1rem 4rem;
    color: #14210f;
}

#page {
    max-width: 62rem;
    margin: 0 auto;
}

.back {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
}

.back:hover {
    background-color: #000;
}

h1 {
    margin: 0 0 0.75rem;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.intro {
    max-width: 40rem;
    margin: 0 auto 2rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.55);
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
}

#dice {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    min-height: 90px;
    margin-bottom: 1.25rem;
}

#dice span {
    display: inline-block;
    cursor: pointer;
}

#dice img {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease-in-out;
}

#dice span:hover img {
    transform: translateY(-3px);
}

#button {
    background-color: #111;
    border: none;
    outline: none;
    color: #fff;
    padding: 12px 32px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

#button:hover:enabled {
    background-color: #2f4f2f;
}

#button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#tables {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1.25rem;
    margin: 0 auto;
}

table {
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    font-size: 0.85rem;
}

th {
    background-color: #14210f;
    color: #fff;
    font-weight: 600;
}

td, th {
    border: 1px solid rgba(0, 0, 0, 0.25);
    padding: 0.35rem 0.7rem;
}

td.name {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

td.rule {
    text-align: left;
    font-size: 0.78rem;
    color: #555;
    white-space: nowrap;
}

tbody td:nth-child(3),
tbody td:nth-child(4) {
    min-width: 5rem;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

tbody tr:not(.sum) td:nth-child(3):hover,
tbody tr:not(.sum) td:nth-child(4):hover {
    background-color: #ffe9a8;
}

tr.sum td {
    background-color: #eceee9;
    font-weight: 600;
}

tr.grand td {
    background-color: #14210f;
    color: #fff;
}

.reset {
    margin-top: 2rem;
}

.reset a {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    text-decoration: none;
}

.reset a:hover {
    background-color: #000;
}
