/* Damage calculator */
.damage-page {
    --damage-accent: #e85d50;
    --damage-accent-soft: rgba(232, 93, 80, 0.1);
    --damage-blue: #4f7fb3;
    --damage-blue-soft: rgba(79, 127, 179, 0.1);
    --damage-shadow: 0 14px 36px rgba(24, 39, 58, 0.07);
}

.damage-hero,
.damage-sidebar-card,
.damage-skill-panel,
.damage-overview-panel,
.damage-ranking-panel,
.damage-guide-panel {
    box-shadow: var(--damage-shadow);
}

.damage-hero {
    border-color: rgba(204, 213, 224, 0.9);
}

.damage-hero__inner {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 82% 18%, rgba(232, 93, 80, 0.15), transparent 28%),
        radial-gradient(circle at 62% 110%, rgba(79, 127, 179, 0.16), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f9fbfd 52%, #f7f2ef 100%);
}

.damage-hero__inner::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: 31%;
    top: 18px;
    width: 82px;
    height: 82px;
    border: 1px solid rgba(232, 93, 80, 0.16);
    border-radius: 24px;
    transform: rotate(16deg);
}

.damage-hero__icon {
    box-shadow: 0 8px 20px rgba(232, 93, 80, 0.18);
}

.damage-summary {
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 30px rgba(38, 49, 65, 0.09);
    backdrop-filter: blur(12px);
}

.damage-summary > div {
    position: relative;
    min-height: 86px;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.damage-summary > div::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--damage-accent);
    opacity: 0.55;
}

.damage-summary > div:nth-child(2)::before {
    background: #d7923f;
}

.damage-summary > div:nth-child(3)::before {
    background: var(--damage-blue);
}

.damage-summary > div:hover {
    background: rgba(255, 255, 255, 0.72);
    transform: translateY(-1px);
}

.damage-workspace {
    align-items: stretch;
}

.damage-sidebar-card {
    border-color: rgba(204, 213, 224, 0.9);
    background:
        linear-gradient(180deg, rgba(250, 252, 255, 0.78), rgba(255, 255, 255, 0) 180px),
        #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.damage-sidebar-card:hover {
    border-color: rgba(79, 127, 179, 0.28);
    box-shadow: 0 16px 38px rgba(24, 39, 58, 0.09);
}

.damage-sidebar > section {
    position: relative;
    overflow: hidden;
}

