.user-container {
    max-width: 1200px;
    margin: 1rem 0;
    padding: 1rem;
}

.user-profile-card {
    border-radius: .5rem;
    width: 100%;
}

.profile-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 1px solid #ccc;
    border-radius: .5rem !important;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    min-height: 1px;
    width: 100%;
    background-color: #f9f9f9;
}

.profile-header:is(.dark *) {
    background: #252229;
}

.profile-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0;
}

.profile-title:is(.dark *) {
    color: #ffffff;
}

.text-muted {
    font-size: .85rem;
    font-weight: 400;
    color: #6c757d;
}

.info-content .fa-pen {
    position: relative;
    bottom: 0; 
    right: 0; 
    cursor: pointer; 
}

.profile-details-wrapper {
    display: flex;
    gap: .5rem;
}

.profile-info-section {
    width: 70%; 
}



/******************************/
/*           SEZNAMY          */
/******************************/
.user-lists {
    margin-top: 15px;
}

.user-list {
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #ffffff;
}

.user-list:is(.dark *) {
    background: #0d0c0f;
}

.list-items {
    padding: 10px 20px;
}

.list-items li {
    margin-bottom: 4px;
}

.list-title {
    display: flex;
    gap: 6px;
}

.list-count {
    opacity: 0.7;
}

.list-summary {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 600;
}

.list-summary::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #aaa;
    border-bottom: 2px solid #aaa;
    transform: rotate(-45deg);
    transition: transform .2s;
    margin-right: 12px;
}

details[open] .list-summary::before {
    transform: rotate(45deg);
}

.list-title {
    flex: 1;
}


/******************************/
/*           AVATAR           */
/******************************/
.avatar-info-flex {
    display: flex;
    gap: 1rem;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: .5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.info-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.membership-details {
    color: #999;
    margin-top: .5rem;
    font-size: 11px;
    line-height: 1em;
}

.btn-edit {
    display: flex;
    align-items: center;
    font-size: .9rem;
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.2s;
    border: transparent;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    background: dodgerblue;
    border-radius: .5rem;
}

.btn-edit:hover {
    background: rgb(2,0,36);
    background: linear-gradient(90deg, rgba(30,144,255,1) 0%, rgba(0,212,255,1) 100%);
    text-decoration: none;
}

.edit-link {
    display: flex;
    align-items: center;
    font-size: .9rem;
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.2s;
    padding: .5em 0;
    padding-left: 0;
}

.profile-header span {
    margin-right: 5px;
}

/******************************/
/*       STATS DIVCOIN        */
/******************************/
.stats-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: .5rem;
}

.stats-title:is(.dark *) {
    color: #ffffff;
}

.divcoin-icon {
    height: 24px;
    margin-right: 8px;
}

.total-coins {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e91e63;
    margin-bottom: .5rem;
    text-align: center;
}

.stats-period-grid {
    display: flex;
    justify-content: center;
    gap: .75rem;
    font-size: .9rem;
    color: #666;
    text-align: center;
}

.stats-period-grid p {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}

.stats-plus {
    font-weight: 600;
    color: #4caf50;
}

.info-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.1rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.info-icon:hover,
.history-icon:hover {
    color: #e91e63;
}

.history-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.1rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

/******************************/
/*            BTNS            */
/******************************/
.action-buttons-group {
    padding-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-buttons-group button {
    gap: .5rem; 
    margin: 0; 
    margin-right: 10px; 
    padding: .5em 1em; 
    height: 32px; 
    width: 130px;
}

.btn-link {
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    padding: .6rem 1.2rem;
    border-radius: .5rem;
    height: 40px;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-icon {
    width: 20px;
    height: 20px;
    margin-right: .5rem;
}

.btn-primary {
    background-color: #1e88e5;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0d47a1;
}

.btn-secondary {
    background-color: #9e9e9e;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #757575;
}

.btn-favorite-active {
    background-color: #e91e63;
}

.btn-favorite-active:hover {
    background-color: #c2185b;
}

/******************************/
/*           POPUP            */
/******************************/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 900;
}

.modal-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 2rem;
    border-radius: .5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 90%;
    max-width: 450px;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
}

.popup-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e88e5;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.popup-icon {
    font-size: 1.5rem;
    margin-right: .5rem;
}

.popup-text {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.4;
}

.popup-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
    color: #555;
}

.popup-list li {
    display: flex;
    align-items: center;
    margin-bottom: .4rem;
}

.popup-list li span {
    margin-right: 8px;
}

.popup-link {
    display: inline-block;
    font-weight: 600;
    color: #e91e63;
    text-decoration: none;
}

