:root {
    --dice-color: #5468db;
    --dice-color-dark-1: #4a5cc8;
    --dice-color-dark-2: #4050b5;
    --dice-color-dark-3: #3644a2;
    --dice-color-dark-4: #2c388f;
    --dice-color-dark-5: #222c7c;
    --dice-color-dark-6: #182069;
    --dice-color-dark-7: #0e1456;
    --dice-color-dark-8: #040843;
    --dice-color-dark-9: #000030;
}

.logo {
    font-size: 26px;
    font-weight: bold;
}

.container-fluid.background {
    background-color: #f5f5f5;
    min-height: 730px;
}

.container-fluid.background > .row {
    min-height: 730px;
}

.container-fluid.background .col-lg-6 {
    display: flex;
}

.title-section {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

h1.fw-bold {
    font-size: 2.5rem;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #212529;
}

.ad-header-position {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.ad-position {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.coin-area-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    width: 100%;
}

.control-panel-border {
    border: 3px solid #dee2e6 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
    background-color: #ffffff;
    min-height: 630px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.gx-5 {
    --bs-gutter-x: 3rem;
}

.nav-tabs {
    border-bottom: 3px solid #dee2e6 !important;
    background-color: #f8f9fa;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 4px solid transparent;
    color: #6c757d;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1.25rem 2rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link.active {
    border-bottom: 4px solid #0d6efd;
    color: #0d6efd;
    background-color: #ffffff;
}

.nav-tabs .nav-link:hover {
    border-bottom: 4px solid #0d6efd;
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.tab-content {
    flex: 1;
    overflow-y: auto;
}

.stat-item-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.result-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-display h2 {
    font-weight: 700;
}

.btn-outline-secondary {
    border-width: 2px;
    font-weight: 600;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-label.fw-semibold {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 0.75rem;
}

.form-select,
.form-control {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-select:focus,
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-check-input {
    width: 3rem;
    height: 1.5rem;
    border: 2px solid #dee2e6;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

.content-sections {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 50px;
}

.content-sections section {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.content-sections h4 {
    color: #0d6efd;
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #e9ecef;
}

.content-sections p {
    color: #495057;
    font-size: 1.05rem;
}

.content-sections ul {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-sections ul li {
    margin-bottom: 0.75rem;
    color: #495057;
    font-size: 1.05rem;
}

.sticky-ads {
    position: sticky;
    top: 20px;
}

.sticky-ads .ad-position {
    margin-bottom: 1.5rem;
}

.quick-select {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-select button {
    margin: 0 5px;
    padding: 8px 16px;
    border: 2px solid #5468db;
    background-color: white;
    color: #5468db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 45px;
    font-weight: 600;
}

.quick-select button:hover {
    background-color: #5468db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(84, 104, 219, 0.3);
}

.quick-select input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 2px solid #5468db;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.quick-select input[type="number"]::-webkit-inner-spin-button,
.quick-select input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

.quick-select input[type="number"]:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.roll-button {
    font-size: 1.5rem;
    padding: 15px 60px;
    border-radius: 50px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
    margin: 20px 0;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    cursor: pointer;
}

.roll-button:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.5);
}

.roll-button:active {
    transform: translateY(0) scale(1.02);
}

.d10 {
    position: relative;
    width: 164px;
    height: 164px;
    transform-style: preserve-3d;
    transform: rotateX(-20deg) rotateY(0deg);
    margin: 0 auto;
    cursor: pointer;
}

.dice-container {
    display: grid;
    gap: 15px;
    padding: 20px;
    justify-items: center;
    align-items: center;
    max-width: 750px;
    margin: 0 auto 100px auto;
    perspective: 1000px;
}

.dice-container.multiple {
    grid-template-columns: repeat(4, 1fr);
    min-height: auto;
}

.dice-container.single {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: auto;
    padding: 20px;
    margin-bottom: 120px;
}

.dice-container.single .d10 {
    transform: scale(1.3) rotateX(-20deg) rotateY(0deg);
}

.dice-container.multiple .d10 {
    transform: scale(1.0) rotateX(-20deg) rotateY(0deg);
}

.dice-container:has(.d10:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 450px;
    gap: 20px;
}

.dice-container:has(.d10:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
    gap: 18px;
}

.dice-container:has(.d10:nth-child(4):last-child) {
    grid-template-columns: repeat(4, 1fr);
    max-width: 750px;
    gap: 15px;
}

.dice-container:has(.d10:nth-child(5)) .d10 {
    transform: scale(0.88) rotateX(-20deg) rotateY(0deg);
}

.dice-container:has(.d10:nth-child(9)) .d10 {
    transform: scale(0.75) rotateX(-20deg) rotateY(0deg);
}

@media (max-width: 767px) {
    .dice-container {
        padding: 3px;
        gap: 2px;
        margin: 0;
    }

    .dice-container.multiple {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    .d10 {
        transform-origin: center center;
        width: 120px;
        height: 120px;
    }

    .dice-container.single .d10 {
        width: 150px;
        height: 150px;
    }
}

.rolling {
    animation: roll 1.5s ease-out forwards;
}

@keyframes roll {
    0% { 
        transform: rotateX(-20deg) rotateY(0deg);
    }
    100% { 
        transform: rotateX(calc(-20deg + var(--finalX))) rotateY(calc(0deg + var(--finalY))) rotateZ(var(--finalZ));
    }
}

.face {
    position: absolute;
    left: 50%;
    margin: 0 -50px;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.face1, .face2, .face3, .face4, .face5 {
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 120px solid var(--face-color);
}

.face1 {
    --face-color: var(--dice-color);
    transform: rotateY(0deg) translateZ(34px) translateY(0) rotateX(35deg);
    top: 0;
}

.face2 {
    --face-color: var(--dice-color-dark-1);
    transform: rotateY(72deg) translateZ(34px) translateY(0) rotateX(35deg);
    top: 0;
}

.face3 {
    --face-color: var(--dice-color-dark-2);
    transform: rotateY(144deg) translateZ(34px) translateY(0) rotateX(35deg);
    top: 0;
}

.face4 {
    --face-color: var(--dice-color-dark-3);
    transform: rotateY(216deg) translateZ(34px) translateY(0) rotateX(35deg);
    top: 0;
}

.face5 {
    --face-color: var(--dice-color-dark-4);
    transform: rotateY(288deg) translateZ(34px) translateY(0) rotateX(35deg);
    top: 0;
}

.face6, .face7, .face8, .face9, .face10 {
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 120px solid var(--face-color);
}

.face6 {
    --face-color: var(--dice-color-dark-5);
    transform: rotateY(36deg) translateZ(-34px) translateY(0) rotateZ(180deg) rotateY(180deg) rotateX(35deg);
    top: 98px;
}

.face7 {
    --face-color: var(--dice-color-dark-6);
    transform: rotateY(108deg) translateZ(-34px) translateY(0) rotateZ(180deg) rotateY(180deg) rotateX(35deg);
    top: 98px;
}

.face8 {
    --face-color: var(--dice-color-dark-7);
    transform: rotateY(180deg) translateZ(-34px) translateY(0) rotateZ(180deg) rotateY(180deg) rotateX(35deg);
    top: 98px;
}

.face9 {
    --face-color: var(--dice-color-dark-8);
    transform: rotateY(252deg) translateZ(-34px) translateY(0) rotateZ(180deg) rotateY(180deg) rotateX(35deg);
    top: 98px;
}

.face10 {
    --face-color: var(--dice-color-dark-9);
    transform: rotateY(324deg) translateZ(-34px) translateY(0) rotateZ(180deg) rotateY(180deg) rotateX(35deg);
    top: 98px;
}

.face span {
    position: absolute;
    top: 40px;
    left: -35px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    font-size: 2rem;
    text-align: center;
    line-height: 70px;
    width: 70px;
    height: 70px;
    user-select: none;
    font-weight: 900;
    pointer-events: none;
}

