
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

#chronos-raid-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #08081a;
    z-index: 20000;
    display: none;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    color: white;
    font-family: 'Noto Sans KR', sans-serif;
}

.raid-background-fx {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(74, 25, 112, 0.5) 0%, rgba(0, 0, 0, 1) 70%);
    opacity: 0.8;
    animation: backgroundPulse 10s infinite alternate;
}

@keyframes backgroundPulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

#raid-header {
    width: 100%;
    padding: 15px;
    text-align: center;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#raid-title {
    font-size: 2em;
    font-weight: bold;
    color: #b388ff;
    text-shadow: 0 0 10px #b388ff;
}

#raid-phase-info {
    font-size: 1.2em;
    margin-top: 5px;
    color: #ffcc00;
}

#raid-boss-hp-container {
    width: 60%;
    height: 30px;
    background-color: #333;
    border-radius: 15px;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
    border: 2px solid #b388ff;
    margin-left: auto;
    margin-right: auto;
}

#raid-boss-hp-bar {
    height: 100%;
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    transition: width 0.05s linear;
    width: 100%;
}

#raid-boss-hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1em;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
}

#raid-phase-timer {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5em;
    font-weight: bold;
    color: white;
    z-index: 3;
    text-shadow: 2px 2px 5px black;
    transition: color 0.3s;
}

#timer-gauge-container {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 20px;
    background-color: rgba(50, 50, 50, 0.8);
    border-radius: 10px;
    overflow: hidden;
    z-index: 3;
    display: none;
}

#timer-gauge-bar {
    height: 100%;
    transition: width 0.1s linear, background-color 0.3s;
    background-color: #4caf50;
    width: 100%;
}

#raid-participant-list {
    position: absolute;
    top: 160px;
    left: 10px;
    width: 220px;
    height: calc(100% - 180px);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 15px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#raid-participant-list h3 {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #b388ff;
    padding-bottom: 10px;
    font-size: 1.2em;
}

#participant-list-container {
    flex-grow: 1;
    overflow-y: auto;
}

.participant-entry {
    padding: 6px 0;
    font-size: 0.95em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.participant-status {
    font-weight: bold;
    font-size: 0.85em;
    padding: 2px 5px;
    border-radius: 4px;
}
.status-cursed { background-color: #ff3b30; color: white; }
.status-stunned { background-color: #ffcc00; color: black; }
.status-decoder { background-color: #00ff00; color: black; }
.status-lost { background-color: #999999; color: white; }

#raid-arena {
    position: relative;
    width: 100%;
    flex-grow: 1;
    margin: 10px 0;
    z-index: 1;
}

.raid-player {
    position: absolute;
    color: white;
    font-weight: bold;
    white-space: nowrap;
    transition: top 0.05s linear, left 0.05s linear, opacity 0.3s, filter 0.3s;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.player-name {
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    font-size: 1.1em;
}

.raid-player.cursed .player-name {
    color: #ff3b30;
    text-shadow: 0 0 8px #ff3b30;
    border: 3px solid #4a1a4c;
    background-color: rgba(10, 0, 10, 0.7);
    position: relative;
    z-index: 14;
}

.raid-player.cursed {
    position: relative;
    padding-bottom: 25px;
}
.raid-player.cursed::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 120px;
    height: 120px;
    transform: translateX(-50%);
    background-image: url('/image/curse_shackles.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    animation: cursedPulse 1.5s infinite alternate ease-in-out;
    z-index: 155;
}

.raid-player.cursed .player-name {
    position: relative;
    z-index: 16;
    margin-top: 35px;
}

@keyframes cursedPulse {
    from {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.attack-fx {
    position: absolute;
    width: 100px;
    height: 120px;
    background-color: rgba(255, 165, 0, 0.7);
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.raid-player.attacking .attack-fx {
    animation: attackFade 0.3s forwards;
}

@keyframes attackFade {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.2); }
}

.raid-player[data-direction="up"] .attack-fx {
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, 0);
}
.raid-player[data-direction="down"] .attack-fx {
    top: 100%;
    left: 50%;
    transform: translate(-50%, 0);
}
.raid-player[data-direction="left"] .attack-fx {
    width: 120px;
    height: 100px;
    right: 100%;
    top: 50%;
    transform: translate(0, -50%);
}
.raid-player[data-direction="right"] .attack-fx {
    width: 120px;
    height: 100px;
    left: 100%;
    top: 50%;
    transform: translate(0, -50%);
}

.bullet {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #00ff99;
    border-radius: 50%;
    box-shadow: 0 0 15px #00ff99;
    transform: translate(-50%, -50%);
    z-index: 5;
    transition: top 0.05s linear, left 0.05s linear;
    pointer-events: none;
}

.raid-boss {
    position: absolute;
    width: 200px;
    height: 200px;
    background-color: #6a0dad;
    border: 5px solid #b388ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    transform: translate(-50%, -50%);
    z-index: 8;
    transition: top 0.05s linear, left 0.05s linear;
    pointer-events: none;
}
.raid-boss::after {
    content: "크로노스";
}

.player-rescue-status {
    font-size: 0.9em;
    color: #ff9500;
    margin-top: 3px;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
}

.player-buffs {
    display: flex;
    gap: 5px;
    margin-top: 3px;
}

.buff-icon {
    font-size: 1em;
    padding: 2px 5px;
    border-radius: 3px;
}

.buff-light { background-color: #ffff99; color: black; box-shadow: 0 0 8px #ffff99; }
.buff-dark { background-color: #9933ff; color: white; box-shadow: 0 0 8px #9933ff; }

#raid-announcement {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2em;
    font-weight: bold;
    color: #ffcc00;
    text-shadow: 0 0 15px #ffcc00, 0 0 5px black;
    z-index: 20;
    padding: 25px 50px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    display: none;
    text-align: center;
    max-width: 80%;
    animation: announcementFade 5s ease-out forwards;
}

.boss-dialogue {
    color: #b388ff;
    font-style: italic;
    margin-bottom: 15px;
    font-size: 1.1em;
}

@keyframes announcementFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    90% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

#ddr-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    display: none;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    padding: 30px 50px;
    border-radius: 20px;
    box-shadow: 0 0 30px #b388ff;
}

#ddr-timer-container {
    width: 400px;
    height: 25px;
    background-color: #555;
    border-radius: 15px;
    margin-bottom: 25px;
    overflow: hidden;
}

#ddr-timer {
    height: 100%;
    transition: width 0.05s linear, background-color 0.3s;
    background-color: #ffcc00;
    width: 100%;
}

#ddr-sequence {
    display: flex;
    gap: 20px;
}

.ddr-arrow {
    font-size: 4.5em;
    opacity: 0.5;
    transition: opacity 0.1s, transform 0.1s;
    background: #555;
    padding: 15px;
    border-radius: 15px;
}

.ddr-arrow.active {
    opacity: 1;
    transform: scale(1.2);
    color: #00ff00;
    background: #228822;
    box-shadow: 0 0 15px #00ff00;
}

.ddr-arrow.fail {
    opacity: 1;
    transform: scale(0.8);
    color: #ff0000;
    background: #882222;
}

#dark-altar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background-image: url('/image/dark_altar.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-weight: bold;
    box-shadow: none;
    cursor: pointer;
    z-index: 9;
}

.abyssal-wraith {
    position: absolute;
    border-radius: 50%;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: top 0.05s linear, left 0.05s linear, transform 0.2s;
    transform: translate(-50%, -50%);
    z-index: 7;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
}

.wraith-hp {
    position: absolute;
    bottom: -20px;
    font-weight: bold;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 1em;
    text-shadow: none;
}

@keyframes flashRed {
    0% { filter: brightness(1); }
    50% { filter: brightness(2) sepia(1) hue-rotate(-50deg) saturate(5); }
    100% { filter: brightness(1); }
}

.wraith-normal {
    background-image: url('/image/wraith_normal.png');
    width: 90px;
    height: 90px;
}

.decoder-highlight .player-name {
    border: 3px solid #00ff00 !important;
    box-shadow: 0 0 20px #00ff00 !important;
    color: #00ff00 !important;
}

#simon-says-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    display: none;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
}