.hidden-popup {
    display: none !important;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000080;
    z-index: 999;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ccc;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #000000;
}

.popup:is(.dark *) {
    background: #252229;
    color: #ffffff;
}

.popup ul {
    margin: 0 0 1rem 1rem;
    list-style: disc;
}


/******************************/
/*            TAB             */
/******************************/
.tab-profil {
    display: flex;
    position: relative;
    border: 1px solid #dee2e6;
    background-color: #ffffff;
    overflow: scroll;
    border-radius: .5rem !important;
    width: 100%;
}

.tab-profil:is(.dark *) {
    background: #252229;
}

.tab {
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    z-index: 1;
    user-select: none;
    transition: color 0.3s ease;
}

.tab.active {
    background: #c0c0c0;
}

.tab.active a {
    color: #ffffff;
}

.tab.active i {
    color: black;
}

.tab:not(.active) {
    background-color: transparent;
    color: #000;
}

.tab span {
    margin: 0 .5rem 0 1rem;
    padding: .5rem 0 .7rem 0;
}

.tab {
    margin: 0;
    font-size: 1em;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.tab a {
    padding: .5rem 1rem;
    padding-left: 0;
}

.tab-content {
    width: 100%;
}

.tab-content-item {
    padding: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    width: 100%;
    background: #f9f9f9;
    margin-bottom: .75rem; /* 12px */
}

.tab-content-item:first-child {
    border-radius: 0 .5rem 0 0;    
}

.tab-content-item:is(.dark *) {
    background: #252229; 
}

.tab-content-item.active {
    display: block;
}

.tab-container-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tab-show {
    display: none;
    width: 100%;
}

.tab-show.active {
    display: block;
}

.table {
    background-color: #f8f9fa; 
    color: #000;
    width: 100%;
}

.table:is(.dark *) {
    color: #ffffff;
    background: #1a161f; 
}

.table-head {
    display: grid;
    grid-template-columns: auto 100px 100px;
    background-color: #c0c0c0;
}

.table-head:is(.dark *) {
    color: #000000;
}

.table-head p,
.table-head-2 p {
    font-weight: 700;
    padding: .25rem; /* 4px */
}

.table-rating,
.table-date,
.table-row-rating,
.table-row-date {
    text-align: center;
}

.table-row-date {
    font-size: 14px;
}

.table-row {
    display: grid;
    align-items: center;
    grid-template-columns: auto 100px 100px;
    border: 1px solid #dee2e6 !important;
}

.table-title-rating {
    padding: .25rem; /* 4px */
}

.table-title {
    display: flex;
    align-items: center;
    padding: .25rem; /* 4px */
}

.table-title img {
    width: 20px; 
    margin-left: 1rem; 
    height: 100%;
}

.table-head-2 {
    display: grid;
    grid-template-columns: auto 100px;
    background-color: #c0c0c0;
    border: 1px solid #dee2e6 !important;
}

.table-head-2:is(.dark *) {
    color: #000000;
}

.table-head-2 p {
    font-weight: 700;
    padding: .25rem;
}

.background {
    position: absolute;
    top: 0;
    left: -1px;
    height: 100%;
    background-color: #d6d6d6;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.4s ease, width 0.3s ease;
    border-radius: .5rem !important;
}


/******************************/
/*           VITRÍNA          */
/******************************/
.vitrina {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    max-width: 600px;
    background-color: #727271;
    padding: 20px;
    box-shadow: 0 8px 16px #00000099;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: .5rem;
    border-bottom-right-radius: .5rem;
}

.vitrina:is(.dark *) {
    background-color: #2c2c34;
}

.patro {
    display: flex;
    flex-wrap: wrap;
    padding: 15px 0;
    background: #cccccc;
    box-shadow: inset 0 0 10px #00ffff33;
    border-radius: .5rem;
    margin-bottom: 10px;
    width: 100%;
}

.patro:is(.dark *) {
    background: linear-gradient(90deg, #3a3a42, #44444d);
}

.patro h3,
.patro span {
    margin-left: .5rem; /* 8px */
}

.odznaky {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    gap: 10px; 
    padding: 10px;
}

.badge {
    perspective: 1000px; /* Perspektiva pro 3D efekt */
    flex: 1 1 calc(25% - 10px); /* 25 % šířky rodiče minus mezera */
    max-width: 120px; /* Maximální šířka pro velké obrazovky */
    aspect-ratio: 1 / 1; /* Zachování čtvercového formátu */
    position: relative;
    border-radius: 50%;
}

.badge-inner {
    width: 100%;
    height: 100%;
    position: relative;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    transform-origin: center;
}

.badge-inner.flipped {
    transform: rotateY(180deg); /* Otočení na zadní stranu */
}

.badge-front, .badge-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Skryje zadní stranu, když není viditelná */
    border-radius: 50%;
    box-shadow: 0 4px 8px #00000066;
}

.badge-front {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9e9e9;
    z-index: 2;
}

.badge-front:is(.dark *) {
    background-color: #555;
}

.badge-front img {
    width: 100%;
    height: 100%;
    filter: grayscale(100%); /* Šedý efekt pro uzamčené odznaky */
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 50%;
    cursor: pointer;
}

.badge-front.unlocked img {
    filter: none; /* Barevný efekt pro odemčené odznaky */
}

.badge-back {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #444;
    color: white;
    transform: rotateY(180deg); /* Zadní strana otočená */
    font-size: .9em;
    padding: 10px;
    text-align: center;
}



.card-text {
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.favorite-body {
    display: grid;
    align-items: center;
    grid-template-columns: auto 100px;
    border: 1px solid #dee2e6 !important;
}

.favorite-body:nth-child(even),
.table-row:nth-child(even),
.table-comment:nth-child(even) {
    background-color: #f2f2f2;
}

.favorite-body:nth-child(even):is(.dark *),
.table-row:nth-child(even):is(.dark *),
.table-comment:nth-child(even):is(.dark *) {
    background-color: #1c1c1c; 
}

.favorite-body:last-child,
.table-row:last-child,
.table-comment:last-child {
    border-bottom: 0;
}

.favorite-author {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 1rem;
}

.favorite-author-img {
    margin-top: 1.25rem; 
    width: 100px;
}

.favorite-author-name {
    padding: .25rem; /* 4px */
    width: 100%;
    text-align: center;
}

.table-head-2 {
    display: grid;
    grid-template-columns: auto 100px;
    background-color: #c0c0c0;
    border: 1px solid #dee2e6 !important;
}

.table-comment {
    display: flex;
    border: 1px solid #dee2e6 !important;
}

.table-comment img {
    object-fit: cover; 
    width: 50px; 
    height: auto;
}

.table-img {
    padding: .25rem; /* 4px */
}

.comment-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.table-comment .comment {
    padding: .25rem; /* 4px */
}

.comment-body .table-row-date {
    margin-right: 10px;
}

.content-margin-top {
    margin-top: 1.25rem;
}

.tab-sub-nav-wrapper {
    margin-top: 1.25rem;
}

.empty-list-message {
    padding: .75rem;
}




a.stats.actives {
    background-color:#c0c0c0 !important;
}

a.movies.actives  {
    background-color: #A52B21 !important;
    color: #ffffff;
}

a.books.actives  {
    background-color: #61872B !important;
    color: #ffffff;
}

a.games.actives  {
    background-color: #0A76A9 !important;
    color: #ffffff; 
}

.lable {
    line-height: 20px;
    font-size: 12px;
    color: #fff;
    font-family: sans-serif;
    letter-spacing: 1px;
}

button:hover .svg-icon {
    animation: msg 2s linear infinite;
}

@keyframes msg {
    0% {
        transform: translate(0, 0) scale(1);
    }

    15% {
        transform: translateX(1px);
    }

    30% {
        transform: scale(1.1);
    }

    45% {
        transform: translateY(1px);
    }

    60% {
        transform: translateY(0px);
    }

    75% {
        transform: scale(1);
    }

    90% {
        transform: translateX(-px);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/******************************/
/*        NAVIGATION          */
/******************************/
.nav {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    /* flex-wrap: wrap; */
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-tabs {
    display: flex;
    position: relative;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow: scroll;
    border-top-left-radius: .5rem; /* 8px */
    border-top-right-radius: .5rem; /* 8px */
    border: 1px solid #dee2e6 !important;
    background-color: #ffffff;
}

.nav-tabs:is(.dark *) {
    background: #252229;
}

.nav-tabs-item {
    position: relative;
    margin: 0;
}

.nav-tabs-link {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: .5rem 1rem;
    width: max-content;
    color: #555;
    position: relative;
    z-index: 1; /* Text nad pozadím */
}

.nav-tabs-link.active {
    color: #fff !important;
}

.stats-container {
    border-right: 1px solid lightgrey;
    width: 100%;
}

.stats-container:last-child {
    border-right: none;
}

.bar-container {
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse;
}

.character-name-box {
    padding: .25rem;
    width: 100%;
    text-align: center;
}

.shop-list {
    display: flex;
    flex-wrap: wrap;
}

.shop-card {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #dee2e6;
    width: 100%;
    padding: .75rem;
    margin-bottom: .75rem;
    background-color: #ffffff;
}

.shop-card-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
}

.shop-card-info {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.shop-card-row {
    padding: .25rem;
    width: 100%;
}

.shop-card-actions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-evenly;
    margin-top: .75rem;
}

.shop-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.filter-options {
    float: right; 
    margin-bottom: 10px;
}

.shop-card-flex {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #dee2e6;
    width: 100%;
    padding: .75rem;
    margin-bottom: .75rem;
    background-color: #ffffff;
}


/******************************/
/*         HODNOCENÍ          */
/******************************/
.rating-header-row {
    display: grid;
    grid-template-columns: 100px 200px auto;
    background-color: #c0c0c0;
}

.rating-header-row:is(.dark *) {
    color: #000000;
}

.rating-header-cell {
    text-align: center;
    font-weight: 700;
    padding: .25rem;
    border-right: 1px solid #ffffff;
}

.rating-cell {
    text-align: center;
    padding: .25rem;
    border-right: 1px solid #dee2e6;
}

.rating-summary-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
}

.rating-type {
    margin-bottom: 10px;
}

.rating-type input {
    margin: 0 5px 0 15px;
}



/******************************/
/*         COMMUNITY          */
/******************************/
.favorite-activity {
    display: flex;
    flex-wrap: wrap;
}

.community-grid {
    display: grid;
    grid-template-columns: 100px auto;
    border: 1px solid #dee2e6 !important;
    padding: .75rem; /* 12px */
    width: 100%;
}

.favorite-activity-user {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.favorite-user {
    display: flex;
    justify-content: space-between;
    padding: .25rem; /* 4px */
    width: 100%;
}

.my-community {
    display: flex;
}

.tab-content-two-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}



/******************************/
/*     HISTORIE DIVCOINŮ      */
/******************************/
.divcoin-history-card {
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: .5rem;
    padding: 24px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
}

.divcoin-history-card:is(.dark *) {
    background: #252229;
}

.divcoin-history-card h3 {
    margin: 0 0 20px;
    font-size: 20px;
}

.divcoin-history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.divcoin-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 5px 16px;
    border: 1px solid #ccc;
    border-radius: .5rem;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.divcoin-item:is(.dark *) {
    background: #0d0c0f;
}

.divcoin-item .icon {
    font-size: 20px;
    text-align: center;
}

.divcoin-item .title {
    font-weight: 600;
    font-size: 15px;
    width: 150px;
}

.divcoin-item .date {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.divcoin-item .amount {
    font-weight: 700;
    font-size: 16px;
}

.divcoin-item.positive .amount {
    color: #16a34a;
}

.divcoin-item.negative .amount {
    color: #dc2626;
}

.content {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1rem;
}




@media (min-width: 1200px) {
    .nav-tabs,
    .tab-profil {
        overflow: hidden;
    }

}

@media (min-width: 1024px) {
    .my-profil {
        width: 65%;
    }

    .profile-details-wrapper {
        flex-direction: row;
    }

}

@media (max-width: 1023.98px) {

}

@media (min-width: 768px) {
    .tab-profil {
        padding-right: 0;
    }

    .shop-card {
        width: 50%;
    }

}

@media (max-width: 767.98px) {
    .badge {
        flex: 1 1 calc(33.33% - 10px); /* Tři odznaky na řádek na tabletu */
        max-width: none; /* Zruší pevnou maximální šířku */
    }

    .profile-info-section,
    .profile-stats-section {
        width: 100%;
    }

    .profile-details-wrapper {
        flex-direction: column;
    }

    .stats-container {
        border-right: none;
    }

    .tab-content-two-items {
        grid-template-columns: 1fr;
    }

    .tab-container-item {
        grid-template-columns: 1fr;
    }

    .my-community {
        flex-wrap: wrap;
    }

}

@media (min-width: 640px) {
    .profile-avatar {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 599.98px) {
    .tab-content-item:first-child {
        border-radius: 0 0 .5rem .5rem;
    }

    .table-row {
        grid-template-columns: auto 100px;
    }

    .table-title-rating {
        grid-column: 1 / span 2; 
    }

    .table-row-rating {
        text-align: end;
    }

    .table-row-date {

    }


}

@media (max-width: 480px) {
    .badge {
        flex: 1 1 calc(50% - 10px); /* Dva odznaky na řádek na mobilu */
        max-width: none; /* Zruší pevnou maximální šířku */
    }

    .popup {
        width: 90%;
    }

    .edit-link span {
        display: none;
    }

    .profile-header span {
        margin-right: 0;
    }
}