html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
}
main {
    padding: 0.1em;
}

.ad-common {
    color: #D1D5D8;
}
.ad-uncommon {
    color: #41A85F;
}
.ad-rare {
    color: #2C82C9;
}
.ad-epic {
    color: #9365B8;
}
.ad-legendary {
    color: #FAC51C;
}
.ad-mythic {
    color: #E25041;
}

.click-to-copy {
  cursor: pointer;
  font-size: 0.8em;
  padding: 0.3em 0;
}
.click-to-copy-icon-success {
    display: none;
    font-size: 1.2em;
    font-weight: bold;
}

#collection {
    min-height: 100px;
    text-align: center;
    margin-top: 3em;
    padding: 2em 0;
}
#collection > div {
    margin: auto;
}
#collection .nfts {
    display: flex;    
    flex-wrap: wrap;
    justify-content: space-around;
}
#collection .nfts .element {
    width: 16%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #9c9c9c;
    padding: 0 0.5em 2em 0.5em;
}
#collection .nfts .element img {
    width: 100%;
    max-width: 100%;
    border: 1px solid #aaa;
}
#collection .nfts .element span {
    font-size: 0.8em;
    text-align: left;
}
#collection .nfts .element span.price {
    padding-bottom: 0.2em;
    line-height: 1.5;
}
#collection .nfts .element a.id {
    font-weight: bold;
    font-size: 1em;
    color: #FFF;
    padding: 0.3em 0;
}
#collection .nfts .element a.id:hover {
    color: tomato;
}
#collection h2 {
    padding-bottom: 0.7em;
    font-size: 2.4em;
}
#collection .sync {
    color: #ccc;
    font-size: 0.8em;
    text-align: right;
    width: 100%;
    padding: 0 1em;
}
#collection .more {
    padding: 2em 0 0.5em 0;
    clear: both;
    display: inline-block;
}
#collection .more p {
    padding: 0 2em;
}
#collection .more a {
    font-weight: bold;
    font-size: 0.9em;
    color: tomato;
}


/* mobile */
@media (max-width: 768px) {
    #collection .nfts .element {
        width: 27%;
    }
    #collection .nfts .element:nth-child(-n + 9 of .element) {
        display: none;
    }
    #collection .sync {
        text-align: center;
    }
}

/* Pagination styling - horizontal layout without bullets */
#pagination {
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 1rem auto;
    gap: 0;
}

#pagination ul {
    display: flex !important;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
    width: auto;
}

#pagination li {
    display: inline-flex !important;
    align-items: center;
    margin: 0;
    padding: 0;
}

#pagination .page-item {
    display: inline-flex !important;
    align-items: center;
    margin: 0;
}

#pagination .page-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    margin: 0;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-width: 36px;
}

#pagination .page-link:hover {
    text-decoration: none;
}

#pagination .page-item.active .page-link {
    background-color: #2C82C9 !important;
    color: white !important;
    font-weight: bold;
}

#pagination .page-item.disabled .page-link {
    cursor: default;
    opacity: 0.5;
}

/* Remove any bullet points or pseudo-elements */
#pagination li::before,
#pagination li::after,
#pagination li > a:before,
#pagination li > a::after,
#pagination .m-2 {
    display: none !important;
}

/* Navigation buttons styling */
#prevBtn,
#nextBtn {
    min-width: 40px;
    text-align: center;
}

/* Dropdown menu for Demons - 2 column layout */
#demonTypesDropdown ul {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    padding-left: 0 !important;
    margin-bottom: 5px;
}

#demonTypesDropdown li {
    text-align: left;
    white-space: nowrap;
    box-sizing: border-box;
}

#demonTypesDropdown a.dropdown-item {
    text-decoration: none;
    color: #D1D5D8;
    font-weight: normal;
    display: block;
}

#demonTypesDropdown li:hover {
    background-color: #2c82c9 !important;
}

#demonTypesDropdown a.dropdown-item:hover {
    color: white;
}

.auth-shell {
    min-height: calc(100vh - 190px);
}

.auth-mark {
    max-height: 420px;
    object-fit: contain;
}

.stat-box {
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    padding: 0.9rem 0.5rem;
    background: rgba(0,0,0,0.18);
}

.stat-box span {
    display: block;
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1.1;
}

.stat-box small {
    color: #9c9c9c;
}

.empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
}

.empty-state img {
    width: 140px;
    max-width: 60%;
    opacity: 0.75;
}

.demon-mini-card img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.demon-mini-card .card-body {
    font-size: 0.88rem;
}

.battle-formation {
    display: grid;
    gap: 0.75rem;
}