#simon-says-status {
    font-size: 1.5em;
    margin-bottom: 25px;
    text-align: center;
}

#simon-says-board {
    display: grid;
    grid-template-columns: 130px 130px;
    grid-template-rows: 130px 130px;
    gap: 20px;
}

.simon-button {
    width: 130px;
    height: 130px;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.1s;
    user-select: none;
}

#simon-red { background-color: red; border-top-left-radius: 130px; }
#simon-blue { background-color: blue; border-top-right-radius: 130px; }
#simon-green { background-color: green; border-bottom-left-radius: 130px; }
#simon-yellow { background-color: yellow; border-bottom-right-radius: 130px; }

.simon-button.active {
    opacity: 1;
    box-shadow: 0 0 30px white;
}

.p6-quadrant {
    position: absolute;
    width: 50%;
    height: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
    pointer-events: none;
}

.p6-NW { top: 0; left: 0; }
.p6-NE { top: 0; right: 0; }
.p6-SW { bottom: 0; left: 0; }
.p6-SE { bottom: 0; right: 0; }

.p6-platform {
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: url('/image/platform_inactive.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    transition: background-image 0.3s;
    pointer-events: none;
}

.p6-platform.active {
    background-image: url('/image/platform_success.png');
}

.p6-platform.p6-NW { top: 25%; left: 25%; transform: translate(-50%, -50%); }
.p6-platform.p6-NE { top: 25%; left: 75%; transform: translate(-50%, -50%); }
.p6-platform.p6-SW { top: 75%; left: 25%; transform: translate(-50%, -50%); }
.p6-platform.p6-SE { top: 75%; left: 75%; transform: translate(-50%, -50%); }

.player-red .player-name { border: 3px solid #ff4d4d; color: #ff4d4d; text-shadow: 0 0 5px #ff4d4d; }
.player-blue .player-name { border: 3px solid #4d4dff; color: #4d4dff; text-shadow: 0 0 5px #4d4dff; }

#p5-ui-container {
    position: absolute;
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 10px;
    z-index: 15;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.p5-part1-ui {
    display: flex;
    gap: 50px;
    font-size: 1.5em;
    font-weight: bold;
}
.p5-score {
    display: flex;
    align-items: center;
    gap: 10px;
}
#p5-score-light { color: #ffff99; }
#p5-score-dark { color: #9933ff; }

.p5-part2-ui {
    display: flex;
    gap: 50px;
    align-items: flex-end;
    height: 120px;
}
.p5-size-gauge {
    width: 80px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
}
.p5-size-bar {
    width: 100%;
    transition: height 0.3s ease-in-out, background-color 0.3s;
}
#p5-size-light-bar { background-color: #ffff99; }
#p5-size-dark-bar { background-color: #9933ff; }

.p8-core {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    animation: corePulse 3s infinite alternate;
    z-index: 5;
    transform: translate(-50%, -50%) scale(var(--core-scale, 1));
    transition: transform 0.5s ease-in-out;
}

@keyframes corePulse {
    from { box-shadow: 0 0 30px currentColor; }
    to { box-shadow: 0 0 60px currentColor; }
}

.core-light {
    top: 50%;
    left: 12.5%;
    background-color: #ffff99;
    color: #ffff99;
}
.core-dark {
    top: 50%;
    left: 87.5%;
    background-color: #9933ff;
    color: #9933ff;
}

.essence {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    animation: essenceFloat 2s infinite alternate;
    user-select: none;
    transform: translate(-50%, -50%);
    z-index: 5;
    transition: top 0.05s linear, left 0.05s linear;
    pointer-events: none;
}

@keyframes essenceFloat {
    from { transform: translate(-50%, -50%) translateY(0px); }
    to { transform: translate(-50%, -50%) translateY(-15px); }
}

.essence-light {
    background-image: url('/image/essence_light.png');
    background-color: transparent;
    box-shadow: none;
    background-size: contain;
    background-repeat: no-repeat;
}

.essence-dark {
    background-image: url('/image/essence_dark.png');
    background-color: transparent;
    box-shadow: none;
    background-size: contain;
    background-repeat: no-repeat;
}

.player-stunned {
    animation: stunShake 0.5s infinite;
    filter: grayscale(50%);
}

.player-stunned .player-name {
    color: #ffcc00 !important;
    border: 2px solid #ffcc00 !important;
}

@keyframes stunShake {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-50%, -50%) rotate(-5deg); }
    75% { transform: translate(-50%, -50%) rotate(5deg); }
}

#raid-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 25000;
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
}

.raid-result-content {
    background: #1c1f2d;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: calc(900px * var(--ui-scale-modal-size));
    max-height: 90%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px #b388ff;
}

#raid-result-title {
    font-size: 3em;
    text-align: center;
    margin-bottom: 20px;
}

