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

:root {
    --bg-color-dark: #12141d;
    --bg-color-light: #1c1f2d;
    --surface-color: rgba(44, 45, 62, .6);
    --primary-color: #007aff;
    --secondary-color: #ff9500;
    --border-color: rgba(142, 142, 147, .4);
    --text-color: #f5f5f7;
    --text-muted: #8a8a8e;
    --success-color: #34c759;
    --fail-color: #ff3b30;
    --damage-color: #ffcc00;
    --common-color: #fff;
    --rare-color: #007aff;
    --legendary-color: #ff9500;
    --epic-color: #af52de;
    --mystic-color: #ff2d55;
    --gold-color: #ffd700;
    --primal-color: #00e6d2; /* 태초 등급 색상 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-color);
    background: var(--bg-color-dark);
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.auth-view {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-app-container {
    width: 100%;
    max-width: 1900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
flex-grow: 1;
    min-height: 0;
    box-sizing: border-box;
}

.game-container {
    position: relative;
    width: 100%;
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column; 
    gap: 15px; 
    padding: 15px;
}

.main-content-wrapper {
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.left-sector, .right-sector {
    background: rgba(44, 45, 62, 0.6);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

.left-sector {
    gap: 15px;
}

.character-panel {
    background: transparent;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: none;
    transition: transform .1s, box-shadow .1s;
}

.character-panel.hit-flash {
    transform: scale(1.01);
    box-shadow: 0 0 15px var(--fail-color)
}

.character-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.character-header h2 {
    font-size: 1.8em;
    border: none;
}

.resource-display {
    font-size: 1.4em;
    font-weight: 500;
    color: var(--secondary-color);
}

#gold.flash {
    animation: flash .3s ease-in-out
}

@keyframes flash {
    50% {
        color: #fff;
        transform: scale(1.1)
    }
}

.hp-bar {
    width: 100%;
    height: 40px;
    background-color: rgba(0, 0, 0, .3);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid #000
}

.hp-bar-inner {
    height: 100%;
    transition: width .2s linear
}

.player-panel .hp-bar-inner {
    background: linear-gradient(to right, #28b485, #7ed56f)
}

.monster-panel .hp-bar-inner {
    background: linear-gradient(to right, #c0392b, #e74c3c)
}

.hp-bar-text {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    font-size: 1.2em
}

.stat-info-combined,
.stat-info-monster {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-row,
.stat-row-monster {
    display: grid;
    align-items: center;
    font-size: 1.2em;
}

.stat-row {
    grid-template-columns: 1fr auto 1fr;
    gap: 10px
}

.stat-row-monster {
    grid-template-columns: 1fr auto;
    padding: 0 10px
}

.stat-value {
    text-align: center;
    font-weight: 700
}

.stat-row-monster span:last-child {
    text-align: right;
    font-weight: 700
}

.button-group {
    display: flex;
    justify-content: flex-end;
    gap: 8px
}

.upgrade-btn {
    background-color: rgba(255, 255, 255, .1);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s
}

.upgrade-btn:hover {
    background-color: rgba(255, 255, 255, .2);
    color: #fff
}

.upgrade-btn.affordable {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 8px var(--primary-color);
    border-color: var(--primary-color)
}

.equipment-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto
}

.equipment-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
}

.slot {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 10px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    font-size: 0.8em;
    overflow: hidden;
}

.slot.drag-over {
    border-style: solid;
    border-color: var(--success-color);
    background-color: rgba(52, 199, 89, .2)
}

.character-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

#artifact-sockets-header {
    display: flex;
    gap: 6px;
}

.artifact-socket {
    width: 45px; /* 크기 축소 */
    height: 45px; /* 크기 축소 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all .3s;
    cursor: help;
    position: relative;
    border: 2px solid #111;
    background: radial-gradient(ellipse at center, #555 0%, #222 100%);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.8);
}

.artifact-socket img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.artifact-socket.unlocked {
    border-style: solid;
    box-shadow: 0 0 10px var(--legendary-color)
}

.management-panel {
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.tabs {
    display: flex;
    background: rgba(0, 0, 0, .2);
    flex-shrink: 0;
    flex-wrap: nowrap;
    overflow-x: auto
}

.tab-button {
    flex: 1 0 auto;
    padding: 18px 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3em;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    border-bottom: 4px solid transparent;
    white-space: nowrap
}

.tab-button.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color)
}

.tab-content {
    display: none;
    flex-grow: 1;
    min-height: 0;
    padding: 15px;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column
}

#chat-tab,
#log-tab,
#incubator-tab {
    padding: 0
}

.inventory-header,
.enhancement-anvil,
#chat-form {
    flex-shrink: 0
}

.inventory-grid,
#chat-messages,
#game-log,
#pet-inventory {
    flex-grow: 1;
    overflow-y: auto
}

.inventory-tip {
    font-size: 1.1em;
    color: var(--text-muted);
    padding: 10px;
    text-align: center
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    align-content: flex-start;
    padding-bottom: 15px;
}

.inventory-item,
.enhancement-slot {
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, .4);
    cursor: pointer;
    transition: all .2s;
    position: relative;
    border: 2px solid var(--border-color)
}

.inventory-item.dragging {
    opacity: .4
}

.item-image {
    width: 100%;
    padding-top: 100%;
    position: relative;
    flex-shrink: 0
}

.item-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
    pointer-events: none
}

.item-info {
    text-align: center;
    padding-top: 8px;
    flex-shrink: 0;
    word-break: break-word
}

.item-quantity {
    position: absolute;
    bottom: 8px;
    left: 10px;
    font-size: 1.4em;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 5px #000
}

.item-enhancement-level {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 1em;
    font-weight: 700;
    background: rgba(0, 0, 0, .7);
    padding: 3px 6px;
    border-radius: 4px
}

.inventory-item:hover {
    transform: translateY(-5px)
}

.inventory-item.selected {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 15px var(--secondary-color) !important
}

.item-name {
    font-weight: 700;
    font-size: 1.1em
}

.Common { color: var(--common-color) }
.Rare { color: var(--rare-color) }
.Legendary { color: var(--legendary-color) }
.Epic { color: var(--epic-color) }
.Mystic { color: var(--mystic-color) }
.Primal { color: var(--primal-color); }

.item-effect {
    font-size: 1em;
    color: var(--text-muted);
    margin-top: 8px
}

.item-enchantments {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
}

.slot .inventory-item {
    width: 100%;
    height: 100%;
    position: relative;
    background: none;
    border: none;
    padding: 0;
}

.slot .item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
}

.slot .item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slot .item-info {
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    padding: 0 5px;
    box-sizing: border-box;
    text-align: center;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
    line-height: 1.2;
    text-shadow: 1px 1px 3px #000, -1px -1px 3px #000;
    pointer-events: none;
}

.slot .item-enhancement-level {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.9em;
    font-weight: 700;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 2px 5px;
    border-radius: 4px;
    pointer-events: none;
}

.interaction-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px
}

.action-btn {
    background-color: var(--success-color);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color .2s;
    font-weight: 500
}

.action-btn.sell-btn:hover {
    background-color: #2ca04c
}

.action-btn.list-auction-btn {
    background-color: var(--primary-color)
}

.action-btn.list-auction-btn:hover {
    background-color: #0056b3
}

.action-btn.use-item-btn {
    background-color: var(--secondary-color);
}

.action-btn.use-item-btn:hover {
    background-color: #d47d00;
}

#game-log {
    list-style-type: none;
    padding: 20px
}

#game-log li {
    padding: 5px 0;
    font-size: 1.1em;
    color: var(--text-muted);
    border-bottom: 1px solid #333
}

#game-log li:first-child {
    color: #fff;
    font-weight: 500
}

.enhancement-anvil {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 15px;
}

.enhancement-slot-wrapper {
    grid-column: 1/3;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative
}

.enhancement-slot {
    width: 180px;
    height: 180px;
    border: 3px dashed var(--border-color);
    transition: all .3s;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center
}

.enhancement-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    text-align: center;
    font-size: 5em;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0
}

.enhancement-animation.success {
    animation: result-pop-improved 1.2s cubic-bezier(.25, .46, .45, .94) forwards;
    color: #ffd700;
    text-shadow: 0 0 5px #fff, 0 0 10px #ffd700, 0 0 20px var(--legendary-color)
}

@keyframes result-pop-improved {
    0% { transform: scale(.5) rotate(-15deg); opacity: 0 }
    40% { transform: scale(1.3) rotate(5deg); opacity: 1 }
    60% { transform: scale(1.1) rotate(-3deg); opacity: 1 }
    80% { transform: scale(1.2) rotate(0); opacity: 1 }
    to { transform: scale(1.2); opacity: 0 }
}

.enhancement-animation.fail,
.enhancement-animation.destroy {
    animation: result-shake .5s ease-in-out forwards;
    color: var(--fail-color)
}

.enhancement-animation.maintain {
    animation: result-fade 1.5s ease-out forwards;
    color: var(--text-muted)
}

@keyframes result-shake {
    0%, to { transform: translateX(0) }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px) }
    20%, 40%, 60%, 80% { transform: translateX(10px) }
}

@keyframes result-fade {
    0% { opacity: 1 }
    to { opacity: 0 }
}

.enhancement-details {
    grid-column: 1;
    text-align: center;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px
}

.arrow {
    font-size: 2.2em;
    color: var(--primary-color)
}

.enhancement-info {
    grid-column: 2;
    text-align: left;
    font-size: 1.2em;
    line-height: 1.6
}

.enhance-execute-btn {
    grid-column: 1/3;
    width: 60%;
    margin: 10px auto;
    padding: 20px;
    border-radius: 10px;
    border: none;
    font-size: 1.5em;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    background: var(--secondary-color);
    color: #fff
}

.enhance-execute-btn:disabled {
    background: #444;
    color: #777;
    cursor: not-allowed
}

.enhancement-checkboxes-wrapper {
    grid-column: 1/3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin: 0 auto
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px
}

.checkbox-wrapper label {
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding-left: 5px; 
}

#rift-enchant-options .item-info {
    text-align: left;
    padding-left: 10px; 
}

.checkbox-wrapper input {
    width: 20px;
    height: 20px;
    cursor: pointer
}

.checkbox-wrapper input:disabled+label {
    color: var(--text-muted);
    cursor: not-allowed
}

#incubator-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px
}

.incubator-slot {
    width: 220px;
    height: 220px;
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    font-size: 1.2em
}

.incubator-slot .inventory-item {
    width: 150px;
    height: 150px;
    cursor: default
}

.incubator-slot .inventory-item:hover {
    transform: none
}

#hatch-button {
    padding: 15px 40px;
    font-size: 1.3em;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    background-color: var(--success-color);
    color: #fff;
    cursor: pointer
}

#hatch-button:disabled {
    background-color: #444;
    color: #777;
    cursor: not-allowed
}

.hatching-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px
}

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 25px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-color)
}

.progress-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary-color), var(--success-color));
    transition: width 1s linear
}

#hatch-timer {
    font-size: 1.2em;
    font-weight: 500
}

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

.enhance-1 { border-color: #4caf50; box-shadow: 0 0 5px #4caf50 }
.enhance-2 { border-color: #66bb6a; box-shadow: 0 0 8px #66bb6a }
.enhance-3 { border-color: #81c784; box-shadow: 0 0 12px #81c784; animation: pulse-green 3s infinite }
.enhance-4 { border-color: #29b6f6; box-shadow: 0 0 8px #29b6f6 }
.enhance-5 { border-color: #4fc3f7; box-shadow: 0 0 12px #4fc3f7 }
.enhance-6 { border-color: #81d4fa; box-shadow: 0 0 15px #81d4fa; animation: pulse-blue 2.5s infinite }
.enhance-7 { border-color: #7e57c2; box-shadow: 0 0 12px #7e57c2 }
.enhance-8 { border-color: #9575cd; box-shadow: 0 0 15px #9575cd }
.enhance-9 { border-color: #b39ddb; box-shadow: 0 0 20px #b39ddb; animation: pulse-purple 2s infinite }
.enhance-10 { border-color: var(--legendary-color); box-shadow: 0 0 25px var(--legendary-color); animation: pulse-orange 1.5s infinite }
.enhance-11 { animation: sparkle-rainbow-11 5s linear infinite }
.enhance-12 { animation: sparkle-rainbow-12 4.5s linear infinite }
.enhance-13 { animation: sparkle-rainbow-13 4s linear infinite }
.enhance-14 { animation: sparkle-rainbow-14 3.5s linear infinite }
.enhance-15 { animation: sparkle-rainbow-15 4s linear infinite, lightning 2s linear infinite }
.enhance-16 { animation: sparkle-rainbow-16 3.5s linear infinite, lightning 1.8s linear infinite }
.enhance-17 { animation: sparkle-rainbow-17 3s linear infinite, lightning 1.6s linear infinite }
.enhance-18 { animation: sparkle-rainbow-18 2.5s linear infinite, lightning 1.4s linear infinite }
.enhance-19 { animation: sparkle-rainbow-19 2s linear infinite, lightning 1.2s linear infinite }
.enhance-20 { animation: lens-flare 2s ease-in-out infinite; border-color: #fff }

@keyframes pulse-green { 50% { box-shadow: 0 0 18px #a5d6a7 } }
@keyframes pulse-blue { 50% { box-shadow: 0 0 22px #b3e5fc } }
@keyframes pulse-purple { 50% { box-shadow: 0 0 30px #ce93d8 } }
@keyframes pulse-orange { 50% { box-shadow: 0 0 35px #ffd54f } }
@keyframes sparkle-rainbow-11 { 25% { border-color: #c4f0c4; box-shadow: 0 0 15px #c4f0c4 } 50% { border-color: #a0c4ff; box-shadow: 0 0 15px #a0c4ff } 75% { border-color: #f0c4f0; box-shadow: 0 0 15px #f0c4f0 } }
@keyframes sparkle-rainbow-12 { 25% { border-color: #c4f0c4; box-shadow: 0 0 18px #c4f0c4 } 50% { border-color: #a0c4ff; box-shadow: 0 0 18px #a0c4ff } 75% { border-color: #f0c4f0; box-shadow: 0 0 18px #f0c4f0 } }
@keyframes sparkle-rainbow-13 { 25% { border-color: #a8e6cf; box-shadow: 0 0 20px #a8e6cf } 50% { border-color: #8fd3f4; box-shadow: 0 0 20px #8fd3f4 } 75% { border-color: #e4c4f0; box-shadow: 0 0 20px #e4c4f0 } }
@keyframes sparkle-rainbow-14 { 25% { border-color: #a8e6cf; box-shadow: 0 0 22px #a8e6cf } 50% { border-color: #8fd3f4; box-shadow: 0 0 22px #8fd3f4 } 75% { border-color: #e4c4f0; box-shadow: 0 0 22px #e4c4f0 } }
@keyframes sparkle-rainbow-15 { 16% { border-color: orange } 33% { border-color: #ff0 } 50% { border-color: green } 66% { border-color: blue } 83% { border-color: indigo } }
@keyframes sparkle-rainbow-16 { 16% { border-color: orange } 33% { border-color: #ff0 } 50% { border-color: green } 66% { border-color: blue } 83% { border-color: indigo } }
@keyframes sparkle-rainbow-17 { 16% { border-color: orange } 33% { border-color: #ff0 } 50% { border-color: green } 66% { border-color: blue } 83% { border-color: indigo } }
@keyframes sparkle-rainbow-18 { 16% { border-color: orange } 33% { border-color: #ff0 } 50% { border-color: green } 66% { border-color: blue } 83% { border-color: indigo } }
@keyframes sparkle-rainbow-19 { 16% { border-color: orange } 33% { border-color: #ff0 } 50% { border-color: green } 66% { border-color: blue } 83% { border-color: indigo } }
@keyframes lightning { to { box-shadow: 0 0 30px #fff, 0 0 40px #ff0, 0 0 50px var(--legendary-color) } }
@keyframes lens-flare { 50% { box-shadow: 0 0 2em .5em #ff0, 0 0 4em 1.5em #f0f inset } }

#auth-container, #kakao-register-container, #kakao-link-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
}

.auth-box {
    background: var(--bg-color-light);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    text-align: center;
    width: 400px
}

#auth-form input, #kakao-register-form input, #kakao-link-form input {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-color-dark);
    color: var(--text-color);
    font-size: 1em;
}

#auth-form button, #kakao-register-form button, #kakao-link-form button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

#auth-form button:hover, #kakao-register-form button:hover, #kakao-link-form button:hover {
    background: #0056b3;
}

#auth-message {
    min-height: 24px;
    color: var(--fail-color);
    margin-bottom: 15px
}

#toggle-auth {
    margin-top: 25px;
    color: var(--text-muted)
}

#toggle-link {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-color-light);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0
}

#user-info {
    font-weight: 700;
    flex-shrink: 0
}

#welcome-username {}

#logout-button {
    padding: 8px 15px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10002; /* z-index 수정: 10000 -> 10002 */
}

.modal-content {
    background: var(--bg-color-light);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, .5);
    position: relative;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
	overflow-y: auto;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    cursor: pointer;
    color: var(--text-muted)
}

.close-button:hover {
    color: var(--text-color)
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 25px;
    flex-shrink: 0;
}

.top-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-grow: 1
}

.top-buttons button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all .2s
}