.formation-lane {
    display: grid;
    grid-template-columns: 4.8rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
}

.formation-lane-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4.6rem;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    color: #9da7b1;
    font-size: 0.72rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
}

.formation-lane-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    min-width: 0;
}

.formation-empty {
    display: flex;
    flex: 1 1 100%;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 4.6rem;
    border: 1px dashed rgba(255,255,255,0.16);
    border-radius: 6px;
    color: #69737d;
    font-size: 0.8rem;
}

.hunt-demon-card {
    display: grid;
    grid-template-columns: 36% minmax(0, 1fr);
    flex: 0 0 calc((100% - 1.3rem) / 3);
    gap: 0.28rem;
    align-items: stretch;
    min-height: 4.6rem;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 6px;
    background: rgba(0,0,0,0.18);
    overflow: hidden;
}

.hunt-demon-card img {
    width: 100%;
    height: 100%;
    min-height: 4.6rem;
    object-fit: cover;
}

.hunt-demon-card-body {
    min-width: 0;
    padding: 0.42rem 0.35rem 0.42rem 0;
}

.hunt-demon-card-title {
    display: flex;
    gap: 0.25rem;
    min-width: 0;
    margin-bottom: 0.28rem;
    font-size: 0.7rem;
    font-weight: bold;
    line-height: 1.15;
}

.hunt-demon-card-title span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.combat-stat-strip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    color: #f2f7ff;
    font-size: 0.68rem;
    font-weight: bold;
}

.combat-stat-strip span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.combat-stat-strip i {
    color: #7d858d;
    font-size: 0.78rem;
}

.combat-hp-bar {
    height: 0.4rem;
    margin-top: 0.28rem;
    border-radius: 4px;
    background: #303840;
    overflow: hidden;
}

.combat-hp-fill {
    height: 100%;
    background: #1f9657;
    transition: width 220ms ease;
}

.combat-hp-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
    margin-top: 0.22rem;
    color: #f2f7ff;
    font-size: 0.72rem;
    font-weight: bold;
    line-height: 1;
}

.combat-hp-meta i {
    color: #7d858d;
    font-size: 0.76rem;
}

.position-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.18rem;
    margin-top: 0.35rem;
}

.position-toggle button,
.position-badge {
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    color: #c2cbd3;
    font-size: 0.58rem;
    font-weight: bold;
    line-height: 1;
    padding: 0.26rem 0.12rem;
    text-align: center;
}

.position-toggle button.active,
.position-badge {
    border-color: rgba(44,130,201,0.7);
    background: rgba(44,130,201,0.22);
    color: #dcefff;
}

.position-toggle button:disabled {
    opacity: 0.65;
}

.hunt-demon-card.is-attacking {
    animation: demon-attack-hop 280ms ease;
    border-color: rgba(250,197,28,0.72);
    box-shadow: 0 0 0 2px rgba(250,197,28,0.16), 0 0 16px rgba(250,197,28,0.18);
}

.hunt-demon-card.is-hit {
    border-color: rgba(226,80,65,0.78);
    box-shadow: 0 0 0 2px rgba(226,80,65,0.55), 0 0 18px rgba(226,80,65,0.32);
}

.hunt-demon-card.is-defeated {
    opacity: 0.58;
    filter: grayscale(0.75);
}

.reward-image {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.18);
}

.reward-item {
    background: rgba(0,0,0,0.14);
}

.reward-item.active {
    border-color: rgba(65,168,95,0.75) !important;
    box-shadow: 0 0 0 2px rgba(65,168,95,0.18);
}

.starter-picker {
    text-align: left;
}

.hunt-modal .modal-content {
    background: #14181c;
}

.hunt-modal .modal-header,
.hunt-modal .modal-footer {
    border-color: rgba(255,255,255,0.12);
}

.hunt-modal .modal-body {
    overflow: auto;
    padding: 1rem;
}

@media (min-width: 992px) {
    .hunt-modal .modal-body {
        padding: 1.5rem 2rem;
    }
}

.hunt-choice-card,
.swap-choice {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    background: rgba(0,0,0,0.16);
    color: #fff;
    text-align: left;
    padding: 0.75rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.hunt-choice-card:hover,
.hunt-choice-card.active,
.swap-choice:hover,
.swap-choice.active {
    border-color: rgba(65,168,95,0.8);
    box-shadow: 0 0 0 2px rgba(65,168,95,0.18);
}

.hunt-choice-card.active,
.swap-choice.active {
    transform: translateY(-1px);
}

.hunt-choice-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.65rem;
}

.hunt-choice-name {
    display: block;
    min-height: 2.35rem;
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
    font-weight: bold;
    line-height: 1.2;
}