.raid-result-success { color: #00ff00; text-shadow: 0 0 10px #00ff00; }
.raid-result-fail { color: #ff0000; text-shadow: 0 0 10px #ff0000; }

#raid-contribution-ranking {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th, .ranking-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #444;
}

.ranking-table th {
    background-color: #333;
    font-size: 1.2em;
}

.ranking-table tr:hover {
    background-color: #2a2d3d;
}

.rank-1 td { background-color: rgba(255, 215, 0, 0.2); }
.rank-2 td { background-color: rgba(192, 192, 192, 0.2); }
.rank-3 td { background-color: rgba(205, 127, 50, 0.2); }

#raid-result-close-btn {
    align-self: center;
    padding: 15px 40px;
    font-size: 1.5em;
    background-color: #b388ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#participant-list-container::-webkit-scrollbar { width: 8px; }
#participant-list-container::-webkit-scrollbar-track { background: transparent; }
#participant-list-container::-webkit-scrollbar-thumb { background: #666; border-radius: 4px; }
#participant-list-container::-webkit-scrollbar-thumb:hover { background: #888; }

#hard-raid-modal {
    --hr-bg-deep: #0d0f18;
    --hr-bg-panel: rgba(18, 20, 35, 0.92);
    --hr-bg-surface: rgba(30, 33, 58, 0.6);
    --hr-bg-card: rgba(22, 25, 45, 0.7);
    --hr-accent: #b388ff;
    --hr-accent-dim: rgba(179, 136, 255, 0.15);
    --hr-accent-glow: rgba(179, 136, 255, 0.4);
    --hr-gold: #ffd700;
    --hr-gold-dim: rgba(255, 215, 0, 0.12);
    --hr-gold-glow: rgba(255, 215, 0, 0.35);
    --hr-hp-start: #e53935;
    --hr-hp-end: #ff7043;
    --hr-hp-glow: rgba(229, 57, 53, 0.5);
    --hr-barrier: #42a5f5;
    --hr-barrier-end: #90caf9;
    --hr-green: #66bb6a;
    --hr-green-dim: rgba(102, 187, 106, 0.15);
    --hr-shield: #7e57c2;
    --hr-text: #e8eaf6;
    --hr-text-muted: #7a7da0;
    --hr-border: rgba(179, 136, 255, 0.12);
    --hr-border-active: rgba(179, 136, 255, 0.35);
    --hr-danger: #ef5350;
    --hr-danger-dim: rgba(239, 83, 80, 0.12);
    z-index: 15000;
    font-family: 'Noto Sans KR', sans-serif;
}

#hard-raid-modal > .modal-content.hard-raid-content {
    background: var(--hr-bg-deep);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(179, 136, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(66, 165, 245, 0.04) 0%, transparent 50%);
    border: 1px solid var(--hr-border);
    border-radius: 16px;
    width: 92%;
    max-width: calc(500px * var(--ui-scale-modal-size));
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    color: var(--hr-text);
    backdrop-filter: blur(24px);
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: max-width 0.3s ease, width 0.3s ease, height 0.3s ease;
    box-shadow:
        0 0 0 1px rgba(179, 136, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

#hard-raid-modal > .modal-content.hard-raid-content.battle-mode {
    width: 95%;
    max-width: calc(960px * var(--ui-scale-modal-size));
    height: 88vh;
    max-height: 88vh;
    overflow: hidden;
}
#hard-raid-modal > .modal-content.hard-raid-content::-webkit-scrollbar { width: 4px; }
#hard-raid-modal > .modal-content.hard-raid-content::-webkit-scrollbar-track { background: transparent; }
#hard-raid-modal > .modal-content.hard-raid-content::-webkit-scrollbar-thumb { background: rgba(179,136,255,0.2); border-radius: 2px; }

.hard-raid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--hr-border);
    background: linear-gradient(180deg, rgba(179,136,255,0.04) 0%, transparent 100%);
}

.hard-raid-header h2 {
    margin: 0;
    font-size: calc(16px * var(--ui-scale-modal-body));
    font-weight: 700;
    color: var(--hr-accent);
    letter-spacing: 0.5px;
}

.hard-raid-close {
    background: none;
    border: none;
    color: var(--hr-text-muted);
    font-size: calc(20px * var(--ui-scale-modal-body));
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.hard-raid-close:hover {
    color: var(--hr-text);
    background: rgba(255,255,255,0.06);
}

.raid-mode-selector {
    display: flex;
    position: relative;
    padding: 10px 16px 0;
    gap: 4px;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 100%);
}

.raid-mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    color: var(--hr-text-muted);
    font-size: calc(14px * var(--ui-scale-modal-body));
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.raid-mode-tab .raid-mode-icon {
    font-size: calc(16px * var(--ui-scale-modal-body));
    transition: transform 0.3s ease;
}

.raid-mode-tab:hover {
    color: var(--hr-text);
    background: rgba(255,255,255,0.03);
}

.raid-mode-tab.active {
    color: var(--hr-accent);
    background: var(--hr-bg-surface);
    border-color: var(--hr-border-active);
    border-bottom-color: var(--hr-bg-surface);
}

.raid-mode-tab.active .raid-mode-icon {
    transform: scale(1.15);
}

.raid-mode-tab[data-mode="hard"].active {
    color: #ef5350;
    border-color: rgba(239, 83, 80, 0.35);
    background: rgba(239, 83, 80, 0.08);
    border-bottom-color: rgba(239, 83, 80, 0.08);
}

.raid-mode-indicator {
    position: absolute;
    bottom: 0;
    left: 16px;
    width: calc(50% - 18px);
    height: 2px;
    background: var(--hr-accent);
    border-radius: 2px 2px 0 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px var(--hr-accent-glow);
}

.raid-mode-indicator.hard {
    left: calc(50% + 2px);
    background: #ef5350;
    box-shadow: 0 0 8px rgba(239, 83, 80, 0.5);
}

.raid-mode-content {
    display: none;
}
.raid-mode-content.active {
    display: block;
}

#raid-normal-tab {
    padding: 18px;
}

.normal-raid-info {
    background: var(--hr-bg-surface);
    border: 1px solid var(--hr-border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}

.normal-raid-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.normal-raid-info .info-row + .info-row {
    border-top: 1px solid rgba(255,255,255,0.04);
}

.normal-raid-info .info-label {
    font-size: calc(13px * var(--ui-scale-modal-body));
    color: var(--hr-text-muted);
    font-weight: 500;
}

.normal-raid-info .info-value {
    font-size: calc(14px * var(--ui-scale-modal-body));
    color: var(--hr-text);
    font-weight: 600;
}

.normal-raid-info .info-value.has-entries {
    color: var(--hr-green);
}

.normal-raid-info .info-value.no-entries {
    color: var(--hr-danger);
}

.normal-raid-desc {
    background: rgba(179,136,255,0.05);
    border: 1px solid rgba(179,136,255,0.1);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
    font-size: calc(12px * var(--ui-scale-modal-body));
    line-height: 1.6;
    color: var(--hr-text-muted);
}

.normal-raid-start-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: calc(15px * var(--ui-scale-modal-body));
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3);
}

.normal-raid-start-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.4);
}

.normal-raid-start-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hard-raid-tabs {
    display: flex;
    border-bottom: 1px solid var(--hr-border);
    background: rgba(0,0,0,0.15);
}

.hard-raid-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--hr-text-muted);
    font-size: calc(13px * var(--ui-scale-modal-body));
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.hard-raid-tab:hover {
    color: var(--hr-text);
    background: rgba(179,136,255,0.03);
}
.hard-raid-tab.active {
    color: var(--hr-accent);
    border-bottom-color: var(--hr-accent);
    background: var(--hr-accent-dim);
}

.hard-raid-tab-content {
    display: none;
    padding: 18px;
}
.hard-raid-tab-content.active { display: block; }

.hard-raid-solo-info {
    background: var(--hr-bg-surface);
    border: 1px solid var(--hr-border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 14px;
}
.hard-raid-solo-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: calc(13px * var(--ui-scale-modal-body));
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.hard-raid-solo-info .info-row:last-child { border-bottom: none; }
.hard-raid-solo-info .info-label { color: var(--hr-text-muted); }
.hard-raid-solo-info .info-value { color: var(--hr-text); font-weight: 600; }
.hard-raid-solo-info .info-value.qualified { color: var(--hr-green); }
.hard-raid-solo-info .info-value.not-qualified { color: var(--hr-danger); }

.hard-raid-start-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: calc(15px * var(--ui-scale-modal-body));
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    transition: all 0.3s;
    margin-top: 10px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}