#ranking-button { background: var(--secondary-color); color: #fff }
#loot-record-button { background: #4caf50; color: #fff }
#enhancement-record-button { background: #2196f3; color: #fff }
#online-users-button { background: #9c27b0; color: #fff }

.top-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3)
}

#ranking-list, .feed-list, #loot-record-display, #enhancement-record-display {
    list-style-type: none;
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
}

#ranking-list h3, #loot-record-display h3, #enhancement-record-display h3 {
    font-size: 1.4em;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin: 25px 0 15px
}

#ranking-list h3:first-of-type, #loot-record-display h3:first-of-type, #enhancement-record-display h3:first-of-type {
    margin-top: 0
}

#ranking-list li, .feed-list li, .record-item {
    padding: 12px 5px;
    font-size: 1.2em;
    border-bottom: 1px solid var(--bg-color-dark);
    line-height: 1.6;
    display: flex;
    align-items: center;
    transition: background-color .3s
}

.record-item {
    font-size: 1.3em;
    justify-content: center;
    background: rgba(0, 0, 0, .1);
    border-radius: 8px
}

#ranking-list li:last-child, .feed-list li:last-child, .record-item:last-of-type {
    border-bottom: none
}

.feed-list li:hover {
    background-color: rgba(255, 255, 255, .05)
}

#ranking-list .rank-badge {
    flex-shrink: 0;
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    margin-right: 15px;
    font-size: .9em
}

#ranking-list .rank-1 { background: var(--gold-color); color: #333 }
#ranking-list .rank-2 { background: #c0c0c0; color: #333 }
#ranking-list .rank-3 { background: #cd7f32; color: #fff }

.rank-name {
    font-weight: 700;
    margin-right: 4px
}

.rank-value {
    font-weight: 700;
    color: var(--text-color);
    margin: 0 4px
}

.enhance-level-highlight {
    font-weight: 700;
    color: var(--damage-color);
    text-shadow: 0 0 5px var(--damage-color);
    margin: 0 4px
}

.user-item-name {
    font-style: italic;
    margin: 0 4px
}

.user-item-none {
    color: var(--text-muted);
    font-style: italic;
    margin: 0 4px
}

.no-record {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    font-style: italic
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0
}

#zoom-controls {
    display: flex;
    gap: 8px
}

.zoom-button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color-light);
    color: var(--text-color);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    justify-content: center;
    align-items: center
}

.zoom-button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color)
}

.monster-header-controls {
    display: flex;
    align-items: center;
    gap: 15px
}

#exploration-button {
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s
}

#exploration-button.explore {
    background-color: var(--success-color);
    color: #fff
}

#exploration-button.climb {
    background-color: var(--secondary-color);
    color: #fff
}

#chat-messages {
    list-style-type: none;
    padding: 10px;
    margin: 0
}

#chat-messages li {
    padding: 6px 10px;
    line-height: 1.5;
    font-size: 1.1em;
    word-break: break-all;
    border-radius: 4px;
    margin-bottom: 4px
}

#chat-messages li .username {
    font-weight: 700;
    color: var(--secondary-color);
    margin-right: 8px;
    cursor: default;
    user-select: none
}

#chat-messages li.system-message {
    background: 0 0 !important;
    text-align: center;
    border: none;
    font-style: italic;
    color: var(--text-muted)
}

#chat-messages li.admin-message .username {
    color: gold;
    text-shadow: 0 0 5px gold
}

#chat-messages li.announcement-message {
    background-color: rgba(255, 99, 71, .15);
    border-left: 3px solid tomato
}

#chat-messages li.announcement-message .username {
    color: tomato
}

#chat-form {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, .2)
}

#chat-input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    background: var(--bg-color-dark);
    color: var(--text-color);
    padding: 12px;
    border-radius: 6px;
    font-size: 1em
}

#chat-form button {
    padding: 0 25px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color .2s
}

#chat-form button:hover {
    background-color: #0056b3
}

#announcement-banner {
    position: absolute; 
    display: flex;
    align-items: center;
    justify-content: center;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    transition: all .5s cubic-bezier(.25, .8, .25, 1);
    padding: 15px 60px 15px 20px;
    width: 80%;
    max-width: 1200px;
    background: linear-gradient(45deg, var(--secondary-color), gold);
    color: #000;
    font-size: 1.5em;
    font-weight: 700;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .5);
    border-radius: 0 0 12px 12px;
    opacity: 0;
}

#announcement-banner.active {
    top: 0;
    opacity: 1;
}

#announcement-close-btn {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: #000;
    opacity: 0.6;
    transition: opacity 0.2s;
}

#announcement-close-btn:hover {
    opacity: 1;
}

#announcement-banner.active {
    opacity: 1;
    top: 0
}

#auction-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    min-height: 0;
    flex-grow: 1;
    overflow-y: auto
}

.auction-grid-container {
    flex: 3;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: rgba(0, 0, 0, .2);
    padding: 10px;
    border-radius: 8px
}

#auction-grid {
    height: 100%;
    overflow-y: auto
}

#auction-item-detail {
    flex: 2;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto
}

#auction-item-detail h3 {
    width: 100%;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    flex-shrink: 0
}

.auction-detail-item {
    width: 180px;
    height: auto;
    margin-bottom: 20px
}

#auction-item-detail p {
    font-size: 1.2em;
    line-height: 1.8
}

.gold-text {
    color: var(--gold-color);
    font-weight: 700
}

.auction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-shrink: 0
}

#auction-refresh-btn {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer
}

#auction-modal .inventory-item.auction-item .item-info {
    font-size: .9em
}

.world-boss-panel {
    flex-shrink: 0;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 2px solid var(--fail-color);
    box-shadow: 0 0 20px var(--fail-color)
}

.world-boss-panel .hp-bar-inner {
    background: linear-gradient(to right, var(--fail-color), #ff6b6b)
}

#world-boss-name {
    color: var(--fail-color);
    font-weight: bold;
    animation: pulse-red 1.5s infinite
}

#world-boss-contribution {
    text-align: center;
    font-size: 1.1em;
    color: var(--text-muted);
    margin-top: 5px
}

@keyframes pulse-red {
    50% {
        text-shadow: 0 0 15px var(--fail-color)
    }
}

