@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 52px;
    /*display: flex;*/
    align-items: center;
}

.main {
    flex: 1;
}

.main .top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
}

.main .top-row > a, .main .top-row .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
}

.main .top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

    .sidebar .top-row {
        background-color: rgba(0,0,0,0.4);
    }

    .sidebar .navbar-brand {
        font-size: 1.1rem;
    }

    .sidebar .oi {
        width: 2rem;
        font-size: 1.1rem;
        vertical-align: text-top;
        top: -2px;
    }

    .sidebar .nav-item {
        font-size: 0.9rem;
        padding-bottom: 0.5rem;
    }

        .sidebar .nav-item:first-of-type {
            padding-top: 1rem;
        }

        .sidebar .nav-item:last-of-type {
            padding-bottom: 1rem;
        }

        .sidebar .nav-item a {
            color: #d7d7d7;
            border-radius: 4px;
            height: 3rem;
            display: flex;
            align-items: center;
            line-height: 3rem;
        }

            .sidebar .nav-item a.active {
                background-color: rgba(255,255,255,0.25);
                color: white;
            }

            .sidebar .nav-item a:hover {
                background-color: rgba(255,255,255,0.1);
                color: white;
            }

.content {
    padding-top: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}

.z-form {
    z-index: 5000 !important;
}

.top-row2, .rz-footer {
    background-image: url("../images/dice2.jpg");
    background-size: 400px;
}

body {
    background-image: url("../images/dice.jpg");
    background-size: 400px;
}

body::before {
    content: "";
    position: absolute;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    background-color: rgba(255, 255, 255, 0.94);
}

