body.boss-page {
    --bm-accent: #ef4444;
    --bm-accent-soft: #fca5a5;
    --bm-card-bg: rgba(26, 26, 26, 0.96);
    --bm-title-bg: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(30, 30, 30, 0.9) 100%);
}

body.boss-page {
    background-image: url('/files/images/dominara-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
}

body.boss-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.88) 0%, rgba(40, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0.88) 100%);
    z-index: -1;
}

.boss-page .modern-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.boss-page .hero-section {
    background: var(--bm-title-bg);
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.boss-page .page-title-box {
    position: relative;
    z-index: 1;
}

.boss-page .hero-title {
    font-family: var(--dmnknd-heading-font, "Outfit", "Inter", system-ui, sans-serif) !important;
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.02em !important;
    margin: 0 !important;
    background: linear-gradient(90deg, #ef4444 0%, #fca5a5 50%, #ffffff 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

.boss-page .hero-subtitle {
    color: rgba(255, 255, 255, 0.75);
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
}

.bm-back-link { margin: 0.75rem 0 0; font-size: 0.85rem; }
.bm-back-link a { color: var(--bm-accent-soft); text-decoration: none; }
.bm-back-link a:hover { text-decoration: underline; }

.bm-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    max-width: 360px;
    padding: 0.85rem 1.1rem;
    border-radius: 0.75rem;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
}

.bm-toast--show { transform: translateY(0); opacity: 1; }
.bm-toast--error { border-color: rgba(239, 68, 68, 0.5); }
.bm-toast--success { border-color: rgba(34, 197, 94, 0.5); }

.bm-login-gate {
    text-align: center;
    padding: 2rem;
    margin-bottom: 1rem;
    background: var(--bm-card-bg);
    border-radius: 1rem;
    border: 1px dashed rgba(239, 68, 68, 0.35);
    color: rgba(255, 255, 255, 0.85);
}

.bm-dashboard {
    background: var(--bm-card-bg);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.bm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
}

.bm-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 0.6rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.bm-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.bm-tab--active {
    color: #fff;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
}

.bm-panel { padding: 1.25rem; }
.bm-panel[hidden] { display: none !important; }
.bm-loading { text-align: center; color: rgba(255, 255, 255, 0.55); padding: 2rem; }

/* ── Görseller ── */
.bm-img {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.45);
}

.bm-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.bm-img--empty {
    color: rgba(255, 255, 255, 0.35);
}

.bm-img--ana {
    width: min(100%, 320px);
    aspect-ratio: 1 / 1;
    max-height: none;
    min-height: 0;
    margin: 1.15rem auto 0;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    background: radial-gradient(circle at 50% 40%, rgba(220, 38, 38, 0.12), rgba(0, 0, 0, 0.55) 70%);
}

.bm-img--ana img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0.65rem;
    image-rendering: auto;
}

.bm-img--oda {
    width: 100%;
    height: 160px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bm-img--bilgi {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

/* ── Ana boss ── */
.bm-ana {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
}

.bm-ana__body { padding: 1.25rem 1.35rem 1.35rem; }

.bm-ana__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bm-ana__title {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.bm-ana__meta {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

/* ── Stat pill grid ── */
.bm-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.bm-stat-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.bm-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
}

.bm-stat__icon {
    line-height: 0;
    margin-bottom: 0.15rem;
}

.bm-stat__label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
}

.bm-stat__value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    word-break: break-word;
}

.bm-user-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bm-user-strip .bm-stat {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
}

/* ── HP bar ── */
.bm-hp { margin: 0.5rem 0; }

.bm-hp__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.bm-hp__title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.bm-hp__nums {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.bm-hp__bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.bm-hp__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444, #f97316);
    transition: width 0.35s ease;
}

/* ── Buttons & badges (etkinlik.css global button ezmesinden muaf) ── */
body.boss-page .modern-container button.bm-btn,
body.boss-page .modern-container button.bm-tab {
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
}

body.boss-page .modern-container button.bm-btn::before,
body.boss-page .modern-container button.bm-tab::before {
    content: none;
    display: none;
}

.bm-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.bm-actions--full .bm-btn { width: 100%; }

.bm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.2rem;
    border-radius: 0.6rem;
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s, opacity 0.12s;
}