.inventory-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    flex-grow: 1;
    min-height: 0
}

.interaction-panel {
    flex-basis: 300px;
    flex-shrink: 0;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px
}

.interaction-item-display {
    width: 150px;
    height: auto
}

#fame-icon { margin-right: 8px; font-size: 1.2em; vertical-align: middle; }
.fame-bronze { color: #cd7f32; font-weight: bold; }
.fame-silver { color: #c0c0c0; font-weight: bold; text-shadow: 0 0 3px rgba(192, 192, 192, 0.5); }
.fame-gold { color: #ffd700; font-weight: bold; text-shadow: 0 0 5px rgba(255, 215, 0, 0.6); }
.fame-diamond { background: linear-gradient(45deg, #b9f2ff, #a9c9ff, #d3baff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: bold; animation: fame-diamond-shine 3s infinite; }

@keyframes fame-diamond-shine { 0%, 100% { text-shadow: 0 0 6px #a9c9ff; } 50% { text-shadow: 0 0 12px #ffffff; } }

#fusion-container { display: flex; flex-direction: column; align-items: center; justify-content: space-around; height: 100%; padding: 20px; gap: 20px; }
#fusion-process-ui { display: flex; align-items: center; justify-content: center; gap: 20px; width: 100%; }
.fusion-slot-wrapper { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fusion-slot { width: 160px; height: 160px; border: 3px dashed var(--border-color); border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; background-color: rgba(0,0,0,0.2); }
.fusion-slot.filled { border-style: solid; border-color: var(--epic-color); }
.fusion-slot:hover { background-color: rgba(255,255,255,0.05); }
.fusion-slot .inventory-item { border: none; background: transparent; cursor: grab; width: 100%; height: 100%; }
.fusion-slot-placeholder { color: var(--text-muted); text-align: center; font-size: 1.1em; }
.fusion-pet-info { font-size: 1em; color: var(--text-color); text-align: center; height: 2em; }
.fusion-indicator { font-size: 3em; font-weight: bold; color: var(--primary-color); }
#fusion-timer-ui { display: flex; flex-direction: column; align-items: center; gap: 15px; text-align: center; }
.fusion-result-preview { width: 180px; height: 180px; animation: pulse-orange 2s infinite; }
.fusion-result-preview img { width: 100%; height: 100%; object-fit: contain; }
#fusion-timer-ui h3 { font-size: 1.8em; }
#fusion-timer { font-size: 2.2em; font-weight: bold; color: var(--success-color); }
.fusion-controls { text-align: center; }
#fusion-rules { color: var(--text-muted); margin-bottom: 15px; line-height: 1.6; }

.board-modal-content { max-width: 1500px; width: 95%; flex-direction: column; }
#board-main-container { flex-grow: 1; min-height: 0; display: flex; flex-direction: column; }
.board-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-shrink: 0; }
.board-tabs { display: flex; gap: 10px; }
.board-tab-button { padding: 8px 16px; border: none; background: none; color: var(--text-muted); font-size: 1.1em; font-weight: 500; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; }
.board-tab-button.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.board-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.board-table th, .board-table td { padding: 12px; text-align: center; border-bottom: 1px solid var(--border-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-table th { background-color: rgba(0,0,0,0.2); }
.board-table tbody tr { cursor: pointer; transition: background-color 0.2s; }
.board-table tbody tr:hover { background-color: rgba(255, 255, 255, 0.05); }
.board-table .col-category { width: 10%; }
.board-table .col-title { width: 50%; text-align: left; }
.board-table .col-author { width: 15%; }
.board-table .col-likes { width: 10%; }
.board-table .col-date { width: 15%; }
.post-title-content.notice { font-weight: bold; color: var(--success-color); animation: fame-diamond-shine 2.5s infinite; }
.post-title-content .comment-count { color: var(--text-muted); font-size: 0.9em; margin-left: 8px; }
.pagination { display: flex; justify-content: center; align-items: center; margin-top: 20px; gap: 8px; flex-shrink: 0; }
.pagination button { background: var(--bg-color-dark); border: 1px solid var(--border-color); color: var(--text-color); padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.pagination button.active { background: var(--primary-color); border-color: var(--primary-color); font-weight: bold; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
#board-detail-view, #board-write-view { display: none; flex-direction: column; height: 100%; }
#post-content-area { padding: 20px; background-color: rgba(0,0,0,0.1); border-radius: 8px; margin-bottom: 20px; flex-grow: 1; overflow-y: auto; min-height: 0; }
#post-content-area .post-header h3 { font-size: 1.8em; margin-bottom: 10px; }
#post-content-area .post-meta { color: var(--text-muted); margin-bottom: 20px; }
#post-content-area .post-body { font-size: 1.1em; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
#post-content-area .post-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; }
#post-like-btn { background: var(--success-color); }
#post-comment-area { margin-top: auto; flex-shrink: 0; max-height: 35%; display: flex; flex-direction: column; }
#comment-list { overflow-y: auto; flex-grow: 1; margin-bottom: 10px; }
.comment-item { display: flex; flex-direction: column; padding: 10px; border-bottom: 1px solid var(--bg-color-dark); }
.comment-author { font-weight: bold; margin-bottom: 5px; }
.comment-content { flex-grow: 1; }
.comment-actions { display: flex; align-items: center; gap: 15px; margin-top: 5px; font-size: 0.9em; }
.comment-actions .like-btn { cursor: pointer; }
.comment-actions .delete-btn { color: var(--fail-color); cursor: pointer; margin-left: auto; }
#comment-form { flex-shrink: 0; }
#comment-form textarea { flex-grow: 1; height: 80px; background-color: #2c2f3b; border: 1px solid var(--border-color); color: var(--text-color); padding: 10px; border-radius: 4px; resize: vertical; font-size: 1em; line-height: 1.5; }
#comment-form textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 5px var(--primary-color); }
#comment-form button { flex-shrink: 0; width: 100px; font-weight: bold; background-color: var(--primary-color); border: none; border-radius: 4px; color: white; cursor: pointer; transition: background-color 0.2s; }
#comment-form button:hover { background-color: #0056b3; }
#board-write-view h3 { text-align: center; margin-bottom: 20px; }
#post-form { display: flex; flex-direction: column; gap: 15px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-weight: bold; }
.form-group input, .form-group select, .form-group textarea { padding: 10px; border: 1px solid var(--border-color); background: var(--bg-color-dark); color: var(--text-color); border-radius: 4px; font-size: 1em; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
#comment-form { display: flex; align-items: stretch; gap: 10px; }
#comment-form textarea { flex-grow: 1; resize: none; padding: 10px; height: 60px; line-height: 1.5; }
#comment-form button { flex-shrink: 0; padding: 0 25px; font-weight: bold; background-color: var(--success-color); transition: background-color 0.2s; }
#comment-form button:hover { background-color: #2ca04c; }
.main-content-wrapper { display: flex; flex-direction: row; gap: 15px; flex-grow: 1; min-height: 0; }
.post-view-body { padding: 25px 20px; font-size: 1.1em; line-height: 1.8; min-height: 200px; border-bottom: 1px solid var(--border-color); background-color: var(--bg-color-dark); }
.post-comments-section { padding: 20px; overflow-y: auto; flex-shrink: 0; min-height: 100px; }
.post-view-actions { padding: 15px 20px; display: flex; gap: 10px; justify-content: center; background-color: var(--bg-color-dark); }
.post-view-container { padding: 20px; overflow-y: auto; flex-grow: 1; border-bottom: 1px solid var(--border-color); position: relative; }
#post-comment-area { background-color: #1a1c23; padding: 15px; display: flex; flex-direction: column; flex-shrink: 0; }
#comment-list { margin: 0; }
.comment-item-new { padding: 15px; border-bottom: 1px solid var(--border-color); background-color: rgba(0, 0, 0, 0.1); }
.comment-main-content { display: flex; align-items: flex-start; gap: 8px; line-height: 1.6; word-break: break-word; }
.comment-author-new { font-weight: bold; flex-shrink: 0; }
.comment-meta-new { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-left: 10px; }
.comment-date-new { font-size: 0.85em; color: var(--text-muted); }
.comment-actions-new { display: flex; gap: 15px; font-size: 0.9em; }
.comment-actions-new .like-btn, .comment-actions-new .delete-btn { color: var(--text-muted); transition: color 0.2s; }
.comment-actions-new .like-btn:hover, .comment-actions-new .delete-btn:hover { color: var(--text-color); }
.detail-view-controls { display: flex; justify-content: space-between; margin-bottom: 15px; }
#board-back-arrow-btn { background-color: var(--surface-color); }
.post-title-content.notice { font-weight: bold; color: var(--success-color); text-shadow: 0 0 8px var(--success-color); }
.editor-mode-toggle { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.html-editor { height: 300px; background-color: #1a1c23; border: 1px solid var(--border-color); color: #f5f5f7; font-family: monospace; font-size: 1em; padding: 10px; resize: vertical; }
.action-btn.equip-btn { background-color: var(--success-color); }
.action-btn.equip-btn:hover { background-color: #2ca04c; }
#online-users-list .user-item-name.Common, #ranking-list .Common, .record-item .Common { color: var(--common-color) !important; }
#online-users-list .user-item-name.Rare, #ranking-list .Rare, .record-item .Rare { color: var(--rare-color) !important; }
#online-users-list .user-item-name.Legendary, #ranking-list .Legendary, .record-item .Legendary { color: var(--legendary-color) !important; }
#online-users-list .user-item-name.Epic, #ranking-list .Epic, .record-item .Epic { color: var(--epic-color) !important; }
#online-users-list .user-item-name.Mystic, #ranking-list .Mystic, .record-item .Mystic { color: var(--mystic-color) !important; }
#ranking-list .rank-name, .record-item .rank-name { font-weight: 700; }
.post-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 10px; }
#player-buffs-container { display: flex; justify-content: center; gap: 10px; margin-top: 10px; min-height: 28px; }
.buff-icon { padding: 5px 10px; background-color: var(--gold-color); color: #000; font-weight: bold; border-radius: 6px; box-shadow: 0 0 8px var(--gold-color); animation: pulse-orange 1.5s infinite; font-size: 1.1em; }
.explore, .climb {
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    font-size: 1.1em; /* 폰트 크기 살짝 키움 */
}

/* 일반 몬스터 공격 버튼 (climb) */
.climb {
    background-color: var(--secondary-color);
    color: #fff;
}

/* 월드 보스 공격 버튼 (explore) */
#attack-target-toggle-btn.explore {
    background: linear-gradient(-45deg, #e74c3c, #c0392b, #ff6b6b, #e74c3c);
    background-size: 400% 400%;
    color: #ffffff;
    border: 2px solid #ffdddd;
    box-shadow: 0 0 10px 2px rgba(255, 59, 48, 0.6), 
                inset 0 0 8px 1px rgba(255, 255, 255, 0.5);
    animation: world-boss-button-flow 3s ease infinite;
    text-shadow: 0 0 5px rgba(0,0,0,0.7);
}

@keyframes world-boss-button-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.auction-modal-content { max-width: 1600px; width: 95%; height: 95vh; }
#auction-container { display: flex; flex-direction: row; gap: 20px; flex-grow: 1; min-height: 0; overflow-y: hidden; }
.auction-list-panel, .auction-detail-panel { flex: 1; display: flex; flex-direction: column; min-width: 0; background: rgba(0, 0, 0, .2); padding: 10px; border-radius: 8px; }
#auction-grouped-grid, #auction-detail-list { overflow-y: auto; padding-right: 5px; }
.auction-list-panel .inventory-item:hover { transform: none; background-color: rgba(255, 255, 255, 0.1); }
.auction-detail-entry { display: flex; align-items: center; padding: 8px; border-bottom: 1px solid var(--border-color); }
.auction-detail-entry .seller-info { display: 0 0 15%; max-width: 15%; min-width: 0; white-space: nowrap; }
.auction-detail-item-image { width: 32px; height: 32px; border-radius: 4px; flex-shrink: 0; }
.seller-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.auction-detail-entry .item-price-info { flex: 0 0 65%; max-width: 65%; min-width: 0; padding: 0 20px; white-space: nowrap; }
.auction-detail-entry .price { font-size: 1.1em; font-weight: bold; color: var(--gold-color); }
.auction-detail-entry .quantity { font-size: 0.9em; color: var(--text-muted); margin-left: 5px; }
.auction-detail-entry .auction-actions { flex: 0 0 20%; max-width: 20%; display: flex; justify-content: flex-end; gap: 8px; }
.my-listing-highlight { background-color: rgba(0, 122, 255, 0.15); }
.auction-controls { display: flex; gap: 15px; align-items: center; margin-bottom: 15px; flex-shrink: 0; }
#auction-search-input { flex-grow: 1; padding: 10px; border: 1px solid var(--border-color); background: var(--bg-color-dark); color: var(--text-color); border-radius: 6px; font-size: 1em; }
#auction-grade-filter { padding: 10px; border: 1px solid var(--border-color); background: var(--bg-color-dark); color: var(--text-color); border-radius: 6px; }
@keyframes glitter { 0%, 100% { box-shadow: 0 0 5px #ffd700; transform: scale(1); } 50% { box-shadow: 0 0 15px #fff, 0 0 25px #ffd700; transform: scale(1.05); } }
#mailbox-button { background: #8e44ad; color: #fff; transition: all 0.3s ease; }
#mailbox-button.new-mail { animation: glitter 1.5s infinite; }
.mail-item { display: flex; align-items: center; gap: 15px; padding: 10px; border-bottom: 1px solid var(--border-color); }
.mail-item-icon .inventory-item { width: 60px; height: 60px; background: rgba(0,0,0,0.3); border-radius: 8px; cursor: default; }
.mail-item-info { flex-grow: 1; }
.mail-item-info h4 { margin: 0; font-size: 1.1em; }
.mail-item-info p { margin: 5px 0 0; color: var(--text-muted); font-size: 0.9em; }
.mail-item-icon-placeholder { width: 100px; height: 100px; flex-shrink: 0; }
.mail-item-info h4 .gold-text { font-weight: bold; }
.top-buttons #discord-button { background: #5865F2; color: #fff; padding: 8px 15px; border: none; border-radius: 6px; cursor: pointer; font-weight: 700; transition: all .2s; text-decoration: none; display: inline-flex; align-items: center; font-size: 14px; }
.top-buttons #discord-button:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; padding: 15px 0; }
#codex-content h3 { font-size: 1.6em; color: var(--secondary-color); border-bottom: 2px solid var(--border-color); padding-bottom: 10px; margin-top: 20px; }
#codex-content h3:first-child { margin-top: 0; }
.item-image.undiscovered img { opacity: 0.3; filter: grayscale(90%); }
.codex-completion-full { color: #ffd700; font-weight: bold; animation: blink 1.5s infinite alternate; text-shadow: 0 0 5px #ffeb3b; }
@keyframes blink { from { opacity: 1; } to { opacity: 0.8; } }
#item-action-modal .modal-content, #primal-choice-modal .modal-content { max-width: 450px; text-align: center; }
#item-action-title, #primal-choice-modal h2 { margin-bottom: 30px; font-size: 1.8em; }
#item-action-buttons, #primal-choice-buttons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
#item-action-buttons .action-btn, #primal-choice-buttons .action-btn { padding: 15px 30px; font-size: 1.2em; }
#chat-messages .item-link { cursor: pointer; text-decoration: underline; font-weight: bold; }

@media (min-width: 900px){ 
    .main-content-wrapper{ flex-direction:row; } 
    .left-sector{ flex: 4; } 
    .right-sector{ flex: 6; }
}

@media (max-width: 820px) {

.auction-list-panel,
.auction-detail-panel {
    flex: none;       /* 높이 자동 조정을 위해 flex 비율 해제 */
    height: auto;     /* 컨텐츠 높이에 맞게 자동으로 높이 조절 */
    min-height: 300px; /* 내용이 적어도 최소 높이를 확보 */
}

    body {
        height: auto;
        overflow: auto; /* 모바일에서 body 스크롤 허용 */
    }
    #game-app-container {
        height: auto;
        min-height: 100vh;
    }
    .game-container {
        flex-direction: column;
        padding: 10px 5px;
    }
    .main-content-wrapper {
        flex-direction: column;
    }
    .left-sector, .right-sector {
        overflow-y: visible; /* 모바일에서 각 섹션의 스크롤을 제거 */
    }
    .character-panel { padding:15px; gap:10px }
    .character-header h2 { font-size:1.5em }
    .resource-display { font-size:1.2em }
    .hp-bar { height:35px }
    .hp-bar-text { font-size:1em }
    .stat-info-combined, .stat-info-monster { gap:8px }
    .stat-row, .stat-row-monster { font-size:1em }
    .stat-row { grid-template-columns:auto 1fr auto }
    .button-group { gap:5px }
    .upgrade-btn { padding:4px 8px; font-size:12px }
    .equipment-slots { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .slot { height:100px; }
    .artifact-sockets { gap: 15px; justify-content: space-around; }
    .artifact-socket { width: 50px; height: 50px; }
    .tabs { flex-wrap:nowrap }
    .tab-button { padding:12px 8px; font-size:1em }
    .tab-content { padding:10px }
    .inventory-grid { grid-template-columns:repeat(auto-fill,minmax(80px,1fr)); gap:10px }
    .inventory-item, .enhancement-slot { padding:8px }
    .item-name { font-size:.9em }
    .item-effect { font-size:.8em; margin-top:4px }
    .item-enhancement-level { font-size:.8em; top:5px; right:5px }
    .item-quantity { font-size:1.1em; bottom:5px; left:5px }
    .enhancement-anvil { grid-template-columns:1fr; gap:15px }
    .enhancement-slot-wrapper, .enhancement-details, .enhancement-info, .enhance-execute-btn { grid-column:1/-1 }
    .enhancement-slot { width:150px; height:150px }
    .enhancement-details { font-size:1.2em }
    .enhancement-info { text-align:center; font-size:1.1em }
    .enhance-execute-btn { width:80%; padding:15px; font-size:1.2em }
    .modal-overlay { padding:10px; }
    .modal-content { padding:15px; width: 95%; }
    .modal-content h2 { font-size:1.5em }
    #ranking-list li, .feed-list li { font-size:1em; flex-wrap:wrap }
    .top-bar { flex-wrap:wrap; justify-content:center; gap:10px }
.top-buttons {
    order: 1;
    width: 100%;
    justify-content: flex-start; 
    overflow-x: auto;      
    flex-wrap: nowrap;      
    padding-bottom: 10px;   
}
    .top-bar-right { order:2 }
    #auction-container { flex-direction:column }
    .inventory-container { flex-direction: column; }
    .interaction-panel { flex-basis: auto; width: 100%; }
	
	
}

@media (max-width:480px) {
    #user-info { width:100%; text-align:center; order:-1; margin-bottom:5px }
    .top-bar-right { order:3 }
    .stat-row { grid-template-columns:1fr; text-align:center }
    .button-group { justify-content:center }
    #ranking-list li, .feed-list li, .record-item { font-size:.9em; padding-left:0; padding-right:0 }
    .rank-badge { margin-right:8px!important }
}

#auction-container {
    display:flex;
    flex-direction:row;
    gap:20px;
    min-height:0;
    flex-grow:1;
    overflow-y:auto
}

#special-stats-grid{
    display:grid;                 
    grid-template-columns:repeat(2,1fr);
    gap:5px 5px;                       
    margin-top:5px;                   
}

.player-panel{ gap:10px; }

/* ======================================================================= */
/* 칭호 도감 스타일 */
/* ======================================================================= */

/* 상단 칭호 버튼 */
#title-codex-button {
    background: #8e44ad; /* 보라색 계열로 차별화 */
    color: #fff;
}

.tab-button[data-tab="spirit-tab"] {
    color: #48dbfb;
}
.tab-button[data-tab="spirit-tab"].active {
    color: #48dbfb;
    border-bottom-color: #48dbfb;
}

.inventory-item[data-item-type="Spirit"] {
    border-color: #48dbfb;
    box-shadow: 0 0 8px #48dbfb;
    animation: pulse-spirit 2s infinite;
}

@keyframes pulse-spirit {
    50% { box-shadow: 0 0 15px #0abde3, 0 0 5px #fff inset; }
}

/* 칭호 도감 컨텐츠 그리드 */
#title-codex-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    align-content: start;
}

/* 칭호 카드 기본 스타일 */
.title-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: var(--bg-color-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    transition: all 0.2s ease-in-out;
}

/* 잠긴 칭호 카드 */
.title-card.locked {
    opacity: 0.5;
    filter: grayscale(80%);
    cursor: help;
}

/* 해금된 칭호 카드 */
.title-card.unlocked {
    cursor: pointer;
}

.title-card.unlocked:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: var(--secondary-color);
}

/* 카드 내부 요소 */
.title-card-name {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
    text-align: center;
    word-break: break-all;
}

.title-card-effect {
    font-size: 0.9em;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 15px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-card-actions {
    margin-top: auto;
    display: flex;
    justify-content: center;
}

.title-card-equipped-badge {
    color: var(--epic-color);
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
}

/* 채팅창 칭호 스타일 */
#chat-messages li .username .title {
    font-weight: bold;
    margin-right: 5px;
    vertical-align: middle;
}

#admin-panel-button {
    background: var(--gold-color);
    color: var(--bg-color-dark);
    font-weight: 700;
    border: 1px solid #000;
}

.admin-panel-content {
    width: 95%;
    max-width: 1600px;
    height: 90vh;
}

.admin-panel-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.admin-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    flex-shrink: 0;
}

.admin-tab-button {
    padding: 12px 20px;
    font-size: 1.2em;
    font-weight: 500;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.admin-tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-tab-content {
    display: none;
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
}

.admin-tab-content.active {
    display: flex;
    flex-direction: column;
}

.admin-tab-content h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* 대시보드 */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.metric-card {
    background: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.metric-card h4 {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.metric-card p {
    font-size: 2em;
    font-weight: 700;
}

.online-users-list-container {
    flex-grow: 1;
    overflow-y: auto;
}

#admin-online-users-table {
    width: 100%;
    border-collapse: collapse;
}

#admin-online-users-table th, #admin-online-users-table td {
    padding: 10px;
    border: 1px solid var(--border-color);
    text-align: left;
}

#admin-online-users-table tbody tr {
    cursor: pointer;
}

#admin-online-users-table tbody tr:hover {
    background-color: var(--surface-color);
}

/* 유저 관리 */
.user-mgmt-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-search-section {
    display: flex;
    gap: 10px;
}

#admin-user-search-input {
    flex-grow: 1;
    padding: 10px;
    font-size: 1em;
    background: var(--bg-color-dark);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
}

.admin-section {
    background: var(--surface-color);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.admin-section h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.user-edit-grid, .item-grant-grid, .sanction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}
.user-edit-grid label {
    align-self: center;
}

.admin-section input, .admin-section select {
    padding: 8px;
    font-size: 1em;
    background: var(--bg-color-dark);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
}

.sanction-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}
.sanction-buttons .action-btn.sell-btn {
    background-color: var(--fail-color);
}

/* 채팅 로그 */
#admin-chat-log-list {
    list-style-type: none;
    padding: 0;
    height: 100%;
    overflow-y: auto;
}

#admin-chat-log-list li {
    padding: 8px;
    border-bottom: 1px solid var(--surface-color);
    line-height: 1.6;
}

#admin-user-details-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.admin-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.admin-detail-card {
    background: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-detail-card h4 {
    font-size: 1.3em;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
}

.admin-form-grid label {
    font-weight: 500;
    color: var(--text-muted);
}
.admin-form-grid input {
    width: 100%;
}
.admin-form-grid hr {
    grid-column: 1 / -1;
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 5px 0;
}


/* 인벤토리/경매 관리 탭 */
.admin-sub-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}
.admin-sub-tab-button {
    padding: 10px 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1em;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.admin-sub-tab-button.active {
    color: var(--success-color);
    border-bottom-color: var(--success-color);
}

.admin-sub-tab-content {
    display: none;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}
.admin-sub-tab-content.active {
    display: block;
}

/* 관리자용 인벤토리 그리드 */
.admin-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}
.admin-inventory-item {
    position: relative;
}

/* 아이템 삭제 버튼 */
.admin-item-delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background-color: var(--fail-color);
    color: white;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.admin-item-delete-btn:hover {
    opacity: 1;
}

/* 경매 목록 테이블 */
#admin-user-auctions-table {
    width: 100%;
    border-collapse: collapse;
}
#admin-user-auctions-table th, #admin-user-auctions-table td {
    padding: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
}
#admin-user-auctions-table .action-btn {
    padding: 4px 8px;
    font-size: 0.9em;
}

#admin-user-equipment .slot {
    height: 110px;
    border: 2px solid var(--border-color);
    background-color: rgba(0,0,0,0.2);
    position: relative;
}

#admin-user-equipment .slot .inventory-item {
    border: none;
    padding: 0;
    background: none;
    cursor: default;
}

#admin-user-equipment .slot:empty::after {
    content: '없음';
    color: var(--text-muted);
}