.swap-choice {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.swap-choice img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    flex: 0 0 auto;
}

.swap-choice span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
}

.team-editor-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    background: rgba(0,0,0,0.16);
    color: #fff;
    text-align: left;
    padding: 0.75rem;
    width: 100%;
}

.team-editor-card.active {
    border-color: rgba(250,197,28,0.8);
    box-shadow: 0 0 0 2px rgba(250,197,28,0.16);
}

.team-editor-card.is-clickable:not(:disabled) {
    cursor: pointer;
}

.team-editor-card:disabled {
    opacity: 0.72;
}

.team-editor-card img {
    width: 88px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
}

.team-editor-card-body {
    min-width: 0;
}

.team-editor-card .combat-stat-strip {
    margin-top: 0.25rem;
}

.swap-note {
    color: #FAC51C;
    font-size: 0.78rem;
    font-weight: bold;
}

.vs-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: #FAC51C;
    font-weight: bold;
    letter-spacing: 0.08em;
}

.vs-divider::before,
.vs-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: rgba(255,255,255,0.18);
}

.vs-divider span {
    flex: 0 0 auto;
}

@media (max-width: 420px) {
    .team-editor-card {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .team-editor-card img {
        width: 68px;
    }

    .formation-lane {
        grid-template-columns: 1fr;
    }

    .formation-lane-label {
        min-height: 0;
        padding: 0.35rem;
    }

    .formation-lane-cards {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .formation-lane-cards {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hunt-demon-card {
        flex-basis: 100%;
    }
}

.battle-board > .col-12:first-child {
    border-right: 1px solid rgba(255,255,255,0.14);
}

@media (max-width: 991.98px) {
    .battle-board > .col-12:first-child {
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.14);
        padding-bottom: 1rem;
    }
}

.fight-log {
    max-height: 620px;
    overflow: auto;
    font-size: 0.82rem;
}

.fight-log-row {
    display: grid;
    grid-template-columns: 2.5rem 4.25rem minmax(0, 1fr) 4.75rem 4rem;
    gap: 0.45rem;
    align-items: center;
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid transparent;
}

.fight-log-row.active {
    background: rgba(226,80,65,0.16);
    color: #fff;
}

.fight-log-row.is-player-action {
    background: rgba(65,168,95,0.08);
    border-left-color: #41A85F;
}

.fight-log-row.is-enemy-action {
    background: rgba(226,80,65,0.08);
    border-left-color: #E25041;
}

.fight-log-row.is-player-action.active {
    background: rgba(65,168,95,0.18);
}

.fight-log-row.is-enemy-action.active {
    background: rgba(226,80,65,0.18);
}

.fight-log-side {
    display: inline-flex;
    justify-content: center;
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.72rem;
    font-weight: bold;
}

.is-player-action .fight-log-side {
    background: rgba(65,168,95,0.2);
    color: #80d697;
}

.is-enemy-action .fight-log-side {
    background: rgba(226,80,65,0.2);
    color: #f19187;
}

.fight-log-action {
    color: #fff;
}

.fight-log-position {
    display: inline-flex;
    margin-left: 0.25rem;
    color: #9da7b1;
    font-size: 0.72rem;
}

.fight-log-notice {
    padding: 0.45rem 0.5rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-weight: bold;
}

.fight-log-end-notice {
    margin-top: 0.55rem;
    margin-bottom: 0;
    border-top: 1px solid rgba(255,255,255,0.14);
    border-bottom: 0;
    background: rgba(255,255,255,0.04);
}

.fight-log-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes demon-attack-hop {
    0% {
        transform: translateY(0);
    }
    24% {
        transform: translateY(-5px);
    }
    48% {
        transform: translateY(3px);
    }
    72% {
        transform: translateY(-2px);
    }
    100% {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hunt-demon-card.is-attacking {
        animation: none;
    }
}

.rank-table th,
.rank-table td {
    text-align: center;
}

.rank-table th:first-child,
.rank-table td:first-child {
    width: 4rem;
}

.rank-table th:nth-child(2),
.rank-table td:nth-child(2) {
    text-align: left;
}

.rank-table thead th {
    background: rgba(44,130,201,0.28);
    border-bottom-color: rgba(255,255,255,0.28);
    color: #fff;
}

.rank-sort-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.rank-sort-link:hover,
.rank-sort-link.active {
    color: tomato;
}

.current-player-rank td {
    background: rgba(250,197,28,0.16) !important;
    color: #fff;
}

.current-player-rank td:first-child {
    color: #FAC51C !important;
    font-weight: bold;
}