.bm-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.bm-btn--attack {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.bm-btn--attack:not(:disabled):hover { transform: translateY(-1px); }
.bm-btn--attack:not(:disabled):active { transform: scale(0.97); }
.bm-btn--primary { background: #5865f2; color: #fff; text-decoration: none; }

.bm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.bm-badge--ok { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.bm-badge--wait { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.bm-badge--off { background: rgba(107, 114, 128, 0.25); color: #d1d5db; }
.bm-badge--live { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }

.bm-level-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
}

.bm-muted {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ── Sıralama ── */
.bm-rank {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bm-rank__title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

.bm-rank--fold { margin-top: 0.75rem; padding-top: 0; border-top: none; }
.bm-rank--fold .bm-rank__title { cursor: pointer; list-style: none; margin-bottom: 0; }
.bm-rank--fold summary::-webkit-details-marker { display: none; }
.bm-rank--fold[open] .bm-rank__title { margin-bottom: 0.65rem; }

.bm-rank__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bm-rank__list li {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
}

.bm-rank__pos { font-weight: 700; color: rgba(255, 255, 255, 0.45); }
.bm-rank__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-rank__dmg { font-weight: 700; font-variant-numeric: tabular-nums; color: #fca5a5; }

/* ── Oda boss grid ── */
.bm-oda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.bm-oda-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bm-oda-card--active {
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12);
}

.bm-oda-card__body {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bm-oda-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.bm-oda-card__head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.bm-oda-boss-name {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fca5a5;
}

.bm-oda-status {
    margin: 0.5rem 0 0;
    text-align: center;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.bm-oda-my-dmg { margin-top: 0.65rem; text-align: center; }

.bm-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Ana boss — boss yokken */
.bm-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 240px;
    padding: 2.5rem 1.5rem;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

.bm-idle__icon {
    line-height: 0;
    margin-bottom: 0.35rem;
    opacity: 0.85;
}

.bm-idle__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.bm-idle__sub {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.bm-idle__badge {
    margin-top: 0.35rem;
}

/* ── Bilgilendirme tablosu ── */
.bm-bilgi-intro {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.bm-bilgi-intro p { margin: 0; }

.bm-bilgi-scroll {
    overflow-x: auto;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bm-bilgi-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.bm-bilgi-table thead {
    background: rgba(0, 0, 0, 0.45);
}

.bm-bilgi-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
    white-space: nowrap;
}

.bm-th-label {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    line-height: 1;
}

.bm-th-label .dc-emoji {
    flex-shrink: 0;
    vertical-align: middle;
}

.bm-th-label > span {
    line-height: 1.2;
}

.bm-bilgi-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.88);
    vertical-align: middle;
}

.bm-bilgi-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.bm-bilgi-table tbody tr:last-child td { border-bottom: none; }

.bm-bilgi-td-lv { width: 3.5rem; text-align: center; }

.bm-lv-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    font-weight: 800;
    font-size: 0.9rem;
}

.bm-bilgi-td-boss {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 180px;
}

.bm-bilgi-td-boss strong {
    display: block;
    color: #fff;
    font-size: 0.92rem;
}

.bm-bilgi-td-num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
}

.dc-emoji { vertical-align: -0.15em; flex-shrink: 0; }

@media (min-width: 768px) {
    .bm-img--ana {
        width: min(100%, 380px);
    }
}

@media (max-width: 640px) {
    .bm-ana__head { flex-direction: column; align-items: flex-start; }
    .bm-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .bm-oda-grid { grid-template-columns: 1fr; }
}