.damage-sidebar input:not([type="checkbox"]),
.damage-sidebar select {
    border-color: #e0e6ed;
    background-color: #fbfcfe;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.damage-sidebar button,
.damage-buff-card,
.damage-mob-card {
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.damage-sidebar button:hover {
    transform: translateY(-1px);
}

.damage-buff-card {
    background: linear-gradient(135deg, #f7fbf9, #fbfcfd);
    box-shadow: 0 6px 18px rgba(31, 55, 74, 0.04);
}

.damage-buff-card:hover {
    border-color: rgba(45, 157, 112, 0.38);
    box-shadow: 0 8px 22px rgba(45, 157, 112, 0.08);
}

.damage-mob-card:hover {
    box-shadow: 0 7px 20px rgba(40, 61, 81, 0.07);
    transform: translateX(2px);
}

.damage-skill-panel {
    border-color: rgba(204, 213, 224, 0.9);
}

.damage-skill-head {
    background:
        linear-gradient(90deg, rgba(79, 127, 179, 0.09), rgba(79, 127, 179, 0) 48%),
        #fff;
}

.damage-skill-head h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 15px;
    margin-right: 8px;
    border-radius: 999px;
    background: var(--damage-accent);
    vertical-align: -2px;
}

.damage-skill-head .tw-w-full {
    width: auto;
    margin-left: auto;
}

.damage-table-wrap {
    scrollbar-color: rgba(79, 127, 179, 0.38) transparent;
}

.damage-table {
    border-collapse: separate;
    border-spacing: 0;
}

.damage-table thead {
    position: sticky;
    z-index: 2;
    top: 0;
    background: #f4f7fa;
}

.damage-table thead th {
    border-bottom: 1px solid #e6ebf0;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.damage-table thead th:first-child {
    position: sticky;
    z-index: 4;
    left: 0;
    min-width: 310px;
    background: #f4f7fa;
    box-shadow: 10px 0 18px -18px rgba(25, 41, 58, 0.65);
}

.damage-table tbody tr {
    background: #fff;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.damage-table tbody tr:nth-child(even) {
    background: #fcfdfe;
}

.damage-table tbody tr:hover {
    background: #f6faff;
    box-shadow: inset 3px 0 0 rgba(79, 127, 179, 0.55);
}

.damage-table td {
    vertical-align: middle;
}

.damage-table td:first-child {
    position: sticky;
    z-index: 1;
    left: 0;
    width: 310px;
    min-width: 310px;
    background: inherit;
    box-shadow: 10px 0 18px -18px rgba(25, 41, 58, 0.5);
}

.damage-table td:first-child > div > span:first-child {
    border-color: rgba(79, 127, 179, 0.18);
    background: linear-gradient(145deg, #fff, #f3f7fb);
    box-shadow: 0 5px 14px rgba(38, 55, 73, 0.08);
}

.damage-table-note {
    background:
        linear-gradient(90deg, rgba(79, 127, 179, 0.05), transparent 70%),
        #fbfcfd;
}

.damage-table-note code {
    border-radius: 4px;
    background: rgba(79, 127, 179, 0.08);
    padding: 2px 5px;
    color: #365f8b;
}

.damage-overview-panel {
    position: relative;
    overflow: hidden;
    border-color: rgba(204, 213, 224, 0.9);
    background:
        linear-gradient(rgba(79, 127, 179, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 127, 179, 0.035) 1px, transparent 1px),
        linear-gradient(145deg, #fff, #fbfcfe);
    background-size: 24px 24px, 24px 24px, auto;
}

.damage-overview-panel::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -92px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 93, 80, 0.1), transparent 68%);
    pointer-events: none;
}

.damage-overview-panel > .tw-grid {
    position: relative;
    z-index: 1;
}

.damage-overview-panel > .tw-grid > div {
    border: 1px solid rgba(222, 228, 235, 0.86);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 8px 20px rgba(37, 53, 70, 0.045);
}

.damage-overview-panel > .tw-grid > div:nth-child(1) {
    border-top: 2px solid rgba(79, 127, 179, 0.7);
}

.damage-overview-panel > .tw-grid > div:nth-child(2) {
    border-top: 2px solid rgba(232, 93, 80, 0.65);
}

.damage-overview-panel > .tw-grid > div:nth-child(3) {
    border-top: 2px solid rgba(215, 146, 63, 0.72);
}

.damage-overview-panel > .tw-mt-4 {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(5px);
}

.damage-ranking-panel {
    border-color: rgba(204, 213, 224, 0.9);
    background:
        radial-gradient(circle at 96% 2%, rgba(79, 127, 179, 0.09), transparent 26%),
        #fff;
}

.damage-ranking-tabs {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 6px 5px 10px;
    margin-right: 84px;
    border: 1px solid rgba(214, 222, 231, 0.9);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 18px rgba(35, 51, 68, 0.045);
}

.damage-ranking-panel > .tw-mt-4 > section {
    background: rgba(251, 252, 254, 0.72);
    box-shadow: 0 8px 24px rgba(35, 51, 68, 0.045);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.damage-ranking-panel > .tw-mt-4 > section:hover {
    border-color: rgba(79, 127, 179, 0.34);
    box-shadow: 0 12px 28px rgba(35, 51, 68, 0.075);
    transform: translateY(-1px);
}

.damage-ranking-panel i {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.damage-guide-panel {
    border-color: rgba(204, 213, 224, 0.9);
    background:
        linear-gradient(110deg, rgba(232, 93, 80, 0.055), transparent 34%),
        #fff;
}

.tw-dark .damage-page {
    --damage-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
}

.tw-dark .damage-hero__inner {
    background:
        radial-gradient(circle at 82% 18%, rgba(232, 93, 80, 0.14), transparent 28%),
        radial-gradient(circle at 62% 110%, rgba(79, 127, 179, 0.18), transparent 34%),
        linear-gradient(135deg, #171717, #1b2025 56%, #191616);
}

.tw-dark .damage-summary {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(16, 16, 16, 0.52);
}

.tw-dark .damage-summary > div:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tw-dark .damage-sidebar-card {
    border-color: #2a2a2a;
    background: linear-gradient(180deg, rgba(30, 35, 42, 0.72), transparent 180px), #171717;
}

.tw-dark .damage-sidebar input:not([type="checkbox"]),
.tw-dark .damage-sidebar select {
    border-color: #30343a;
    background-color: #1d1f22;
    box-shadow: none;
}

.tw-dark .damage-buff-card {
    background: linear-gradient(135deg, rgba(25, 44, 36, 0.54), rgba(255, 255, 255, 0.025));
}

.tw-dark .damage-skill-head {
    background: linear-gradient(90deg, rgba(79, 127, 179, 0.13), transparent 48%), #171717;
}

.tw-dark .damage-table thead {
    background: #202327;
}

.tw-dark .damage-table thead th {
    border-bottom-color: #30343a;
}

.tw-dark .damage-table thead th:first-child {
    background: #202327;
}

.tw-dark .damage-table tbody tr,
.tw-dark .damage-table tbody tr:nth-child(even) {
    background: #171717;
}

.tw-dark .damage-table tbody tr:nth-child(even) {
    background: #191b1e;
}

.tw-dark .damage-table tbody tr:hover {
    background: #20262d;
}

.tw-dark .damage-table td:first-child > div > span:first-child {
    border-color: rgba(255, 255, 255, 0.09);
    background: linear-gradient(145deg, #24272b, #17191b);
}

.tw-dark .damage-table-note {
    background: linear-gradient(90deg, rgba(79, 127, 179, 0.08), transparent 70%), #191919;
}

.tw-dark .damage-table-note code {
    background: rgba(79, 127, 179, 0.14);
    color: #9fc0e2;
}

.tw-dark .damage-overview-panel {
    border-color: #2a2a2a;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(145deg, #181a1d, #151515);
    background-size: 24px 24px, 24px 24px, auto;
}

.tw-dark .damage-overview-panel > .tw-grid > div,
.tw-dark .damage-overview-panel > .tw-mt-4 {
    border-color: #30343a;
    background: rgba(27, 29, 32, 0.84);
}

.tw-dark .damage-ranking-panel {
    border-color: #2a2a2a;
    background: radial-gradient(circle at 96% 2%, rgba(79, 127, 179, 0.12), transparent 26%), #171717;
}

.tw-dark .damage-ranking-tabs {
    border-color: #30343a;
    background: rgba(255, 255, 255, 0.035);
}

.tw-dark .damage-ranking-panel > .tw-mt-4 > section {
    background: rgba(255, 255, 255, 0.025);
}

.tw-dark .damage-guide-panel {
    border-color: #2a2a2a;
    background: linear-gradient(110deg, rgba(232, 93, 80, 0.07), transparent 34%), #171717;
}

@media (max-width: 760px) {
    .damage-hero__inner::after {
        display: none;
    }

    .damage-summary > div {
        min-height: 76px;
        padding: 10px;
    }

    .damage-summary .tw-text-2xl {
        font-size: 1.18rem;
    }

    .damage-skill-head .tw-w-full {
        width: 100%;
        margin-left: 0;
    }

    .damage-ranking-tabs {
        width: 100%;
        margin-right: 0;
        justify-content: space-between;
    }

}