/* 태초 등급 전용 공지 스타일 */
#announcement-banner.primal {
    background: linear-gradient(
        -45deg, 
        #000000, 
        #2d004d, 
        #00e6d2, 
        #ffd700, 
        #000000
    );
    background-size: 400% 400%;
    color: #ffffff;
    font-weight: 900;
    border: 2px solid #ffd700;
    box-shadow: 0 0 15px 5px rgba(0, 230, 210, 0.7), 
                0 0 30px 10px rgba(255, 215, 0, 0.5),
                inset 0 0 10px 2px rgba(255, 215, 0, 0.8);
    animation: primal-gradient-flow 5s ease infinite;
}

#announcement-banner.primal span {
    text-shadow: 
        0 0 5px #fff, 
        0 0 10px #fff, 
        0 0 15px #00e6d2, 
        0 0 20px #00e6d2, 
        0 0 25px #00e6d2, 
        0 0 30px #00e6d2, 
        0 0 35px #00e6d2;
    animation: text-flicker 3s linear infinite;
}

@keyframes primal-gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes text-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 4px #fff,
            0 0 11px #00e6d2,
            0 0 19px #00e6d2,
            0 0 40px #00e6d2,
            0 0 80px #00e6d2;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.primal-drop-message {
    background: linear-gradient(-45deg, #000000, #2d004d, #00e6d2, #ffd700, #000000);
    background-size: 400% 400%;
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 8px 0 !important;
    box-shadow: 0 0 10px 2px rgba(0, 230, 210, 0.6);
    animation: primal-gradient-flow 5s ease infinite;
    text-align: center;
    line-height: 1.6;
}