.hard-raid-start-btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
}
.hard-raid-start-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: rgba(100,100,120,0.3);
}

.hard-raid-create-party-btn {
    width: 100%;
    padding: 12px;
    border: 1px dashed var(--hr-border-active);
    border-radius: 10px;
    background: var(--hr-accent-dim);
    color: var(--hr-accent);
    font-size: calc(13px * var(--ui-scale-modal-body));
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 14px;
    transition: all 0.2s;
}
.hard-raid-create-party-btn:hover {
    background: rgba(179,136,255,0.2);
    border-style: solid;
}

.party-list-section { margin-bottom: 14px; }
.party-list-section h4 {
    color: var(--hr-text-muted);
    font-size: calc(11px * var(--ui-scale-modal-body));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.party-card {
    background: var(--hr-bg-card);
    border: 1px solid var(--hr-border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
}
.party-card:hover { border-color: var(--hr-border-active); }
.party-card-info { font-size: calc(12px * var(--ui-scale-modal-body)); }
.party-card-info .party-name { color: var(--hr-text); font-weight: 600; }
.party-card-info .party-detail { color: var(--hr-text-muted); font-size: calc(11px * var(--ui-scale-modal-body)); margin-top: 3px; }

.party-join-btn {
    padding: 7px 14px;
    border: 1px solid var(--hr-border-active);
    border-radius: 8px;
    background: var(--hr-accent-dim);
    color: var(--hr-accent);
    font-size: calc(12px * var(--ui-scale-modal-body));
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.party-join-btn:hover {
    background: rgba(179,136,255,0.25);
}

.party-waiting-room {
    background: var(--hr-bg-surface);
    border: 1px solid var(--hr-border);
    border-radius: 12px;
    padding: 18px;
}
.party-member-card {
    background: var(--hr-bg-card);
    border: 1px solid var(--hr-border);
    border-radius: 8px;
    padding: 11px 14px;
    margin-bottom: 6px;
    transition: border-color 0.2s;
}
.party-member-card.leader { border-color: var(--hr-gold-glow); }
.party-member-name { font-weight: 600; color: var(--hr-text); font-size: calc(13px * var(--ui-scale-modal-body)); }
.party-member-name .leader-badge { color: var(--hr-gold); font-size: calc(11px * var(--ui-scale-modal-body)); margin-right: 3px; }
.party-member-stats { color: var(--hr-text-muted); font-size: calc(11px * var(--ui-scale-modal-body)); margin-top: 3px; }

.party-reward-info {
    text-align: center;
    color: var(--hr-accent);
    font-size: calc(12px * var(--ui-scale-modal-body));
    margin: 12px 0;
    padding: 8px;
    background: var(--hr-accent-dim);
    border-radius: 8px;
    border: 1px solid rgba(179,136,255,0.1);
}

.party-action-btns {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.party-action-btns button {
    flex: 1;
    padding: 11px;
    border-radius: 10px;
    border: none;
    font-size: calc(13px * var(--ui-scale-modal-body));
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.party-action-btns button:hover { opacity: 0.85; }

.hard-raid-ranking-section { margin-bottom: 18px; }
.hard-raid-ranking-section h4 {
    color: var(--hr-accent);
    font-size: calc(12px * var(--ui-scale-modal-body));
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--hr-border);
    letter-spacing: 0.3px;
}

.hr-ranking-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--hr-bg-card);
    border-radius: 8px;
    margin-bottom: 3px;
    font-size: calc(12px * var(--ui-scale-modal-body));
    border: 1px solid transparent;
    transition: border-color 0.15s;
}
.hr-ranking-entry:hover { border-color: var(--hr-border); }
.hr-ranking-entry .rank { color: var(--hr-accent); font-weight: 700; width: 28px; }
.hr-ranking-entry .rank-name { color: var(--hr-text); flex: 1; }
.hr-ranking-entry .rank-floor { color: var(--hr-gold); font-weight: 600; }
.hr-ranking-entry .rank-power { color: var(--hr-text-muted); font-size: calc(11px * var(--ui-scale-modal-body)); margin-left: 8px; }

.hr-ranking-entry:nth-child(2) .rank { color: var(--hr-gold); }
.hr-ranking-entry:nth-child(2) { background: linear-gradient(135deg, rgba(255,215,0,0.06) 0%, var(--hr-bg-card) 100%); }
.hr-ranking-entry:nth-child(3) .rank { color: #b0bec5; }
.hr-ranking-entry:nth-child(4) .rank { color: #cd7f32; }

.hard-raid-mini-ranking { margin-top: 16px; }
.hard-raid-mini-ranking h4 {
    font-size: calc(11px * var(--ui-scale-modal-body));
    color: var(--hr-text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.mini-ranking-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    font-size: calc(11px * var(--ui-scale-modal-body));
    background: var(--hr-bg-card);
    border-radius: 6px;
    margin-bottom: 2px;
}
.mini-ranking-entry .rank { color: var(--hr-accent); font-weight: 700; width: 22px; }
.mini-ranking-entry .name { color: #c5cae9; flex: 1; }
.mini-ranking-entry .floor { color: var(--hr-gold); }
.mini-ranking-entry .power { color: var(--hr-text-muted); margin-left: 6px; }

#hr-battle-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.hr-battle-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(180deg, rgba(179,136,255,0.08) 0%, rgba(13,15,24,0.95) 100%);
    border-bottom: 1px solid var(--hr-border);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}
.hr-battle-top-bar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hr-accent-glow), transparent);
}
.hr-battle-floor {
    font-size: calc(14px * var(--ui-scale-modal-body));
    font-weight: 700;
    color: var(--hr-text);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.hr-battle-gold {
    font-size: calc(14px * var(--ui-scale-modal-body));
    color: var(--hr-gold);
    font-weight: 700;
    text-shadow: 0 0 8px var(--hr-gold-dim);
}

.hr-battle-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 4px;
    padding: 4px;
}

.hr-section-title {
    font-size: calc(11px * var(--ui-scale-modal-body));
    font-weight: 700;
    color: var(--hr-accent);
    letter-spacing: 1px;
    padding: 0 0 4px 2px;
    border-bottom: 1px solid var(--hr-border);
    margin-bottom: 6px;
}

.hr-battle-left {
    grid-column: 1;
    grid-row: 1;
    background: var(--hr-bg-panel);
    border: 1px solid var(--hr-border);
    border-radius: 10px;
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}
.hr-battle-left::-webkit-scrollbar { width: 3px; }
.hr-battle-left::-webkit-scrollbar-track { background: transparent; }
.hr-battle-left::-webkit-scrollbar-thumb { background: rgba(179,136,255,0.15); border-radius: 2px; }

.hr-battle-right {
    grid-column: 2;
    grid-row: 1;
    background: var(--hr-bg-panel);
    border: 1px solid var(--hr-border);
    border-radius: 10px;
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
}
.hr-battle-right::-webkit-scrollbar { width: 3px; }
.hr-battle-right::-webkit-scrollbar-track { background: transparent; }
.hr-battle-right::-webkit-scrollbar-thumb { background: rgba(179,136,255,0.15); border-radius: 2px; }

.hr-battle-bottom {
    grid-column: 1 / -1;
    grid-row: 2;
    background: var(--hr-bg-panel);
    border: 1px solid var(--hr-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hr-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--hr-border);
    flex-shrink: 0;
}

.hr-log-header .hr-section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.hr-boss-section {
    padding: 10px;
    background:
        linear-gradient(160deg, rgba(229,57,53,0.06) 0%, rgba(13,15,24,0.9) 40%, rgba(66,165,245,0.04) 100%);
    border-radius: 8px;
    border: 1px solid rgba(229,57,53,0.1);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.hr-boss-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(229,57,53,0.25), transparent);
}
.hr-boss-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, rgba(229,57,53,0.02));
    pointer-events: none;
}
.hr-boss-section.hit-flash {
    box-shadow:
        0 0 30px rgba(229,57,53,0.3),
        inset 0 0 30px rgba(229,57,53,0.08);
    border-color: rgba(229,57,53,0.4);
}

