body {
    background-color: #bd9a79;
    color: #433120;
}

@media only screen and (max-width: 700px) {
    #overlay {
        background-color: rgba(0, 0, 0, 0);
    }

    body {
        margin: 0 !important;
    }
}

h1,
h2 {
    font-weight: bolder;
    text-align: center;
}

h1 {
    background-color: rgb(119, 80, 54);
    color: #F3C24A;
    padding: 4px;
    border-radius: 10px;
}

.note {
    background-color: rgb(119, 80, 54);
    color: white;
    font-weight: bolder;
    padding: 5px;
    border-radius: 10px;
    margin: 0;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.warning-icon {
    font-size: 30px;
    margin-right: 20px;
    font-weight: bold;
}

.container {
    background-color: rgb(67, 51, 38);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-top: 0 !important;
}

@media only screen and (max-width: 1024px) {
    .container {
        min-width: fit-content;
    }
}

.box {
    display: flex;
    align-items: stretch;
    border-radius: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #000;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 2px solid white;
}

.box-content {
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    position: relative;
    background-color: rgb(145, 98, 65);
    min-height: 100px;
    border-radius: 10px;
}

.box-content h2 {
    font-size: 18px;
    margin: 0;
    font-weight: bold;
    color: white;
    color: #F3C24A;
}

.box-content p {
    margin: 0;
    font-size: 13px;
    color: white;
}

p {
    font-weight: 500;
}

.box[disabled] {
    pointer-events: none;
    opacity: 0.5;
    filter: blur(1px);
    cursor: not-allowed;
    transition: all 0.3s ease;
}

::-webkit-scrollbar {
    width: 10px;
    background-color: #f2d9bb;
}

::-webkit-scrollbar-thumb {
    background-color: #bd9a79;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #f2d9bb;
}

.custom-input,
.custom-select,
.custom-button,
.form-control:focus,
.form-control:disabled {
    background-color: #f3e0c2;
    color: #3e2a16;
    border: 2px solid #bd9a79;
    font-weight: bold;
    border-radius: 8px;
}

.custom-input::placeholder {
    color: #8d7155;
}

.custom-input:focus,
.custom-select:focus,
.custom-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(243, 194, 74, 0.5);
    border-color: #f3c24a;
    outline: none;
}

.custom-button {
    background-color: #f3c24a;
    color: #433120;
    text-align: center;
    padding: 6px 12px;
    transition: background-color 0.3s ease;
}

.custom-button:hover {
    background-color: #e2b33d;
}

.dropdown-menu-dark {
    background-color: #7c5a3b;
    border: 1px solid #f3c24a;
    color: white;
    font-weight: bold;
    border-radius: 10px;
}

.dropdown-menu-dark li {
    margin-bottom: 5px;
}

#searchInput::placeholder {
    color: #7b5a3b;
}

.form-select,
.form-select option,
.btn-custom {
    background-color: #f2d9bb;
    color: #433120;
    border: 2px solid #a97c50;
    font-weight: bold;
}

#searchInput:focus,
#sortSelect:focus,
.btn-custom:focus {
    border-color: #f3c24a;
    box-shadow: 0 0 0 0.2rem rgba(243, 194, 74, 0.25);
    outline: none;
}

.dropdown-menu-custom {
    background-color: #f3e0c2;
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid #a97c50;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-check-input {
    margin-right: 6px;
    border: 2px solid #a97c50;
}

.form-check-input:checked {
    background-color: #f3c24a;
    border-color: #f3c24a;
}

.form-check-label {
    color: #433120;
    font-weight: 600;
}

.image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.card-image {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal.show {
    display: flex;
    opacity: 1;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.image-modal.show .image-modal-content {
    transform: scale(1);
    opacity: 1;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    user-select: none;
    z-index: 10000;
}

#modalCaption {
    text-align: center;
    color: #ccc;
    margin-top: 10px;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.show #modalCaption {
    opacity: 1;
}

.card-table {
    width: 100%;
    color: white;
    font-size: 14px;
    text-align: center;
}

.card-cell {
    padding: 2px 0;
}

.card-section-title {
    text-align: left;
    font-size: 15px;
    font-weight: bold;
    color: white;
}

.max-bonus {
    font-style: italic;
    color: rgb(234, 224, 224);
    font-size: 12px;
}

@media (max-width: 768px) {
    .max-bonus {
        white-space: nowrap;
    }
}

.home-icon-link {
    position: fixed;
    right: 10px;
    top: 95%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    z-index: 1000;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease-in-out;
}

.home-icon {
    background-color: #7e4606;
    border: 1px solid #f8bc00;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.home-icon i {
    color: #4c473b;
    font-size: 18px;
}

.home-icon-link .home-icon i {
    color: #f8bc00;
}

.level-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #7b5a3b;
    padding: 6px 12px;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #ffffff;
    color: #f3c24a;
    font-weight: bold;
    user-select: none;
    font-size: 1rem;
    box-shadow: 0 2px 3px -2px rgba(255, 255, 255, 0.7);
}

.level-selector button {
    background-color: #f3c24a;
    border: 2px solid #bd9a79;
    color: #433120;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 40px;
    user-select: none;
}

.level-selector button:disabled {
    background-color: #bd9a79;
    border-color: #7b5a3b;
    color: #433120;
    cursor: default;
    opacity: 0.6;
    box-shadow: none;
}

.level-selector button:hover:not(:disabled) {
    background-color: #e2b33d;
    border-color: #f3c24a;
}

.level-selector .level-text {
    flex-grow: 1;
    text-align: center;
}

.no-image-text {
    font-style: italic;
    color: #e2b33d;
    text-align: center;
    padding: 2rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    user-select: none;
}

#content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .page-title {
        display: none;
    }
}

.card-effects {
    padding: 5px;
}

.card-sources {
    padding: 5px;
}

.box-content hr {
    width: 100%;
    border: 0;
    border-top: 2px solid white;
    opacity: 0.5;
    margin: 0;
    color: white;
}

.ci-title {
    padding: 5px;
}

.error-message {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    padding: 10px;
    max-width: 600px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.error-message h3 {
    margin-top: 0;
    font-weight: bold;
}

.error-message a {
    color: #842029;
    text-decoration: underline;
}

#errorCountdown {
    font-weight: bold;
    font-size: 24px;
    margin-top: 10px;
}

.dropdown-menu-custom li {
    list-style: none;
    margin-bottom: 5px;
}

.dropdown-menu-custom li,
.form-check {
    margin-bottom: 0px !important;
}

.dropdown-menu-custom .form-check-input {
    border: 2px solid #a97c50;
    background-color: white;
}

.dropdown-menu-custom .form-check-input:checked {
    background-color: #f3c24a;
    border-color: #f3c24a;
}

.dropdown-menu-custom .form-check-label {
    color: #433120;
    font-weight: bold;
}

.btn.dropdown-toggle::after {
    display: none !important;
}

.custom-button .bi-funnel {
    font-weight: bolder;
    color: #433120;
}

.dropdown-menu .form-check:hover {
    background-color: rgba(243, 194, 74, 0.25);
}