@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

html,
body {
    height: 100% !important;
    margin: 0;
    padding: 0;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    font-family: 'Poppins', sans-serif !important;
    background-color: #0F0C29 !important;
    color: #E2E2E8 !important;
}

.wrapper {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.content-wrapper {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    height: calc(100% - 80px) !important;
}

thead {
    background: #161432;
    position: sticky;
    top: 0;
    z-index: 2;
}

#currencies {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    min-height: 1px !important;
    overflow-y: auto !important;
}

.content {
    min-height: 1px !important;
}

.card {
    min-height: 1px !important;
}

.card-body {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.price {
    max-width: 100px;
    width: 100px;
}

.wrapper,
.main-sidebar,
.main-header,
.content-wrapper {
    background-color: #0F0C29 !important;
}

.main-header {
    border-bottom: 1px solid #2A265F !important;
}

.nav-sidebar .nav-link {
    color: #C5C1D9 !important;
}

.nav-sidebar .nav-link:hover {
    background-color: #1A1A2E !important;
    color: #FFFFFF !important;
}

.nav-sidebar .nav-link.active {
    background-color: #8A2BE2 !important; /* Blue Violet */
    color: #FFFFFF !important;
}

.nav-icon,
.card-tools .btn i,
.nav-link.active .nav-icon {
    color: #FFFFFF !important;
}

.navbar-nav .nav-link {
    color: #C5C1D9 !important;
}

.navbar-nav .nav-link:hover {
    color: #FFFFFF !important;
}

.btn-primary,
.btn-navbar {
    background-color: #8A2BE2 !important;
    border-color: #8A2BE2 !important;
    color: #FFFFFF !important;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.btn-primary:hover,
.btn-navbar:hover {
    background-color: #6A0DAD !important; /* Deeper purple */
    border-color: #6A0DAD !important;
}

.card-body {
    background-color: #F8F9FF !important;
    color: #2D2D3A !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
    border-radius: 8px !important;
}

.text-success {
    color: #00D1B2 !important; /* Teal success */
}

.text-danger {
    color: #FF6B6B !important; /* Soft red-danger */
}

.card-footer {
    background-color: #161432 !important;
    border-top: 1px solid #2A265F !important;
}

.card-header {
    background-color: #1A1A2E !important;
    color: #FFFFFF !important;
    font-weight: 600;
    border-bottom: 1px solid #2A265F !important;
}

.trend {
    max-width: 100px;
}

.nav-icon,
.card-tools .btn i {
    color: #8A2BE2 !important;
}

.nav-link,
.btn {
    transition: background-color 0.3s, color 0.3s, transform 0.2s !important;
}

.modal {
    background-color: rgba(15, 12, 41, 0.95) !important;
    color: #E2E2E8 !important;
    font-family: 'Poppins', sans-serif !important;
}

.modal-content {
    background-color: #1A1A2E !important;
    border: 1px solid #2A265F !important;
    color: #E2E2E8 !important;
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3) !important;
    border-radius: 10px !important;
}

.modal-header {
    background-color: #1A1A2E !important;
    border-bottom: 1px solid #2A265F !important;
}

.modal-title {
    color: #8A2BE2 !important;
    font-weight: 700;
}

.modal-body {
    background-color: #1A1A2E !important;
    color: #E2E2E8 !important;
}

.modal-footer {
    background-color: #1A1A2E !important;
    border-top: 1px solid #2A265F !important;
}

.close {
    color: #8A2BE2 !important;
}

.close:hover {
    color: #6A0DAD !important;
}

/* Poppins helper classes (optional but consistent) */
.poppins-thin { font-family: 'Poppins', sans-serif; font-weight: 100; }
.poppins-extralight { font-family: 'Poppins', sans-serif; font-weight: 200; }
.poppins-light { font-family: 'Poppins', sans-serif; font-weight: 300; }
.poppins-regular { font-family: 'Poppins', sans-serif; font-weight: 400; }
.poppins-medium { font-family: 'Poppins', sans-serif; font-weight: 500; }
.poppins-semibold { font-family: 'Poppins', sans-serif; font-weight: 600; }
.poppins-bold { font-family: 'Poppins', sans-serif; font-weight: 700; }
.poppins-extrabold { font-family: 'Poppins', sans-serif; font-weight: 800; }
.poppins-black { font-family: 'Poppins', sans-serif; font-weight: 900; }

/* Dice Styles – updated colors to match theme */
.scene {
    width: 150px;
    height: 150px;
    perspective: 500px;
}

.dice {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(-100px);
    transition: transform 1s;
}

.dice.rolling {
    animation: roll 5s ease-out forwards;
}

.face {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid #8A2BE2;
    border-radius: 10px;
    background: linear-gradient(135deg, #1A1A2E, #161432);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 80px;
    font-weight: 800;
    color: #8A2BE2;
    box-shadow: inset 0 0 20px rgba(138, 43, 226, 0.3);
}

/* Dice face backgrounds use subtle gradients */
.face-1 { transform: rotateY(0deg) translateZ(75px); }
.face-2 { transform: rotateY(90deg) translateZ(75px); }
.face-3 { transform: rotateX(90deg) translateZ(75px); }
.face-4 { transform: rotateX(-90deg) translateZ(75px); }
.face-5 { transform: rotateY(-90deg) translateZ(75px); }
.face-6 { transform: rotateY(180deg) translateZ(75px); }

.dots {
    display: grid;
    grid-template-areas:
        "a . c"
        "e g f"
        "d . b";
    width: 75%;
    height: 75%;
}

.dot {
    background-color: #8A2BE2;
    border-radius: 50%;
    margin: 5px;
}

/* Dice dot patterns remain unchanged */
.one .dots { grid-template-areas: ". . ." ". a ." ". . ."; }
.one .dot:nth-child(1) { grid-area: a; }

.two .dots { grid-template-areas: "a . ." ". . ." ". . b"; }
.two .dot:nth-child(1) { grid-area: a; }
.two .dot:nth-child(2) { grid-area: b; }

.three .dots { grid-template-areas: "a . ." ". b ." ". . c"; }
.three .dot:nth-child(1) { grid-area: a; }
.three .dot:nth-child(2) { grid-area: b; }
.three .dot:nth-child(3) { grid-area: c; }

.four .dots { grid-template-areas: "a . b" ". . ." "c . d"; }
.four .dot:nth-child(1) { grid-area: a; }
.four .dot:nth-child(2) { grid-area: b; }
.four .dot:nth-child(3) { grid-area: c; }
.four .dot:nth-child(4) { grid-area: d; }

.five .dots { grid-template-areas: "a . b" ". c ." "d . e"; }
.five .dot:nth-child(1) { grid-area: a; }
.five .dot:nth-child(2) { grid-area: b; }
.five .dot:nth-child(3) { grid-area: c; }
.five .dot:nth-child(4) { grid-area: d; }
.five .dot:nth-child(5) { grid-area: e; }

.six .dots { grid-template-areas: "a . b" "c . d" "e . f"; }
.six .dot:nth-child(1) { grid-area: a; }
.six .dot:nth-child(2) { grid-area: b; }
.six .dot:nth-child(3) { grid-area: c; }
.six .dot:nth-child(4) { grid-area: d; }
.six .dot:nth-child(5) { grid-area: e; }
.six .dot:nth-child(6) { grid-area: f; }

/* Buttons – unified with Poppins & theme */
button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #8A2BE2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

button:hover {
    background-color: #6A0DAD;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(138, 43, 226, 0.4);
}

button:disabled {
    background-color: #5A4A8A;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#result {
    font-size: 18px;
    height: 25px;
    text-align: center;
    margin-top: 10px;
    color: #8A2BE2;
    font-weight: 600;
}

@keyframes roll {
    0%   { transform: translateZ(-100px) rotateX(0) rotateY(0) rotateZ(0); }
    20%  { transform: translateZ(-100px) rotateX(180deg) rotateY(360deg) rotateZ(180deg); }
    40%  { transform: translateZ(-100px) rotateX(360deg) rotateY(180deg) rotateZ(360deg); }
    60%  { transform: translateZ(-100px) rotateX(90deg) rotateY(270deg) rotateZ(180deg); }
    80%  { transform: translateZ(-100px) rotateX(180deg) rotateY(90deg) rotateZ(270deg); }
    100% { transform: translateZ(-100px) rotateX(0) rotateY(0) rotateZ(0); }
}

.cv {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

.threeD {
    text-shadow:
        1px 1px 0 #fff,
        2px 2px 0 #E0D6FF,
        3px 3px 0 #c6a4ff,
        4px 4px 0 #b28bff,
        5px 5px 0 #8A2BE2,
        6px 6px 0 #8A2BE2;
    color: #1A1A2E;
    font-weight: 800;
    font-size: 2em;
}

.custom-dropdown-toggle::after {
    display: none !important;
}

.main-footer {
    padding: .5rem !important;
    background-color: #161432 !important;
    color: #C5C1D9 !important;
    border-top: 1px solid #2A265F;
    font-size: 0.85rem;
}

.card-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 5px;
    max-width: 250px;
}

#confettiDiv {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    pointer-events: none;
}

.chartjs-annotation-label {
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    background: rgba(138, 43, 226, 0.2);
    color: #E2E2E8;
    border: 1px solid #8A2BE2;
}

.cardv {
    width: 50px;
    height: 50px;
    background: #F8F9FF;
    border: 2px solid #8A2BE2;
    border-radius: 8px;
    display: flex;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #2D2D3A;
}

.cardv:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(138, 43, 226, 0.3);
}

.cardv.correct {
    background: #00D1B2 !important;
    border-color: #00A896 !important;
    color: white !important;
}

.cardv.selected {
    background: #8A2BE2 !important;
    border-color: #6A0DAD !important;
    color: white !important;
}

[class*=icheck-] {
    min-height: 22px;
    margin-top: 10px !important;
    margin-bottom: 6px !important;
    padding-left: 0;
}