.hr-boss-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.hr-boss-name {
    font-size: calc(16px * var(--ui-scale-modal-body));
    font-weight: 800;
    color: var(--hr-text);
    letter-spacing: 0.6px;
    animation: hrBossNameBreathe 4s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(229,57,53,0.15);
}
@keyframes hrBossNameBreathe {
    0%, 100% { text-shadow: 0 0 20px rgba(229,57,53,0.15); }
    50% { text-shadow: 0 0 30px rgba(229,57,53,0.3), 0 0 60px rgba(229,57,53,0.1); }
}

.hr-boss-abilities {
    display: flex;
    gap: 6px;
    font-size: calc(16px * var(--ui-scale-modal-body));
}
.hr-boss-ability {
    opacity: 0.2;
    cursor: default;
    transition: opacity 0.4s, filter 0.4s, transform 0.3s;
    filter: grayscale(100%);
}
.hr-boss-ability.active {
    opacity: 1;
    filter: none;
    animation: hrAbilityPulse 2s ease-in-out infinite;
}
@keyframes hrAbilityPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hr-boss-hp-container, .hr-boss-barrier-container {
    height: 28px;
    border-radius: 6px;
    background: rgba(0,0,0,0.6);
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.hr-boss-hp-bar {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #c62828, var(--hr-hp-start), var(--hr-hp-end));
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 0 14px var(--hr-hp-glow);
}
.hr-boss-hp-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: hrHpShimmer 3s ease-in-out infinite;
}
.hr-boss-hp-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

@keyframes hrHpShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.hr-boss-hp-bar.pulse-fast { animation: hrHpPulse 0.5s ease-in-out infinite; }
.hr-boss-hp-bar.pulse-med { animation: hrHpPulse 1s ease-in-out infinite; }
.hr-boss-hp-bar.pulse-slow { animation: hrHpBreathe 3s ease-in-out infinite; }

@keyframes hrHpPulse {
    0%, 100% { box-shadow: 0 0 14px var(--hr-hp-glow); }
    50% { box-shadow: 0 0 24px var(--hr-hp-glow), 0 0 6px var(--hr-hp-glow) inset; }
}
@keyframes hrHpBreathe {
    0%, 100% { box-shadow: 0 0 10px rgba(229,57,53,0.25); }
    50% { box-shadow: 0 0 18px rgba(229,57,53,0.4); }
}

.hr-boss-hp-text, .hr-boss-barrier-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: calc(11px * var(--ui-scale-modal-body));
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.5);
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.hr-boss-barrier-bar {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #1565c0, var(--hr-barrier), var(--hr-barrier-end));
    transition: width 0.3s ease;
    box-shadow: 0 0 12px rgba(66,165,245,0.35);
    position: relative;
}
.hr-boss-barrier-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: hrHpShimmer 4s ease-in-out infinite;
}
.hr-boss-barrier-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

.hr-boss-stats {
    display: flex;
    gap: 16px;
    font-size: calc(11px * var(--ui-scale-modal-body));
    color: var(--hr-text-muted);
    margin-top: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.hr-effects-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.hr-damage-popup {
    position: absolute;
    font-weight: 800;
    pointer-events: none;
    z-index: 55;
    white-space: nowrap;
    font-feature-settings: 'tnum';
    text-rendering: optimizeLegibility;
    will-change: transform, opacity;
}

.hr-damage-popup.player-dmg {
    color: #ddd;
    font-size: calc(16px * var(--ui-scale-modal-body));
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.5);
    animation: hrDmgFloat 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hr-damage-popup.player-dmg.crit {
    color: var(--hr-gold);
    font-size: calc(26px * var(--ui-scale-modal-body));
    text-shadow:
        0 0 12px var(--hr-gold-glow),
        0 0 24px rgba(255,215,0,0.2),
        0 2px 6px rgba(0,0,0,0.8);
    animation: hrCritFloat 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    filter: drop-shadow(0 0 4px rgba(255,215,0,0.4));
}

.hr-damage-popup.boss-dmg {
    color: var(--hr-danger);
    font-size: calc(15px * var(--ui-scale-modal-body));
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 10px rgba(239,83,80,0.3);
    animation: hrBossDmgFloat 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hr-damage-popup.dodge {
    color: #80deea;
    font-size: calc(16px * var(--ui-scale-modal-body));
    font-weight: 700;
    font-style: italic;
    text-shadow: 0 0 12px rgba(128,222,234,0.5), 0 2px 6px rgba(0,0,0,0.6);
    animation: hrDodgeSweep 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    letter-spacing: 2px;
}

.hr-damage-popup.shield {
    color: var(--hr-shield);
    font-size: calc(14px * var(--ui-scale-modal-body));
    text-shadow: 0 0 8px rgba(126,87,194,0.4), 0 2px 4px rgba(0,0,0,0.6);
    animation: hrShieldAbsorb 0.9s ease-out forwards;
}

.hr-damage-popup.heal {
    color: var(--hr-green);
    font-size: calc(15px * var(--ui-scale-modal-body));
    text-shadow: 0 0 8px rgba(102,187,106,0.4), 0 2px 4px rgba(0,0,0,0.6);
    animation: hrHealFloat 1s ease-out forwards;
}

@keyframes hrDmgFloat {
    0% { opacity: 0.8; transform: translateY(0) scale(0.9); }
    15% { opacity: 1; transform: translateY(-6px) scale(1.05); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-40px) scale(0.85); }
}

@keyframes hrCritFloat {
    0% { opacity: 0; transform: translateY(8px) scale(0.4); }
    12% { opacity: 1; transform: translateY(-4px) scale(1.3); }
    24% { transform: translateY(-8px) scale(0.95); }
    36% { transform: translateY(-12px) scale(1.05); }
    55% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-50px) scale(0.8); }
}