.primal-drop-content .primal-congrats {
    display: block;
    font-size: 1.2em;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 8px #ffd700;
    animation: text-flicker 3s linear infinite;
    margin-bottom: 5px;
}

.primal-drop-content .primal-text {
    font-size: 1.1em;
    color: #fff;
    text-shadow: 0 0 5px #000;
}

.stat-row .stat-value {
    font-size: 0.8em; /* 기존보다 약간 작게 조절 */
    letter-spacing: -0.5px; /* 자간을 미세하게 줄여 공간 확보 */
}

#online-users-list li {
    font-size: 1.0em; /* 기존 1.2em에서 크기 축소 */
}

#research-tab {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.research-header h3 {
    font-size: 1.8em;
    color: var(--primary-color);
}

.research-essence-display {
    font-size: 1.4em;
    font-weight: 500;
    color: var(--mystic-color); /* 무한의 정수 색상 */
}

.research-essence-display span {
    font-weight: 700;
}

.research-container {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* 가로 스크롤 허용 */
    flex-grow: 1;
    min-height: 0;
    padding: 10px;
    background-color: rgba(0,0,0,0.15);
    border-radius: 8px;
}

.research-specialization-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    min-width: 180px; /* 각 전문화 컬럼의 최소 너비 */
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color-dark);
}

.research-specialization-column h4 {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-bottom: 10px;
    white-space: nowrap;
}

.research-tree {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.research-node {
    width: 130px;
    height: 100px;
    border-radius: 8px; /* 사각형 형태로 변경 */
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
    position: relative;
    transition: all 0.2s;
}

.research-node.unlocked {
    cursor: pointer;
    border-color: var(--primary-color);
}

.research-node.unlocked:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-color);
}

.research-node.locked {
    filter: grayscale(80%);
    opacity: 0.5;
    cursor: not-allowed;
}

.research-node.maxed {
    border-color: var(--gold-color);
    box-shadow: 0 0 15px var(--gold-color);
    cursor: default;
}

.research-node-name {
    font-size: 1em; /* 폰트 크기 조정 */
    font-weight: bold;
    line-height: 1.3;
    word-break: keep-all;
}

.research-node-level {
    font-size: 0.9em;
    color: var(--success-color);
    font-weight: bold;
    margin-top: 8px;
}

.research-node-level.maxed-level {
    color: var(--gold-color);
}

.research-connector {
    width: 4px;
    height: 20px;
    background-color: var(--border-color);
}

/* 연구 등급별 색상 */
.research-tier-초급 { color: #a9a9a9; }
.research-tier-중급 { color: var(--rare-color); }
.research-tier-상급 { color: var(--legendary-color); }
.research-tier-무한 { color: var(--mystic-color); }

/* 연구 정보 모달 스타일 */
#research-modal-body {
    padding: 20px 0;
    line-height: 1.7;
}

#research-modal-body h5 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

#research-modal-body p {
    margin: 8px 0;
    font-size: 1.1em;
}

#research-modal-body .current-effect {
    color: var(--success-color);
}

#research-modal-body .next-effect {
    color: var(--text-muted);
}

#research-modal-body .requirements {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    color: var(--fail-color);
}

#research-modal-body .cost {
    margin-top: 10px;
    color: var(--mystic-color);
    font-weight: bold;
    font-size: 1.2em;
}

#research-modal-footer {
    text-align: center;
    margin-top: 10px;
}

#research-upgrade-button {
    width: 60%;
    padding: 15px;
    font-size: 1.2em;
}

#announcement-banner.event {
    background: linear-gradient(-45deg, #ff3c00, #ff2d55, #d43cff, #5856d6, #007aff, #33abf3, #ffc900);
    background-size: 600% 600%;
    animation: primal-gradient-flow 8s ease infinite;
    color: #fff;
    text-shadow: 0 0 4px #000, 0 0 8px #000;
    border-bottom: 3px solid #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
}

@keyframes primal-gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.system-message.event-chat {
    background: linear-gradient(-45deg, #000000, #2d004d, #00e6d2, #ffd700, #000000);
    background-size: 400% 400%;
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 8px 0 !important;
    box-shadow: 0 0 10px 2px rgba(0, 230, 210, 0.6);
    animation: primal-gradient-flow 5s ease infinite;
    text-align: center;
    line-height: 1.6;
    color: #fff;
    font-size: 1.1em;
    text-shadow: 0 0 5px #000;
}

/* 채팅창 이벤트 태그 전용 반짝임 효과 */
.event-chat .event-tag {
    font-weight: 900;
    animation: text-flicker 3s linear infinite;
}

/* Primal 공지에서 사용하는 반짝임 애니메이션 */
@keyframes text-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 4px #fff,
            0 0 11px #00e6d2,
            0 0 19px #00e6d2,
            0 0 40px #00e6d2,
            0 0 80px #00e6d2;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}
.helper-message {

    background: linear-gradient(135deg, rgba(0, 122, 255, 0.15) 0%, rgba(175, 82, 222, 0.15) 100%);
    border: 1px solid transparent;
    border-image: linear-gradient(135deg, var(--primary-color), var(--epic-color)) 1;
    border-radius: 6px;

    box-shadow: 0 0 8px rgba(175, 82, 222, 0.5);
    animation: helper-pulse 2.5s infinite ease-in-out;
}

.helper-message .username {
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-color), var(--epic-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: helper-text-readable-shine 2s infinite;
}

@keyframes helper-pulse {
    0% {
        box-shadow: 0 0 8px rgba(88, 134, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 16px rgba(175, 82, 222, 0.7);
    }
    100% {
        box-shadow: 0 0 8px rgba(88, 134, 255, 0.5);
    }
}


@keyframes helper-text-readable-shine {
    0%, 100% {

        text-shadow: 0 0 1px #ffffff, 0 0 4px var(--primary-color);
    }
    50% {
        text-shadow: 0 0 1px #ffffff, 0 0 8px var(--epic-color);
    }
}

#incubator-tab {
    padding: 20px;
    align-items: center;
    justify-content: center;
}

#incubator-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 750px; /* 최대 너비 설정 */
}

.incubator-slot {
    width: 100%;
    aspect-ratio: 1 / 1.2; /* 슬롯 비율 조정 */
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    gap: 15px;
    text-align: center;
    font-size: 1.1em;
    transition: all 0.2s ease;
}

.incubator-slot.empty:hover {
    border-color: var(--success-color);
    background-color: rgba(52, 199, 89, .1);
    cursor: pointer;
}

.incubator-slot-egg-image {
    width: 60%;
    height: auto;
    aspect-ratio: 1 / 1;
}

.incubator-slot-egg-image .inventory-item {
    width: 100%;
    height: 100%;
    cursor: pointer;
    border: none;
    background: none;
}

.hatching-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.progress-bar {
    width: 90%;
    height: 20px;
}

#hatch-timer { /* 이 선택자는 이제 각 슬롯 내부의 타이머를 가리킵니다. */
    font-size: 1em;
    font-weight: 500;
}

#hatch-button { /* 이 선택자는 이제 각 슬롯 내부의 버튼을 가리킵니다. */
    padding: 10px 20px;
    font-size: 1em;
}

.inventory-item.prefix-완벽 {
    border-color: #E0E0E0; /* 밝은 회색 */
    box-shadow: 0 0 10px #FFFFFF;
}
.inventory-item.prefix-격노 {
    border-color: #FF4D4D;
    box-shadow: 0 0 12px #FF4D4D;
    animation: pulse-fury 1.5s infinite;
}
.inventory-item.prefix-파멸 {
    border-color: #B388FF;
    box-shadow: 0 0 12px #B388FF;
    animation: pulse-ruin 2.0s infinite;
}
.inventory-item.prefix-포식자 {
    border-color: #CF2222;
    box-shadow: 0 0 12px #CF2222;
    animation: pulse-predator 2.5s infinite;
}
.inventory-item.prefix-계시 {
    border-color: #FFD700;
    box-shadow: 0 0 12px #FFD700;
    animation: pulse-revelation 1.8s infinite;
}

