.nx-trophy-page {
    display: block;
    width: 100%;
}

.nx-trophy-page-content {
    width: 100% !important;
    max-width: none !important;
}

.nx-trophy-room {
    --tr-gold: #e4bd72;
    --tr-purple: #a768ed;
    --tr-blue: #55aee8;
    --tr-text: #eeeaf5;
    --tr-muted: #a59ab7;
    width: min(100%, 1774px);
    margin: 22px auto 0;
    padding: 24px;
    box-sizing: border-box;
    color: var(--tr-text);
    background: #0c0816;
    border-top: 1px solid rgba(228, 189, 114, 0.3);
    border-bottom: 1px solid rgba(167, 104, 237, 0.25);
    font-family: Arial, Helvetica, sans-serif;
}

.nx-trophy-room *,
.nx-trophy-room *::before,
.nx-trophy-room *::after {
    box-sizing: border-box;
}

.nx-trophy-head {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 22px;
    padding: 0;
    background: transparent;
    overflow: visible;
}

.nx-trophy-kicker,
.nx-trophy-dialog-head span {
    display: block;
    margin-bottom: 6px;
    color: var(--tr-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.nx-trophy-head h2,
.nx-trophy-dialog h3 {
    margin: 0;
    color: #f5ddb0;
    font-family: Philosopher, Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.nx-trophy-edit,
.nx-trophy-dialog-head button {
    position: relative;
    z-index: 2;
    display: inline-grid;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(228, 189, 114, 0.44);
    border-radius: 6px;
    background: #171022;
    color: var(--tr-gold);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    appearance: none;
}

.nx-trophy-edit .fa,
.nx-trophy-dialog-head button .fa {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    color: inherit;
    font-size: 16px;
    line-height: 1;
}

.nx-trophy-edit[hidden] { display: none !important; }

.nx-trophy-edit:hover,
.nx-trophy-dialog-head button:hover {
    border-color: var(--tr-gold);
    color: #fff1c4;
}

.nx-trophy-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    min-height: 210px;
}

.nx-trophy-card {
    --badge: 92px;
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 210px;
    padding: 18px 12px 15px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid rgba(130, 107, 164, 0.32);
    border-radius: 8px;
    background: #13101d;
    text-align: center;
    overflow: hidden;
}

.nx-trophy-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: var(--tr-blue);
    opacity: 0.8;
}

.nx-trophy-card.is-mythic::before { background: #e4bd72; }
.nx-trophy-card.is-legendary::before { background: #c86ce8; }
.nx-trophy-card.is-epic::before { background: #678ff0; }

.nx-trophy-card .nx-badge-icon {
    flex: 0 0 auto;
    margin: 4px auto 10px;
}

.nx-trophy-slot {
    position: absolute;
    top: 9px;
    left: 10px;
    color: #756b86;
    font-size: 10px;
    font-weight: 700;
}

.nx-trophy-rarity {
    margin-bottom: 7px;
    color: var(--tr-blue);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.nx-trophy-card.is-mythic .nx-trophy-rarity { color: var(--tr-gold); }
.nx-trophy-card.is-legendary .nx-trophy-rarity { color: #d98af1; }
.nx-trophy-card.is-epic .nx-trophy-rarity { color: #82a5ff; }

.nx-trophy-name {
    width: 100%;
    color: #f6f1fc;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.nx-trophy-date {
    margin-top: 7px;
    color: var(--tr-muted);
    font-size: 10px;
}

.nx-trophy-loading,
.nx-trophy-empty {
    display: grid;
    grid-column: 1 / -1;
    min-height: 190px;
    padding: 26px;
    place-items: center;
    border: 1px dashed rgba(140, 111, 177, 0.34);
    border-radius: 8px;
    color: var(--tr-muted);
    text-align: center;
}

.nx-trophy-empty strong {
    display: block;
    margin-bottom: 5px;
    color: #e8def2;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
}

.nx-trophy-message {
    min-height: 18px;
    margin-top: 10px;
    color: #73d9a4;
    font-size: 12px;
    text-align: right;
}

.nx-trophy-message.is-error { color: #ff8f9e; }

.nx-trophy-modal {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: none;
    padding: 24px;
    align-items: center;
    justify-content: center;
    background: rgba(3, 2, 8, 0.84);
}

.nx-trophy-modal.is-open { display: flex; }

.nx-trophy-dialog {
    width: min(920px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    display: flex;
    padding: 22px;
    flex-direction: column;
    border: 1px solid rgba(228, 189, 114, 0.34);
    border-radius: 8px;
    background: #0d0916;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7);
}

.nx-trophy-dialog-head,
.nx-trophy-dialog-actions {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 0;
    background: transparent;
}

.nx-trophy-dialog h3 { font-size: 23px; }

.nx-trophy-selection-count {
    margin: 16px 0 10px;
    color: var(--tr-muted);
    font-size: 12px;
    text-align: right;
}

.nx-trophy-selection-count b { color: var(--tr-gold); }

.nx-trophy-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
    padding: 2px 4px 14px 2px;
    overflow-y: auto;
}

.nx-trophy-choice {
    --badge: 72px;
    position: relative;
    min-width: 0;
    min-height: 145px;
    padding: 12px 8px;
    border: 1px solid rgba(125, 103, 154, 0.3);
    border-radius: 7px;
    background: #15101f;
    color: #ded6ea;
    cursor: pointer;
    text-align: center;
}

.nx-trophy-choice:hover { border-color: rgba(167, 104, 237, 0.75); }

.nx-trophy-choice.is-selected {
    border-color: var(--tr-gold);
    background: #21172b;
}

.nx-trophy-choice-order {
    position: absolute;
    top: 7px;
    right: 7px;
    display: none;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--tr-gold);
    color: #160f1c;
    font-size: 11px;
    font-weight: 900;
}

.nx-trophy-choice.is-selected .nx-trophy-choice-order { display: grid; }

.nx-trophy-choice .nx-badge-icon {
    margin: 0 auto 8px;
}

.nx-trophy-choice b {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.nx-trophy-dialog-actions {
    padding-top: 14px;
    border-top: 1px solid rgba(140, 111, 177, 0.22);
    justify-content: flex-end;
}

.nx-trophy-dialog-actions button {
    min-height: 40px;
    padding: 0 18px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.nx-trophy-cancel {
    border: 1px solid rgba(150, 137, 171, 0.34);
    background: #15101f;
    color: #c5b9d3;
}

.nx-trophy-save {
    border: 1px solid #b98a3f;
    background: #7d5522;
    color: #fff4d0;
}

.nx-trophy-save:disabled { opacity: 0.55; cursor: wait; }

@media (max-width: 980px) {
    .nx-trophy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nx-trophy-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .nx-trophy-room { padding: 18px 12px; }
    .nx-trophy-head h2 { font-size: 22px; }
    .nx-trophy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nx-trophy-card { min-height: 195px; }
    .nx-trophy-modal { padding: 10px; }
    .nx-trophy-dialog { max-height: calc(100vh - 20px); padding: 15px; }
    .nx-trophy-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nx-trophy-dialog-actions button { flex: 1; padding: 0 10px; }
}