@keyframes hrBossDmgFloat {
    0% { opacity: 0.8; transform: translateY(0) scale(0.9); }
    15% { opacity: 1; transform: translateY(4px) scale(1.05); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(30px) scale(0.85); }
}

@keyframes hrDodgeSweep {
    0% { opacity: 0; transform: translateX(-30px) scale(0.8); }
    20% { opacity: 1; transform: translateX(0) scale(1.05); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateX(50px) scale(0.9); }
}

@keyframes hrShieldAbsorb {
    0% { opacity: 0; transform: scale(0.7); }
    20% { opacity: 1; transform: scale(1.1); }
    50% { opacity: 0.9; }
    100% { opacity: 0; transform: translateY(-20px) scale(0.8); }
}

@keyframes hrHealFloat {
    0% { opacity: 0; transform: translateY(4px); }
    20% { opacity: 1; transform: translateY(0); }
    60% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-30px); }
}

.hr-buff-announce {
    position: fixed;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: calc(20px * var(--ui-scale-modal-body));
    font-weight: 900;
    pointer-events: none;
    z-index: 16000;
    white-space: nowrap;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 12px 0;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0,0,0,0.7) 20%,
        rgba(0,0,0,0.85) 50%,
        rgba(0,0,0,0.7) 80%,
        transparent 100%);
    animation: hrBuffBannerSlide 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hr-buff-announce::before,
.hr-buff-announce::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 1px;
}
.hr-buff-announce::before { top: 15%; }
.hr-buff-announce::after { bottom: 15%; }

.hr-buff-announce.fury {
    color: #ef5350;
    text-shadow: 0 0 20px rgba(239,83,80,0.6), 0 0 40px rgba(239,83,80,0.3);
}
.hr-buff-announce.fury::before, .hr-buff-announce.fury::after {
    background: linear-gradient(90deg, transparent, rgba(239,83,80,0.4), transparent);
}

.hr-buff-announce.awakening {
    color: var(--hr-gold);
    text-shadow: 0 0 20px var(--hr-gold-glow), 0 0 50px rgba(255,215,0,0.2);
}
.hr-buff-announce.awakening::before, .hr-buff-announce.awakening::after {
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.4), transparent);
}

.hr-buff-announce.destruction {
    color: var(--hr-accent);
    text-shadow: 0 0 20px var(--hr-accent-glow), 0 0 40px rgba(179,136,255,0.2);
}
.hr-buff-announce.destruction::before, .hr-buff-announce.destruction::after {
    background: linear-gradient(90deg, transparent, var(--hr-accent-glow), transparent);
}

.hr-buff-announce.predator {
    color: #ef5350;
    text-shadow: 0 0 20px rgba(239,83,80,0.6);
}
.hr-buff-announce.predator::before, .hr-buff-announce.predator::after {
    background: linear-gradient(90deg, transparent, rgba(239,83,80,0.3), transparent);
}

.hr-buff-announce.bloodthirst {
    color: #ff1744;
    text-shadow: 0 0 24px rgba(255,23,68,0.7), 0 0 50px rgba(255,23,68,0.3);
    font-size: calc(22px * var(--ui-scale-modal-body));
}
.hr-buff-announce.bloodthirst::before, .hr-buff-announce.bloodthirst::after {
    background: linear-gradient(90deg, transparent, rgba(255,23,68,0.5), transparent);
}

.hr-buff-announce.immortal {
    color: var(--hr-gold);
    text-shadow: 0 0 28px var(--hr-gold-glow), 0 0 60px rgba(255,215,0,0.3);
}
.hr-buff-announce.immortal::before, .hr-buff-announce.immortal::after {
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.5), transparent);
}

.hr-buff-announce.barrier-break {
    color: var(--hr-barrier);
    text-shadow: 0 0 24px rgba(66,165,245,0.7), 0 0 50px rgba(66,165,245,0.3);
}
.hr-buff-announce.barrier-break::before, .hr-buff-announce.barrier-break::after {
    background: linear-gradient(90deg, transparent, rgba(66,165,245,0.5), transparent);
}

.hr-buff-announce.floor-clear {
    color: var(--hr-gold);
    text-shadow: 0 0 30px var(--hr-gold-glow), 0 0 60px rgba(255,215,0,0.3);
    font-size: calc(22px * var(--ui-scale-modal-body));
}
.hr-buff-announce.floor-clear::before, .hr-buff-announce.floor-clear::after {
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.5), transparent);
}

@keyframes hrBuffBannerSlide {
    0% {
        opacity: 0;
        clip-path: inset(40% 100% 40% 100%);
    }
    20% {
        opacity: 1;
        clip-path: inset(0% 0% 0% 0%);
    }
    70% {
        opacity: 1;
        clip-path: inset(0% 0% 0% 0%);
    }
    100% {
        opacity: 0;
        clip-path: inset(40% 100% 40% 100%);
    }
}

.hr-screen-flash {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 45;
    animation: hrFlash 0.4s ease-out forwards;
}
.hr-screen-flash.red {
    background: radial-gradient(ellipse at center, rgba(239,83,80,0.25) 0%, rgba(239,83,80,0.06) 50%, transparent 80%);
}
.hr-screen-flash.blue {
    background: radial-gradient(ellipse at center, rgba(66,165,245,0.25) 0%, rgba(66,165,245,0.06) 50%, transparent 80%);
}
.hr-screen-flash.gold {
    background: radial-gradient(ellipse at center, rgba(255,215,0,0.2) 0%, rgba(255,215,0,0.05) 50%, transparent 80%);
}

@keyframes hrFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.hr-players-section {
    position: relative;
    z-index: 1;
}

.hr-player-card {
    background: var(--hr-bg-card);
    border: 1px solid var(--hr-border);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, opacity 0.3s;
}
.hr-player-card:last-child { margin-bottom: 0; }
.hr-player-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

.hr-player-card.is-target {
    border-color: rgba(239,83,80,0.35);
    box-shadow: 0 0 14px rgba(239,83,80,0.12);
    background: linear-gradient(135deg, rgba(239,83,80,0.08) 0%, var(--hr-bg-card) 100%);
}
.hr-player-card.is-dead {
    opacity: 0.3;
    border-color: rgba(100,100,120,0.15);
    background: rgba(15,15,25,0.5);
    filter: grayscale(80%);
}
.hr-player-card.hit-flash {
    box-shadow: 0 0 20px rgba(239,83,80,0.3), inset 0 0 10px rgba(239,83,80,0.05);
    border-color: rgba(239,83,80,0.5);
}
.hr-player-card.immortal-glow {
    border-color: var(--hr-gold-glow);
    box-shadow: 0 0 20px rgba(255,215,0,0.2);
    background: linear-gradient(135deg, var(--hr-gold-dim) 0%, var(--hr-bg-card) 100%);
}