@keyframes pulse-fury { 50% { box-shadow: 0 0 20px #FF8A80; } }
@keyframes pulse-ruin { 50% { box-shadow: 0 0 20px #D1C4E9; } }
@keyframes pulse-predator { 50% { box-shadow: 0 0 20px #EF5350; } }
@keyframes pulse-revelation { 50% { box-shadow: 0 0 20px #FFF176; } }

/* --- 신규 버프 아이콘 스타일 --- */
.buff-icon.awakening { background-color: var(--gold-color); color: #000; box-shadow: 0 0 8px var(--gold-color); }
.buff-icon.fury-attack { background-color: #FF4D4D; color: #fff; box-shadow: 0 0 8px #FF4D4D; }
.buff-icon.fury-defense { background-color: #4D94FF; color: #fff; box-shadow: 0 0 8px #4D94FF; }
.buff-icon.predator-state { background-color: #CF2222; color: #fff; box-shadow: 0 0 8px #CF2222; }
.buff-icon.predator-endurance { background-color: #550000; color: #fff; border: 1px solid #CF2222; box-shadow: 0 0 8px #550000; }

.item-prefix-description {
    font-size: 0.85em; /* 폰트 크기 */
    color: #a0a0a0;     /* 회색 계열 텍스트 */
    margin-top: 4px;      /* 이름과의 간격 */
    font-style: italic;   /* 이탤릭체 */
}

/* 세트 효과 표시 컨테이너 */
.set-effect-container {
    text-align: center;
    margin-top: 15px; /* 장비 슬롯과의 간격 */
    padding: 10px;
    border-radius: 8px;
    min-height: 60px; /* 최소 높이 확보 */
    transition: all 0.3s ease-in-out;
}

/* 세트 효과 비활성화 시 */
.set-effect-container.inactive {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
}

/* 세트 효과 활성화 시 */
.set-effect-container.active {
    border: 1px solid; /* 테두리 추가 */
}

.set-effect-container h4 {
    margin-bottom: 5px;
    font-size: 1.1em;
    font-weight: 700;
}

.set-effect-container p {
    font-size: 0.9em;
    line-height: 1.5;
}

/* 세트별 활성화 스타일 */
.set-effect-완벽 { border-color: #FFFFFF; color: #FFFFFF; text-shadow: 0 0 8px #FFFFFF; }
.set-effect-격노 { border-color: #FF4D4D; color: #FF4D4D; text-shadow: 0 0 8px #FF4D4D; }
.set-effect-파멸 { border-color: #B388FF; color: #B388FF; text-shadow: 0 0 8px #B388FF; }
.set-effect-포식자 { border-color: #CF2222; color: #CF2222; text-shadow: 0 0 8px #CF2222; }
.set-effect-계시 { border-color: #FFD700; color: #FFD700; text-shadow: 0 0 8px #FFD700; }

/* --- 주문서 탭 UI 개선 스타일 --- */
#scroll-target-slot-container {
    display: flex;
    align-items: center;
    gap: 20px;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    background-color: var(--bg-color-dark);
    width: 100%;
}

#scroll-target-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: stretch; /* 높이를 부모에 맞춤 */
}

#scroll-target-item-details h3 {
    font-size: 1.4em;
    margin: 0 0 10px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

#scroll-item-stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 1.1em;
    flex-grow: 1; /* 남은 공간을 모두 차지 */
    justify-content: center; /* 수직 중앙 정렬 */
}

#scroll-item-stats-list > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#scroll-item-stats-list > div .stat-name {
    color: var(--text-muted);
}

#scroll-item-stats-list > div .stat-value {
    font-weight: bold;
}
.item-enchantment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px 2px; /* 세로 간격, 가로 간격 */
}

#scroll-enhancement-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 10px;
    padding: 10px;
}

#scroll-target-sector {
    flex: 1.5; 
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 0; 
    overflow-y: auto;
}

#scroll-material-sector {
    flex: 1; 
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 0; 
}

#scroll-material-grid {
    overflow-y: auto;
    flex-grow: 1;
}

#scroll-target-slot-container {
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: var(--bg-color-dark);
    width: 100%;
    max-width: 500px;
}

#scroll-target-item-image {
    width: 130px; 
    height: 130px;
    cursor: default;
    flex-shrink: 0;
    padding: 5px;
}

#scroll-target-item-details {
    flex-grow: 1;
}

#scroll-item-stats-list {
    font-size: 1.05em;
}

#scroll-execute-btn {
    margin-top: 15px;
}

#item-info-modal .modal-content {
    width: 90%;          
    max-width: 550px;   
    padding: 30px;       
}

#item-info-modal .item-image-wrapper {
    width: 200px;       
    height: 200px;      
}

#item-info-modal h3 {
    font-size: 1.6em;    
}

#item-info-modal #scroll-item-stats-list {
    font-size: 1.15em;   
}
#item-info-modal .modal-stats-list > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}




#refinement-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 10px;
    padding: 10px;
}

#refinement-target-sector {
    flex: 1.5;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-height: 0; 
    overflow-y: auto; 
}

#refinement-target-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

#refinement-info-panel {
    width: 100%;
    text-align: center;
}

#refinement-info-panel h3 {
    font-size: 1.4em;
    margin-bottom: 8px;
}

#refinement-level-text {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--success-color);
    margin-bottom: 8px;
}

.refinement-exp-bar {
    width: 100%;
    height: 25px;
    background-color: rgba(0,0,0,0.4);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    border: 1px solid #000;
    margin-bottom: 8px;
}

.refinement-exp-bar-inner {
    height: 100%;
    background: linear-gradient(to right, #3498db, #2ecc71);
    transition: width 2s ease-in-out;
}

.refinement-exp-bar-text {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

#refinement-effect-text {
    font-size: 1.1em;
    color: var(--text-muted);
    font-weight: bold;
}

#refinement-materials-input {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 400px;
    min-height: 120px;
}

.refinement-material-slot {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: rgba(0,0,0,0.3);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.refinement-material-slot .item-image img {
    padding: 4px;
}

#refinement-action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
    max-width: 400px;
}

#refinement-action-buttons .action-btn {
    flex: 1;
}

#refinement-action-buttons .enhance-execute-btn {
    flex: 2;
    padding: 15px;
    font-size: 1.2em;
}

#refinement-material-sector {
    flex: 1;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#refinement-material-sector h4 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-muted);
}

#refinement-material-grid {
    overflow-y: auto;
    flex-grow: 1;
}

.item-refinement-level {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 0.8em;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 5px;
    border-radius: 4px;
    z-index: 1;
}

.slot.refine-aura-blue { box-shadow: 0 0 15px 3px #3498db, inset 0 0 10px 2px rgba(52, 152, 219, 0.5); }
.slot.refine-aura-purple { box-shadow: 0 0 20px 4px var(--epic-color), inset 0 0 12px 3px rgba(175, 82, 222, 0.5); animation: pulse-purple 2s infinite; }
.slot.refine-aura-orange { box-shadow: 0 0 25px 5px var(--legendary-color), inset 0 0 15px 4px rgba(255, 149, 0, 0.5); animation: pulse-orange 1.5s infinite; }
.slot.refine-aura-primal {
    box-shadow: 0 0 30px 6px var(--primal-color), inset 0 0 18px 5px rgba(0, 230, 210, 0.6);
    animation: sparkle-rainbow-15 4s linear infinite, lightning 2s linear infinite;
}

.floor-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}


.refinement-great-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4em;
    font-weight: 900;
    pointer-events: none;
    z-index: 10;
    animation: great-success-pop 1.5s cubic-bezier(.25, .46, .45, .94) forwards;
    background: linear-gradient(45deg, var(--primal-color), #ffd700, var(--mystic-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.8),
        0 0 10px var(--primal-color),
        0 0 20px #ffd700;
}

@keyframes great-success-pop {
    0% { transform: translate(-50%, -50%) scale(.5); opacity: 0; }
    40% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    to { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

.item-refinement-level {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 0.8em;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 5px;
    border-radius: 4px;
    z-index: 1;
    color: var(--primal-color); 
}


.slot.refine-aura-blue, .inventory-item.refine-aura-blue { box-shadow: 0 0 15px 3px #3498db, inset 0 0 10px 2px rgba(52, 152, 219, 0.5); }
.slot.refine-aura-purple, .inventory-item.refine-aura-purple { box-shadow: 0 0 20px 4px var(--epic-color), inset 0 0 12px 3px rgba(175, 82, 222, 0.5); animation: pulse-purple 2s infinite; }
.slot.refine-aura-orange, .inventory-item.refine-aura-orange { box-shadow: 0 0 25px 5px var(--legendary-color), inset 0 0 15px 4px rgba(255, 149, 0, 0.5); animation: pulse-orange 1.5s infinite; }
.slot.refine-aura-primal, .inventory-item.refine-aura-primal {
    box-shadow: 0 0 30px 6px var(--primal-color), inset 0 0 18px 5px rgba(0, 230, 210, 0.6);
    animation: sparkle-rainbow-15 4s linear infinite, lightning 2s linear infinite;
}

@keyframes pulse-success {
    0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7); }
    70% { box-shadow: 0 0 15px 20px rgba(52, 199, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.refinement-infused-animation {
    animation: pulse-success 0.7s ease-out;
}

.refinement-great-success-aura {

    animation: sparkle-rainbow-15 2s linear 1, lightning 1.5s linear 1;
    border-style: solid !important; 
    border-width: 3px !important;   
}

@keyframes great-success-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


.great-success-bar {
    background: linear-gradient(
        120deg, 
        #ffd700, 
        #ffab00, 
        var(--primal-color), 
        #ffd700,
        #ffab00
    );
    background-size: 200% 100%;
    animation: great-success-shimmer 2s linear infinite;
}


#announcement-banner.great-success {
    background: linear-gradient(
        135deg, 
        #ffde59, 
        #ff9500, 
        #ff2d55, 
        #af52de, 
        #00e6d2, 
        #ffde59
    );
    background-size: 300% 300%;
    color: #ffffff;
    font-weight: 900;
    border: 2px solid #fff;
    box-shadow: 0 0 20px 7px rgba(255, 255, 255, 0.8), 
                0 0 40px 15px rgba(255, 215, 0, 0.7);
    animation: great-success-flow 4s ease-in-out infinite; 
}


@keyframes great-success-pulse {
    0% {
        box-shadow: 0 0 10px 3px rgba(255, 215, 0, 0.4), 
                    0 0 20px 8px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 25px 8px rgba(255, 215, 0, 0.9), 
                    0 0 50px 20px rgba(255, 255, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 10px 3px rgba(255, 215, 0, 0.4), 
                    0 0 20px 8px rgba(255, 255, 255, 0.3);
    }
}

#announcement-banner.great-success {
    background: linear-gradient(135deg, #28231E, #4A3F35); 
    color: #FFD700; 
    font-weight: 900;
    border: 2px solid #FFD700;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    animation: great-success-pulse 1.5s ease-in-out infinite; 
}

#announcement-banner.great-success span {
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}



.system-message.great-success-chat {
    background-color: rgba(255, 215, 0, 0.1);
    border: 1px solid #FFD700; 
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); 
    text-align: center;
    font-weight: bold;
    color: #FFD700;
    padding: 10px;
    margin: 8px 0 !important;
    text-shadow: none; 
    animation: none;  
}



.dps-result-overview h3, .dps-result-overview h4 {
    margin: 0;
}

.dps-stat-block h4 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.dps-stat-block p {
    margin: 8px 0;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
}

.dps-stat-block p span {
    font-weight: bold;
}

.dps-ranking-entry:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

#chat-messages li.dps-boast-message {
    background-color: rgba(230, 126, 34, 0.1);
    border: 1px solid #e67e22;
    font-weight: bold;
    color: var(--primal-color);
    transition: background-color 0.2s;
    text-align: center;
    padding: 8px;
}

#chat-messages li.dps-boast-message:hover {
    background-color: rgba(230, 126, 34, 0.2);
}


.character-header h2 {
    display: flex;
    align-items: center;
    gap: 10px; 
    flex-wrap: nowrap;
}