.top-row2-no {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.spinner {
    border: 16px solid silver;
    border-top: 16px solid #337AB7;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 700ms linear infinite;
    top: 50%;
    left: 50%;
    position: fixed;
    z-index: 9999999999;
    margin-top: -40px;
    margin-left: -40px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

.z-banner {
    z-index: 900 !important;
    position: sticky;
    top: 0;
    border-bottom: 1px solid #d6d5d5;
}

/*---------------GamesGrid----------------*/

.rz-datatable td.cell-win .rz-cell-data {
    font-weight: bold;
    /*font-size: 1rem;*/
}

.rz-datatable td.cell-lost .rz-cell-data {
    /*background-color: #fbe4e4;*/
    /*color: white;*/
    /*font-size: 10px;*/
}

.rz-datatable td.cell-good .rz-cell-data {
    color: green;
    font-weight: bold;
}

.rz-datatable td.cell-bad .rz-cell-data {
    color: red;
}

.image-player {
    width: 26px;
    height: 26px;
    border-radius: 16px;
    margin-right: 6px;
}

.image-player-small {
    width: 20px;
    height: 20px;
    border-radius: 16px;
    margin-right: 6px;
}

.image-player-big {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    margin-right: 6px;
}

.username {
    background-color: darkred;
    color: white;
}

/*groupId styling*/
.bl-1, .br-1 {
    background-color: #f0da23;
    color: black;
}

.bl-2, .br-2 {
    background-color: #b9b6a3;
    color: black;
}

.bl-3, .br-3 {
    background-color: peru;
}

.bl-4, .br-4 {
    background-color: green;
}

.bl-5, .br-5 {
    background-color: yellow;
    color: black;
}

.bl-6, .br-6 {
    background-color: orange;
    color: black;
}

.bl-7, .br-7 {
    background-color: dodgerblue;
}

.bl-8, .br-8 {
    background-color: red;
}

.bl-9, .br-9 {
    background-color: blueviolet;
}

.bl-10, .br-10 {
    background-color: hotpink;
    color: black;
}

/*--------------- radzen grid overrides ----------------*/

.rz-datatable td.username .rz-cell-data {
    /*background-color: darkred;*/
    color: white;
}

.rz-datatable td.level-1 .rz-cell-data,
.rz-datatable td.level-1 a {
    background-color: lightgreen;
    color: black;
}

.rz-datatable td.level-2 .rz-cell-data,
.rz-datatable td.level-2 a {
    background-color: yellow;
    color: black;
}

.rz-datatable td.level-3 .rz-cell-data,
.rz-datatable td.level-3 a {
    background-color: orange;
    color: black;
}

.rz-datatable td.level-4 .rz-cell-data,
.rz-datatable td.level-4 a {
    background-color: red;
    color: white;
}

.rz-datatable td.level-5 .rz-cell-data,
.rz-datatable td.level-5 a {
    background-color: blueviolet;
    color: white;
}

/*--------------- RoundLinks ----------------*/

.gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
}

.image-main,
.image-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.image-hover {
    opacity: 0;
}

/* Hover effect */
.image-wrapper:hover {
    transform: scale(1.7); /* grow in place */
    z-index: 10; /* bring to front */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

    .image-wrapper:hover .image-main {
        opacity: 0;
    }

    .image-wrapper:hover .image-hover {
        opacity: 1;
    }

.card-3d-round {
    border-radius: 20px;
    box-shadow: 0 8px 24px rgb(28, 17, 17), 0 2px 6px rgba(33, 255, 1, 0.32);
    transition: box-shadow 0.3s ease;
}

    .card-3d-round.current-card {
        box-shadow: 0 12px 24px rgb(81, 242, 8), 0 2px 6px rgb(240, 194, 10);
    }

    .card-3d-round.card-small, .card-3d-round.card-small img {
        width: 100px;
        height: 100px;
    }

.image-wrapper.card-small:hover {
    transform: scale(1.4);
}

.highlighted {
    /*animation: flash-highlight 1.5s ease-out;*/
    animation: blink-highlight 1.1s ease-in-out 5; /* 5 blinks over ~4s */
}

@keyframes flash-highlight {
    0% {
        background-color: rgba(255, 255, 0, 0.5);
    }

    100% {
        background-color: transparent;
    }
}

@keyframes blink-highlight {
    0% {
        background-color: rgba(255, 255, 0, 0.6);
    }

    50% {
        background-color: transparent;
    }

    100% {
        background-color: rgba(255, 255, 0, 0.6);
    }
}

.button-onlybigscreen {
    display: inline-block;
}

/* Hide on screens below 640px */
@media (max-width: 640px) {
    .button-onlybigscreen {
        display: none !important;
    }
}

/*--------------- card-3d ----------------*/

.card-3d {
    /* width: 600px; */
    max-width: 90vw;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
    overflow: hidden;
    background: #fff;
    position: relative;
    transform: translateZ(0);
}

    .card-3d img {
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        display: block;
    }

.card-content {
    padding: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(245,245,245,1) 100%);
    height: 100%;
}

.card-3d:hover {
    transform: translateY(-6px) scale(1.01);
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18), 0 6px 12px rgba(0,0,0,0.08);
}

.card-3d-body-section {
    display: flex;
    gap: 1rem;
    /*margin-top: 1rem;*/
}

.card-3d-info {
    flex: 3;
    color: #3a3f44;
    /* font-size: 0.95rem;
            line-height: 1.5; */
}

.card-3d-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

    .card-3d-links a {
        text-decoration: none;
        color: #2563eb;
        font-weight: 500;
    }

        .card-3d-links a:hover {
            text-decoration: underline;
        }

.image-wrapper-br {
    width: 356px;
    height: 200px;
    border-radius: 20px;
}

.image-wrapper-br-small {
    width: 280px;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
}

/* Responsive: stack on small screens */
@media (max-width: 640px) {
    .card-3d-body-section {
        flex-direction: column;
    }

    .card-3d-links {
        flex-direction: row;
        gap: 1rem;
    }
}

.container-width-dynamic {
    max-width: calc(900px + (var(--col-count) * 40px));
    margin-right: auto;
    margin-left: auto;
    transition: max-width 0.3s ease;
}