.hr-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.hr-player-name { font-weight: 700; font-size: calc(13px * var(--ui-scale-modal-body)); color: var(--hr-text); }
.hr-player-name .target-icon { color: var(--hr-danger); margin-right: 2px; font-size: calc(11px * var(--ui-scale-modal-body)); }
.hr-player-name .dead-icon { color: #555; margin-right: 2px; font-size: calc(13px * var(--ui-scale-modal-body)); }
.hr-player-cp { color: var(--hr-text-muted); font-size: calc(11px * var(--ui-scale-modal-body)); font-weight: 500; }

.hr-hp-bar, .hr-shield-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(0,0,0,0.5);
    overflow: hidden;
    margin-bottom: 4px;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.hr-hp-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #2e7d32, #43a047, #66bb6a);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(102,187,106,0.3);
    position: relative;
}
.hr-hp-fill::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: hrHpShimmer 4s ease-in-out infinite;
}

.hr-shield-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #4527a0, #5c6bc0, #7e57c2);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(126,87,194,0.25);
    position: relative;
}
.hr-shield-fill::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: hrHpShimmer 5s ease-in-out infinite;
}

.hr-hp-text {
    font-size: calc(11px * var(--ui-scale-modal-body));
    color: var(--hr-text-muted);
    margin-bottom: 3px;
    font-weight: 500;
}

.hr-buff-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.hr-buff-row .buff-icon {
    font-size: 0.85em;
    padding: 3px 8px;
}

.hr-combat-log {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hr-combat-log::-webkit-scrollbar { width: 4px; }
.hr-combat-log::-webkit-scrollbar-track { background: transparent; }
.hr-combat-log::-webkit-scrollbar-thumb { background: rgba(179,136,255,0.15); border-radius: 2px; }

.hr-log-entry {
    font-size: calc(12px * var(--ui-scale-modal-body));
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.02);
    line-height: 1.5;
    flex-shrink: 0;
    animation: hrLogSlideIn 0.3s ease-out;
}
.hr-log-entry.crit { color: var(--hr-gold); background: rgba(255,215,0,0.05); }
.hr-log-entry.bloodthirst { color: #ff1744; background: rgba(255,23,68,0.05); }
.hr-log-entry.buff { color: var(--hr-accent); background: rgba(179,136,255,0.05); }
.hr-log-entry.damage { color: rgba(159,168,199,0.9); }
.hr-log-entry.boss-damage { color: var(--hr-danger); background: rgba(239,83,80,0.05); }
.hr-log-entry.dodge-log { color: #80deea; background: rgba(128,222,234,0.05); }
.hr-log-entry.immortal-log { color: var(--hr-gold); font-weight: 700; background: rgba(255,215,0,0.08); }

.hr-log-entry.barrier-break-log { color: var(--hr-barrier); font-weight: 700; background: rgba(66,165,245,0.08); }
.hr-log-entry.item-drop { color: #e040fb; font-weight: 700; background: rgba(224,64,251,0.08); }
.hr-log-entry.heal { color: var(--hr-green); background: rgba(102,187,106,0.05); }
.hr-log-entry.special { color: #80deea; background: rgba(128,222,234,0.05); }
.hr-log-entry.floor-clear { color: var(--hr-gold); font-weight: 700; background: rgba(255,215,0,0.08); }

@keyframes hrLogSlideIn {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hr-log-header-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}
.hr-log-settings-btn {
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(179,136,255,0.25);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(179,136,255,0.08) 0%, rgba(179,136,255,0.02) 100%);
    color: rgba(179,136,255,0.7);
    font-size: calc(17px * var(--ui-scale-modal-body));
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hr-log-settings-btn:hover {
    background: linear-gradient(135deg, rgba(179,136,255,0.18) 0%, rgba(179,136,255,0.06) 100%);
    border-color: rgba(179,136,255,0.5);
    color: var(--hr-accent);
    transform: rotate(30deg);
    box-shadow: 0 0 12px rgba(179,136,255,0.15);
}
.hr-log-settings-btn.active {
    background: linear-gradient(135deg, rgba(179,136,255,0.22) 0%, rgba(179,136,255,0.1) 100%);
    border-color: rgba(179,136,255,0.6);
    color: var(--hr-accent);
    transform: rotate(90deg);
    box-shadow: 0 0 14px rgba(179,136,255,0.25);
}
.hr-log-settings-panel {
    padding: 10px 14px;
    border-bottom: 1px solid var(--hr-border);
    background: linear-gradient(180deg, rgba(18,20,35,0.98) 0%, rgba(13,15,24,0.95) 100%);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    animation: hrSettingsSlideDown 0.2s ease-out;
}
@keyframes hrSettingsSlideDown {
    0% { opacity: 0; transform: translateY(-6px); }
    100% { opacity: 1; transform: translateY(0); }
}
.hr-log-settings-panel label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: calc(11px * var(--ui-scale-modal-body));
    color: var(--hr-text-muted);
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 10px 4px 6px;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.2s;
    user-select: none;
}
.hr-log-settings-panel label:hover {
    color: var(--hr-text);
    background: rgba(255,255,255,0.04);
    border-color: var(--hr-border);
}
.hr-log-settings-panel label.checked {
    color: var(--hr-accent);
    background: rgba(179,136,255,0.08);
    border-color: rgba(179,136,255,0.25);
}
.hr-log-settings-panel input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
}
.hr-log-settings-panel input[type="checkbox"]:hover {
    border-color: rgba(179,136,255,0.4);
    background: rgba(179,136,255,0.08);
}
.hr-log-settings-panel input[type="checkbox"]:checked {
    border-color: var(--hr-accent);
    background: var(--hr-accent);
    box-shadow: 0 0 6px rgba(179,136,255,0.3);
}
.hr-log-settings-panel input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0d0f18;
}
.hr-leave-btn {
    padding: 6px 18px;
    border: 1.5px solid rgba(239,83,80,0.25);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(239,83,80,0.08) 0%, rgba(239,83,80,0.02) 100%);
    color: rgba(239,83,80,0.75);
    font-size: calc(12px * var(--ui-scale-modal-body));
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}
.hr-leave-btn:hover {
    background: linear-gradient(135deg, rgba(239,83,80,0.18) 0%, rgba(239,83,80,0.06) 100%);
    border-color: rgba(239,83,80,0.5);
    color: var(--hr-danger);
    box-shadow: 0 0 12px rgba(239,83,80,0.15);
}

.hr-floor-clear-banner {
    text-align: center;
    font-size: calc(14px * var(--ui-scale-modal-body));
    font-weight: 800;
    color: var(--hr-gold);
    padding: 6px 0;
    text-shadow: 0 0 12px var(--hr-gold-glow);
    animation: hrFloorClearPulse 3s ease-out forwards;
    letter-spacing: 1px;
}
@keyframes hrFloorClearPulse {
    0% { opacity: 0; transform: scale(0.8); }
    10% { opacity: 1; transform: scale(1.05); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: scale(1); }
}

.hr-player-hp-container {
    margin-bottom: 6px;
}