#potion-buffs-display {
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: flex-start;
    font-size: 0.5em; 
    line-height: 1.4; 
    margin: 0 10px; 
    color: var(--text-muted);
}

.potion-buff-timer {
    font-weight: normal;
    white-space: nowrap; 
}

.potion-buff-timer .timer {
    font-weight: bold;
    color: var(--success-color); 
}

.character-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.character-header-left {
    display: flex;
    align-items: center; 
    gap: 20px;
}

#potion-buffs-display {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    font-size: 14px; 
    line-height: 1.5;
    color: var(--text-muted);
    border-left: 2px solid var(--border-color); 
    padding-left: 15px;
}

.potion-buff-timer {
    font-weight: 500;
    white-space: nowrap;
}

.potion-buff-timer .timer {
    font-weight: 700;
    color: var(--success-color);
    margin-left: 5px;
}

#spirit-summon-modal .modal-content {
    gap: 15px; 
}

#spirit-summon-buttons button {
    width: 48%; 
    padding: 12px !important;
    font-size: 1.1em !important;
}


.pvp-ranking-container {
    display: flex;
    gap: 20px;
}
.pvp-ranking-section {
    flex: 1;
}
.pvp-ranking-section h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
#pvp-my-rank-info p {
    font-size: 1.2em;
    line-height: 1.8;
}
#pvp-my-rank-info .rp-value {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.5em;
}
#pvp-my-rank-info .win-loss {
    color: var(--text-muted);
}


.pvp-match-content {
    width: 90%;
    max-width: 1000px;
    text-align: center;
}
.pvp-match-title {
    font-size: 1.8em;
    color: var(--secondary-color);
}
.pvp-match-timer {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0 20px 0;
}
.pvp-arena {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.pvp-player-panel {
    flex: 1;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 8px;
}
.pvp-player-name {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 5px;
}
.pvp-player-rp {
    font-size: 1.1em;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.pvp-damage-bar {
    width: 100%;
    height: 35px;
    background-color: rgba(0, 0, 0, .3);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}
.pvp-damage-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #28b485, #7ed56f);
    transition: width 0.5s linear;
}
#pvp-opponent-panel .pvp-damage-bar-inner {
    background: linear-gradient(to right, #c0392b, #e74c3c);
}
.pvp-damage-bar-text {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}
.pvp-vs-text {
    font-size: 3em;
    font-weight: bold;
    color: var(--fail-color);
}

.pvp-result-content {
    text-align: center;
    max-width: 500px;
}
#pvp-result-body {
    font-size: 1.2em;
    line-height: 1.8;
    margin: 20px 0;
}
.rp-change {
    font-size: 1.5em;
    font-weight: bold;
}
.rp-gain {
    color: var(--success-color);
}
.rp-loss {
    color: var(--fail-color);
}


.pvp-management-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    height: 100%;
}
#pvp-snapshot-info {
    background-color: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    min-height: 100px;
}
#pvp-register-snapshot-btn {
    width: 60%;
}



.pvp-snapshot-panel {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 650px; 
    margin: 0 auto;
}

.pvp-snapshot-panel .player-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.pvp-snapshot-panel .player-name {
    font-size: 1.5em;
    font-weight: bold;
}

.pvp-snapshot-panel .player-level {
    font-size: 1em;
    color: var(--text-muted);
}

.pvp-snapshot-panel .pvp-rp-display {
    font-size: 1.2em;
}

.pvp-snapshot-panel .rp-value {
    font-weight: bold;
    color: var(--primary-color);
}

.pvp-snapshot-panel .equipment-section {
    margin-bottom: 20px;
}


.pvp-snapshot-panel .equipment-slots {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.pvp-snapshot-panel .slot {
    height: 120px;
    border-style: solid;
    border-width: 2px;
    background-color: rgba(0,0,0,0.3);
}

.player-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-line {
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
}

.stat-line .stat-value {
    font-weight: bold;
    color: var(--text-color);
}

.pvp-artifact-info {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.pvp-artifact-info h4 {
    color: var(--text-muted);
    font-size: 1em;
    margin-bottom: 15px;
}

.pvp-artifact-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.pvp-artifact-slot {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-color-dark);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.pvp-artifact-slot.active {
    background-color: var(--legendary-color);
    border-color: var(--gold-color);
    box-shadow: 0 0 15px var(--legendary-color);
}

.pvp-match-content {
    width: 95%; 
    max-width: 1600px; 
    gap: 15px;
    display: flex;
    flex-direction: column;
}
.pvp-player-panel {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1; 
}
.pvp-spec-display {
    overflow: hidden;
}
.pvp-spec-display .player-panel {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: rgba(0,0,0,0.2);
}
.pvp-spec-display .player-panel .player-name {
    font-size: 1.3em;
}
.pvp-spec-display .player-panel .slot {
    height: 110px;
}
.pvp-spec-display .player-panel .stat-line {
    font-size: 1em;
}
.pvp-buff-display {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    min-height: 30px; 
    padding: 5px;
    border-radius: 4px;
    background-color: rgba(0,0,0,0.3);
}
.pvp-buff-display .buff-icon {
    padding: 3px 8px;
    font-size: 0.9em;
    animation: none;
}

#dps-leaderboard-list, #dps-personal-list {
    max-height: 350px; 
    overflow-y: auto;  
    padding-right: 15px; 
}


.top-buttons #raid-auction-reopen-btn {
    background: linear-gradient(45deg, #ff9500, #ffd700);
    color: #111;
    font-weight: bold;
    border: 1px solid #fff;
    animation: glitter 1.5s infinite;
}

.raid-auction-content {
    max-width: 800px;
    width: 95%;
}

.raid-auction-body {
    display: flex;
    gap: 25px;
    margin-top: 20px;
}

.auction-item-display {
    flex: 1;
    text-align: center;
    padding: 20px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
}

#auction-item-slot {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px auto;
    border-style: solid;
}

#auction-item-name {
    font-size: 1.5em;
    margin-bottom: 10px;
}

#auction-item-desc {
    font-size: 1em;
    color: var(--text-muted);
    min-height: 40px;
}

.auction-info-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
}

.auction-timer {
    font-size: 3em;
    font-weight: bold;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--secondary-color);
}

.auction-status {
    background-color: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.auction-status p {
    font-size: 1.2em;
    line-height: 1.8;
    display: flex;
    justify-content: space-between;
}

.bid-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.bid-input-wrapper {
    display: flex;
    gap: 10px;
}

#auction-bid-input {
    flex-grow: 1;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-color-dark);
    color: var(--text-color);
    font-size: 1em;
}

#auction-bid-manual-btn {
    padding: 0 25px;
}

#auction-bid-immediate-btn {
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
}

#auction-bid-immediate-btn.disabled {
    background-color: #555;
    cursor: not-allowed;
    text-shadow: none;
}

.auction-message {
    margin-top: 15px;
    text-align: center;
    color: var(--fail-color);
    min-height: 20px;
}

.raid-auction-sequence {
    font-size: 1.2em;
    color: var(--text-muted);
    width: 100%; 
    text-align: right; 
    padding-right: 10px;
    margin-top: -10px; 
}


#raid-auction-chat-container {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

#raid-auction-chat-messages {
    height: 300px; 
    overflow-y: auto; 
    padding: 10px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 6px;
}


#raid-auction-chat-messages li {
    padding: 6px 10px;
    line-height: 1.5;
    font-size: 1.1em;
    word-break: break-all;
    border-radius: 4px;
    margin-bottom: 4px;
}

#raid-auction-chat-messages li .username {
    font-weight: 700;
    color: var(--secondary-color);
    margin-right: 8px;
    cursor: default;
    user-select: none;
}

#raid-auction-modal h2 small {
    display: block;
    font-size: 0.5em;
    font-weight: normal;
    color: var(--text-muted);
    margin-top: 5px;
}


#raid-auction-chat-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#raid-auction-chat-input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    background: var(--bg-color-dark);
    color: var(--text-color);
    padding: 10px;
    border-radius: 6px;
    font-size: 1em;
}

#raid-auction-chat-form button {
    padding: 0 20px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

.bid-controls .bid-input-wrapper,
.bid-controls #auction-bid-immediate-btn {
    width: 100%;
}

.transcend-btn {
    background: linear-gradient(45deg, var(--primal-color), var(--epic-color), var(--gold-color));
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    text-shadow: 0 0 5px #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

.transcend-btn:disabled {
    background: #444;
    color: #777;
    cursor: not-allowed;
}

.prefix-transcend {
    font-weight: 900;
    background: linear-gradient(45deg, #00e6d2, #ff2d55, #ffd700, #af52de);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: transcend-text-flow 4s ease infinite;
}

.inventory-item.prefix-초월 {
    position: relative;
    border-style: solid;
    border-width: 3px;
    border-image-slice: 1;
    border-image-source: linear-gradient(45deg, #00e6d2, #ff2d55, #ffd700, #af52de);
    animation: transcend-border-flow 4s ease infinite, transcend-glow 2s ease-in-out infinite alternate;
    overflow: hidden; 
}

.inventory-item.prefix-초월::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: rotate(45deg);
    animation: transcend-shine 5s linear infinite;
}

@keyframes transcend-text-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes transcend-border-flow {
    0% { border-image-source: linear-gradient(45deg, #00e6d2, #ff2d55, #ffd700, #af52de); }
    25% { border-image-source: linear-gradient(45deg, #ff2d55, #ffd700, #af52de, #00e6d2); }
    50% { border-image-source: linear-gradient(45deg, #ffd700, #af52de, #00e6d2, #ff2d55); }
    75% { border-image-source: linear-gradient(45deg, #af52de, #00e6d2, #ff2d55, #ffd700); }
    100% { border-image-source: linear-gradient(45deg, #00e6d2, #ff2d55, #ffd700, #af52de); }
}

@keyframes transcend-glow {
    from {
        box-shadow: 0 0 8px rgba(0, 230, 210, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(175, 82, 222, 0.8), 0 0 8px rgba(255, 255, 255, 0.5) inset;
    }
}

@keyframes transcend-shine {
    from {
        transform: rotate(45deg) translateX(-200%);
    }
    to {
        transform: rotate(45deg) translateX(200%);
    }
}

.transcend-announcement-message {
    background: linear-gradient(-45deg, #000000, #2d004d, #00e6d2, #ffd700, #000000);
    background-size: 400% 400%;
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 10px 15px !important;
    margin: 8px 0 !important;
    box-shadow: 0 0 10px 2px rgba(0, 230, 210, 0.6);
    animation: primal-gradient-flow 5s ease infinite;
    text-align: center;
    line-height: 1.6;
    color: #fff !important;
    font-size: 1.1em;
    text-shadow: 0 0 5px #000;
}

.transcend-announcement-message span {
    animation: text-flicker 3s linear infinite;
}


.set-effect-초월 {
    border-width: 2px;
    border-style: solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(45deg, #00e6d2, #ff2d55, #ffd700, #af52de);
    animation: transcend-border-flow 4s ease infinite, transcend-glow 2s ease-in-out infinite alternate;
    background: rgba(0, 0, 0, 0.3);
}





.whale-monitoring-container {
    display: flex;
    gap: 20px;
    flex-grow: 1;
    min-height: 0;
}

.whale-list-panel, .whale-portfolio-panel {
    background-color: var(--surface-color);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.whale-list-panel {
    flex: 1;
}

.whale-portfolio-panel {
    flex: 2;
}

.whale-list-panel h4, .whale-portfolio-panel h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#admin-whale-list, #admin-whale-portfolio-details {
    overflow-y: auto;
    flex-grow: 1;
}

#admin-whale-list .feed-list-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-color-dark);
    display: flex;
    justify-content: space-between;
}

#admin-whale-list .feed-list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
#admin-whale-list .feed-list-item.selected {
    background-color: var(--primary-color);
    color: white;
}
#admin-whale-list .feed-list-item .gold-text {
    font-weight: bold;
}

#admin-whale-portfolio-details table {
    width: 100%;
    border-collapse: collapse;
}

#admin-whale-portfolio-details th, #admin-whale-portfolio-details td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

#admin-whale-portfolio-details th {
    text-align: right;
    color: var(--text-muted);
}
#admin-whale-portfolio-details th:first-child,
#admin-whale-portfolio-details td:first-child {
    text-align: left;
}

@media (max-width: 820px) {
    .whale-monitoring-container {
        flex-direction: column;
        height: auto;
        min-height: 500px;
        gap: 10px;
    }
}

#admin-coin-list .feed-list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
#admin-coin-list .feed-list-item.selected {
    background-color: var(--primary-color);
    color: white;
}
#admin-coin-holders-details table {
    width: 100%;
    border-collapse: collapse;
}
#admin-coin-holders-details th, #admin-coin-holders-details td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}
#admin-coin-holders-details th {
    color: var(--text-muted);
}
#admin-coin-holders-details th:first-child,
#admin-coin-holders-details td:first-child {
    text-align: left;
}

.custom-announcement {
    padding: 0 !important;
    background: none !important;
    border: none !important;
    margin: 12px 0 !important;
}

.announcement-box {
    border-radius: 8px;
    padding: 16px;
    color: #fff;
    text-align: center;
    line-height: 1.6;
    overflow: hidden;
    position: relative;
}

.announcement-header {
    font-size: 1.4em;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.announcement-body {
    font-size: 1.1em;
}

.coin-name-highlight {
    font-weight: bold;
    font-size: 1.2em;
}

.countdown-timer {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 8px;
}


.announcement-listing {
    background: linear-gradient(135deg, #0a3d2e, #0c5c45);
    border: 1px solid #34c759;
    box-shadow: 0 0 20px rgba(52, 199, 89, 0.6), inset 0 0 15px rgba(0,0,0,0.5);
}
.announcement-listing .announcement-header {
    color: #34c759;
    text-shadow: 0 0 10px #34c759;
}
.announcement-listing .coin-name-highlight {
    color: #ffd700;
}


.announcement-delisting {
    background: linear-gradient(135deg, #4d1010, #6e1616);
    border: 1px solid #ff3b30;
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.6), inset 0 0 15px rgba(0,0,0,0.5);
}
.announcement-delisting .announcement-header {
    color: #ff3b30;
    text-shadow: 0 0 10px #ff3b30;
}
.announcement-delisting .coin-name-highlight {
    color: #c7c7c7;
}

#abyssal-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

#mysterious-coin-shop-grid .item-image,
#abyssal-shop-grid .item-image {
    width: 60%;
    padding-top: 60%; 
    margin: 0 auto 15px auto;
}

#mysterious-coin-shop-grid .item-image img,
#abyssal-shop-grid .item-image img {
    padding: 0; 
}

#mysterious-coin-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important; 
    max-width: none !important; 
}

.admin-form-grid .admin-stat-display {
    background-color: var(--bg-color-dark);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



#admin-insignia-stats-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

#admin-insignia-stats-container h4 {
    font-size: 1.3em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.admin-stat-group {
    margin-bottom: 15px;
}

.admin-stat-group h5 {
    font-size: 1.1em;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 5px;
}

.admin-stat-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr 1fr;
    gap: 10px;
    background-color: var(--bg-color-dark);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.95em;
    margin-bottom: 5px;
}

.admin-stat-row span:first-child {
    font-weight: bold;
}


#cash-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
}


@media (max-width: 820px) {
    #cash-shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cash-shop-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 15px;
    text-align: center;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cash-shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.cash-shop-item .item-image {
    width: 70%;
    margin: 0 auto 20px auto;
}

.cash-shop-item .item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 15px;
}

.cash-shop-item .item-price {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-color);
    margin-top: 8px;
}

.cash-shop-item .item-price.discounted {
    color: var(--success-color);
    font-size: 1.3em;
}

.cash-shop-buy-btn {
    width: 100%;
    padding: 10px;
    font-size: 1.1em;
}

.cash-shop-buy-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

#game-footer {
    width: 100%;
    padding: 15px;
    text-align: center;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

#business-info-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}

#business-info-btn:hover {
    color: var(--text-color);
}

.business-info-table {
    margin-top: 20px;
    font-size: 1.1em;
}

.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    flex-basis: 150px;
    font-weight: bold;
    color: var(--text-muted);
}

.info-value {
    flex-grow: 1;
}



#policy-modal {
    z-index: 10003; 
}

#policy-modal .box_section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgb(0 0 0 / 1%), 0 6px 6px rgb(0 0 0 / 6%);
    padding: 40px 50px;
    color: #333d4b;
    text-align: left;
}

#policy-modal h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #4e5968;
    text-align: center;
}

#policy-modal h4 {
    margin: 20px 0 8px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333d4b;
}

#policy-modal p, 
#policy-modal li {
    margin: 0 0 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #4e5968;
    font-size: 15px;
    line-height: 1.7;
}

#policy-modal ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

#policy-modal strong {
    font-weight: 600;
    color: #333d4b;
}

#policy-modal #policy-content {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e8eb;
    padding: 20px;
    border-radius: 7px;
    margin-bottom: 20px;
    background-color: #f9fafb;
}

#policy-modal #policy-agreement {
    text-align: center;
    margin-top: 20px;
}

#policy-modal #policy-agreement label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-size: 1.1em;
    color: #333d4b;
}

#policy-modal #agree-policy-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

#policy-modal .button {
  color: #f9fafb;
  background-color: #3182f6;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  border: 0 solid transparent;
  user-select: none;
  transition: background 0.2s ease;
  text-decoration: none;
  border-radius: 7px;
  padding: 11px 16px;
}

#policy-modal .button:hover {
  background-color: #1b64da;
}

#policy-modal .button:disabled {
  background-color: #e5e8eb;
  cursor: not-allowed;
}


#foundry-timer {
    background: linear-gradient(45deg, #2c0b4d, #5b2c8c);
    border: 1px solid #8e44ad;
    color: #fff;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(0,0,0,0.7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    margin-left: auto; 
    white-space: nowrap;
    display: none; 
}

.monster-header-controls {
    display: flex;
    align-items: center;
    width: 100%;
}


#chat-custom-modal .modal-content {
    max-width: 800px;
}

.custom-section {
    margin-bottom: 25px;
}

.custom-section h3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.custom-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.custom-option {
    border: 2px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: var(--bg-color-dark);
}

.custom-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.custom-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.custom-option-preview {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
    padding: 10px 0;
    border-radius: 4px;
    background-color: var(--bg-color-light);
}

.chat-nickname-aurora {
    background: linear-gradient(90deg, #ff80ff, #80ffff, #ffff80, #ff80ff);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: aurora-flow 3s linear infinite;
}
@keyframes aurora-flow { to { background-position: 200% center; } }

.chat-nickname-gold {
    background: linear-gradient(45deg, #ffd700, #f0c75a, #d4af37, #ffd700);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: aurora-flow 4s linear infinite;
}

.chat-nickname-primal {
    background: linear-gradient(45deg, var(--primal-color), #ffffff, var(--primal-color));
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: aurora-flow 3s linear infinite;
}

.chat-nickname-fire {
    text-shadow: 0 0 4px #fff, 0 0 6px #ff0, 0 0 10px #f90;
    color: #ffc288;
    animation: fire-flicker 2s ease-in-out infinite alternate;
}
@keyframes fire-flicker { 
    0% { text-shadow: 0 0 4px #fff, 0 0 6px #ff0, 0 0 10px #f90; }
    100% { text-shadow: 0 0 6px #fff, 0 0 8px #ff0, 0 0 12px #f00; }
}

.chat-box-pulsing-primal {
    border: 1px solid transparent;
    border-radius: 6px;
    box-shadow: 0 0 8px var(--primal-color);
    background-color: rgba(0, 230, 210, 0.05);
    animation: pulsing-border-primal 2s infinite alternate;
}
@keyframes pulsing-border-primal {
    from { box-shadow: 0 0 8px var(--primal-color); }
    to { box-shadow: 0 0 16px #fff, 0 0 20px var(--primal-color); }
}

.chat-box-pulsing-mystic {
    border: 1px solid transparent;
    border-radius: 6px;
    box-shadow: 0 0 8px var(--mystic-color);
    background-color: rgba(255, 45, 85, 0.05);
    animation: pulsing-border-mystic 2s infinite alternate;
}
@keyframes pulsing-border-mystic {
    from { box-shadow: 0 0 8px var(--mystic-color); }
    to { box-shadow: 0 0 16px #fff, 0 0 20px var(--mystic-color); }
}

.chat-box-dark-aurora {
    border-radius: 6px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    background: #111;
}
.chat-box-dark-aurora::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 0;
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 200% auto;
    animation: aurora-flow 3s linear infinite;
    opacity: 0.5;
}
.chat-box-dark-aurora .username, .chat-box-dark-aurora .message {
    position: relative;
}

input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-top: 10px;
    background-color: transparent;
}

.chat-nickname-neon {
    color: #fff;
    animation: neon-flicker 1.5s infinite alternate;
}
@keyframes neon-flicker {
  0%, 100% { text-shadow: 0 0 2px #fff, 0 0 5px #fff, 0 0 8px #0fa, 0 0 12px #0fa; }
  50% { text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #0fa, 0 0 18px #0fa; }
}

.chat-box-ghost {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    border-radius: 6px;
}

.chat-box-gold-border {
    background-color: rgba(255, 215, 0, 0.05);
    border: 1px solid #ffd700;
    border-radius: 6px;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.2);
}

#chat-form {
    display: flex;
    gap: 10px;
    padding: 15px; 
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, .2);
    align-items: center; 
}

#chat-submit-btn {
    padding: 0 25px;
    height: 44px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color .2s;
}

#chat-submit-btn:hover {
    background-color: #0056b3;
}


#open-chat-custom-btn {
    flex-shrink: 0; 
    height: 44px;
    padding: 0 15px;
    background: #fd79a8 !important;
   color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em; 
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s;
}

#open-chat-custom-btn:hover {
    background-color: #e86ca3;
}

.side-menu-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.side-menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.side-menu-panel {
    position: fixed;
    top: 0;
    left: 0; 
    width: 280px;
    height: 100%;
    background: var(--bg-color-light);
    border-right: 1px solid var(--border-color); 
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2); 
    z-index: 1001;
    transform: translateX(-100%); 
    transition: transform 0.3s ease-in-out;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-menu-panel.open {
    transform: translateX(0);
}

.side-menu-panel h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.side-menu-panel button,
.side-menu-panel a {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    text-align: center;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    color: var(--text-color);
    transition: background-color 0.2s, transform 0.2s;
}

.side-menu-panel a {
    display: flex;
    align-items: center;
    justify-content: center;
}

#side-menu-panel #auto-sell-button {
    background-color: #2980b9; 
}

#side-menu-panel #codex-button {
    background-color: #27ae60; 
}

#side-menu-panel #online-users-button { background-color: #9c27b0; }
#side-menu-panel #title-codex-button { background-color: #8e44ad; }
#side-menu-panel #abyssal-shop-button { background-color: #6a0dad; }
#side-menu-panel #dps-ranking-button { background-color: #e67e22; }
#side-menu-panel #pvp-ranking-button { background-color: #c0392b; }
#side-menu-panel #discord-button { background-color: #5865F2; }
#side-menu-panel a[href*="kakao"] { background-color: #FEE500; color: #191919; }
#side-menu-panel #mysterious-coin-shop-button { background-color: #48dbfb; color: #111; }
#side-menu-panel #insignia-button { background-color: #6a0dad; font-weight: bold; }