.hr-chat-input-area {
    display: flex;
    gap: 6px;
    padding: 8px 14px;
    border-top: 1px solid var(--hr-border);
    flex-shrink: 0;
}
.hr-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--hr-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--hr-text);
    font-size: calc(12px * var(--ui-scale-modal-body));
    font-family: 'Noto Sans KR', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.hr-chat-input::placeholder {
    color: var(--hr-text-muted);
}
.hr-chat-input:focus {
    border-color: var(--hr-accent-glow);
}
.hr-chat-send-btn {
    padding: 8px 14px;
    background: var(--hr-accent-dim);
    border: 1px solid var(--hr-border-active);
    border-radius: 6px;
    color: var(--hr-accent);
    font-size: calc(12px * var(--ui-scale-modal-body));
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}
.hr-chat-send-btn:hover {
    background: rgba(179,136,255,0.25);
}

.hr-log-entry.chat {
    color: #b0bec5;
    background: rgba(176,190,197,0.04);
    font-weight: 500;
}

.hr-log-entry.system {
    color: var(--hr-accent);
    font-weight: 600;
    text-align: center;
}
.hr-log-entry.new-record {
    color: var(--hr-gold);
    font-weight: 700;
    font-size: calc(14px * var(--ui-scale-modal-body));
    text-align: center;
    background: var(--hr-gold-dim);
    padding: 6px 8px;
    animation: hrNewRecord 0.5s ease-out;
}
.hr-log-entry.mvp {
    color: var(--hr-gold);
    font-weight: 700;
    font-size: calc(13px * var(--ui-scale-modal-body));
    text-align: center;
    background: rgba(255,215,0,0.06);
    padding: 5px 8px;
}
.hr-log-entry.member-result {
    color: var(--hr-text);
    font-weight: 500;
    padding-left: 16px;
}

@keyframes hrNewRecord {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 820px) {
    #raid-participant-list {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        max-height: 120px;
        border-radius: 0;
        padding: 10px;
        order: -1;
    }
    #raid-participant-list h3 { font-size: 1em; margin-bottom: 8px; }
    #participant-list-container { display: flex; flex-wrap: wrap; gap: 5px; }
    .participant-entry {
        flex: 0 0 auto;
        padding: 4px 8px;
        font-size: 0.85em;
        border-bottom: none;
        background: rgba(0,0,0,0.4);
        border-radius: 4px;
    }
    #raid-header { padding: 10px; }
    #raid-title { font-size: 1.4em; }
    #raid-phase-info { font-size: 1em; }
    #raid-boss-hp-container { width: 90%; height: 24px; }
    #raid-phase-timer { font-size: 1.8em; top: 10px; right: 10px; }
    #timer-gauge-container { width: 90%; top: 100px; }
    .raid-result-content { width: 95%; padding: 20px; }
    #raid-result-title { font-size: 2em; }
    .ranking-table th, .ranking-table td { padding: 8px 6px; font-size: 0.9em; }
    #raid-announcement { font-size: 1.4em; padding: 15px 25px; max-width: 90%; }
    .raid-boss { width: 120px; height: 120px; font-size: 1em; }
    #hard-raid-modal > .modal-content.hard-raid-content.battle-mode {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    .hr-battle-grid { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
    .hr-battle-left { grid-column: 1; grid-row: 1; max-height: 30vh; }
    .hr-battle-right { grid-column: 1; grid-row: 2; max-height: 30vh; }
    .hr-battle-bottom { grid-column: 1; grid-row: 3; }
}

@media (max-width: 480px) {
    #raid-title { font-size: 1.2em; }
    #raid-phase-timer { font-size: 1.4em; top: 8px; right: 8px; }
    #raid-boss-hp-container { width: 95%; height: 20px; }
    #raid-boss-hp-text { font-size: 0.8em; }
    #ddr-container { padding: 15px 20px; width: 90%; max-width: 100%; }
    #ddr-timer-container { width: 100%; height: 20px; margin-bottom: 15px; }
    #ddr-sequence { gap: 10px; flex-wrap: wrap; justify-content: center; }
    .ddr-arrow { font-size: 2.5em; padding: 8px; border-radius: 10px; }
    #simon-says-container { padding: 15px; width: 90%; max-width: calc(300px * var(--ui-scale-modal-size)); }
    #simon-says-board { grid-template-columns: 100px 100px; grid-template-rows: 100px 100px; gap: 10px; }
    .simon-button { width: 100px; height: 100px; }
    #simon-red { border-top-left-radius: 100px; }
    #simon-blue { border-top-right-radius: 100px; }
    #simon-green { border-bottom-left-radius: 100px; }
    #simon-yellow { border-bottom-right-radius: 100px; }
    #simon-says-status { font-size: 1.2em; margin-bottom: 15px; }
    #raid-announcement { font-size: 1.1em; padding: 12px 20px; }
    .raid-boss { width: 80px; height: 80px; font-size: 0.8em; border-width: 3px; }
    .raid-result-content { width: 100%; border-radius: 0; padding: 15px; }
    #raid-result-close-btn { min-height: 48px; font-size: 1.1em; }
    .bullet { width: 20px; height: 20px; }
    .p6-platform { width: 120px; height: 120px; font-size: 1em; }
    .p8-core { width: 120px; height: 120px; }
    .essence { width: 20px; height: 20px; }
    .wraith-normal { width: 60px; height: 60px; }
    #p5-ui-container { padding: 10px 15px; top: 110px; }
    .p5-part1-ui { gap: 25px; font-size: 1.2em; }
    .p5-part2-ui { gap: 25px; height: 80px; }
    .p5-size-gauge { width: 50px; }
    .hr-buff-announce { font-size: calc(16px * var(--ui-scale-modal-body)); letter-spacing: 1px; }
    .hr-buff-announce.bloodthirst { font-size: calc(18px * var(--ui-scale-modal-body)); }
    .hr-buff-announce.floor-clear { font-size: calc(18px * var(--ui-scale-modal-body)); }
    .hard-raid-header { padding: 12px 14px; }
    .hard-raid-header h2 { font-size: calc(14px * var(--ui-scale-modal-body)); }
    .hr-leave-btn { padding: 6px 12px; font-size: calc(11px * var(--ui-scale-modal-body)); }
    .hr-battle-top-bar { padding: 8px 12px; }
    .hr-boss-name { font-size: calc(14px * var(--ui-scale-modal-body)); }
    .hr-boss-hp-container, .hr-boss-barrier-container { height: 24px; }
    .hr-boss-hp-text, .hr-boss-barrier-text { font-size: calc(10px * var(--ui-scale-modal-body)); }
    .hr-boss-stats { font-size: calc(10px * var(--ui-scale-modal-body)); gap: 10px; }
    .hr-player-name { font-size: calc(12px * var(--ui-scale-modal-body)); }
    .hr-player-cp { font-size: calc(10px * var(--ui-scale-modal-body)); }
    .hr-log-entry { font-size: calc(11px * var(--ui-scale-modal-body)); }
    .hr-chat-input { padding: 6px 10px; font-size: calc(16px * var(--ui-scale-modal-body)); }
    .hr-chat-send-btn { padding: 6px 10px; }
    .party-card { flex-direction: column; gap: 8px; text-align: center; }
}
