:root {
    --bg-primary: #171717;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #262626;
    --bg-card: #2a2a2a;
    --gradient-primary: linear-gradient(135deg, #ff6b9d 0%, #c44569 25%, #9b59b6 50%, #8e44ad 75%, #6c5ce7 100%);
    --gradient-secondary: linear-gradient(135deg, #ff9ff3 0%, #f368e0 25%, #e056fd 50%, #be2edd 75%, #a29bfe 100%);
    --gradient-accent: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 25%, #fd79a8 50%, #e84393 75%, #fd79a8 100%);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-accent: #ff6b9d;
    --border-primary: #3a3a3a;
    --border-accent: #ff6b9d;
    --shadow-primary: 0 10px 40px rgba(255, 107, 157, 0.3);
    --shadow-secondary: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --rarity-common: linear-gradient(135deg, #9e9e9e, #757575);
    --rarity-rare: linear-gradient(135deg, #2196f3, #1976d2);
    --rarity-epic: linear-gradient(135deg, #9c27b0, #7b1fa2);
    --rarity-legendary: linear-gradient(135deg, #ff9800, #f57c00);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 157, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(196, 69, 105, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(155, 89, 182, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.game-container {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* 상단 알림 */
.notification {
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: var(--shadow-primary);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 320px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.notification.show {
    top: 24px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.notification-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px rgba(255, 107, 157, 0.6));
}

.notification-message {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* 헤더 */
.game-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.game-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(255, 107, 157, 0.5);
    letter-spacing: -0.5px;
}

.player-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.2);
}

.stat:hover::before {
    opacity: 1;
}

/* 메인 게임 영역 */
.game-main {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.battle-section {
    grid-column: 1 / -1;
}

.battle-section, .inventory-section, .item-info-section, .log-section, .save-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.battle-section:hover, .inventory-section:hover, .item-info-section:hover, .log-section:hover {
    box-shadow: var(--shadow-secondary);
}

/* 배틀 섹션 */
.monster-area {
    text-align: center;
    margin-bottom: 24px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.monster-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-accent);
    opacity: 0.05;
    pointer-events: none;
}

.monster-avatar {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.4));
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-12px) scale(1.05); }
}

.monster-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.monster-hp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hp-bar {
    width: 280px;
    height: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hp-fill {
    height: 100%;
    background: var(--gradient-secondary);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(255, 107, 157, 0.6);
    position: relative;
}

.hp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 6px 6px 0 0;
}

#monster-hp-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.battle-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* 버튼 스타일 */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.6);
}

.btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* 섹션 제목 */
.inventory-section h3, .item-info-section h3, .log-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 12px;
}

.inventory-section h3::after, .item-info-section h3::after, .log-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

/* 인벤토리 */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    justify-content: center;
    max-width: 560px;
    margin: 0 auto;
}

/* 인벤토리 슬롯 스타일 개선 */
.inventory-slot {
    width: 64px;
    height: 64px;
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.inventory-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inventory-slot:hover::before {
    opacity: 0.1;
}

/* 모든 아이템 스프라이트를 상점 형식과 동일하게 */
.item-sprite {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    border-radius: 6px;
    background-repeat: no-repeat;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    display: block;
}

.item-detail-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    image-rendering: pixelated;
    background-repeat: no-repeat;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.shop-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    image-rendering: pixelated;
    background-repeat: no-repeat;
    background-size: 1968px 2304px;
    flex-shrink: 0;
}

.item-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* 아이템 정보 */
.item-details {
    min-height: 140px;
    max-height: 240px;
    overflow-y: auto;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: var(--text-secondary);
    text-align: center;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.6;
    filter: drop-shadow(0 0 10px rgba(255, 107, 157, 0.3));
}

/* 아이템 액션 버튼 컨테이너 */
.item-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* 판매 버튼 스타일 */
.sell-item-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #d35400 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    position: relative;
    overflow: hidden;
}

.sell-item-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.sell-item-btn:hover::before {
    left: 100%;
}

.sell-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5);
}

.sell-item-btn:active {
    transform: translateY(0);
}

/* 사용 버튼과 판매 버튼이 함께 있을 때 */
.item-actions .use-item-btn {
    margin-bottom: 0;
}

/* 반응형 - 모바일에서 버튼 크기 조정 */
@media (max-width: 768px) {
    .item-actions {
        gap: 10px;
    }
    
    .sell-item-btn, .use-item-btn {
        padding: 14px;
        font-size: 0.95rem;
    }
}

/* 아이템 상세 정보 카드 개선 */
.item-detail-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.item-detail-card:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.2);
}

/* 아이템 정보 행 스타일 개선 */
.item-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.item-detail-row:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 6px;
}

.item-detail-row:last-child {
    border-bottom: none;
}

/* 가치 표시 강조 */
.item-detail-row:nth-child(2) .item-detail-value {
    color: var(--text-accent);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.3);
}

.item-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.item-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.item-detail-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.item-detail-info {
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
}

.item-detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.item-detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

.item-rarity {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.item-rarity.common { background: var(--rarity-common); }
.item-rarity.rare { background: var(--rarity-rare); }
.item-rarity.epic { background: var(--rarity-epic); }
.item-rarity.legendary { background: var(--rarity-legendary); }

.use-item-btn {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: var(--gradient-secondary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.use-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
}

/* 로그 */
.log-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 16px;
    height: 180px;
    overflow-y: auto;
    font-size: 0.85rem;
}

.log-entry {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--border-accent);
    animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: all 0.3s ease;
}

.log-entry:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 저장 섹션 */
.save-section {
    grid-column: 1 / -1;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

#player-name {
    width: 100%;
    max-width: 320px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    text-align: center;
}

#player-name:focus {
    outline: none;
    border-color: var(--border-accent);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.2);
    transform: translateY(-2px);
}

#player-name::placeholder {
    color: var(--text-secondary);
}

.save-buttons {
    display: flex;
    gap: 16px;
}

/* 툴팁 */
.item-tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-primary);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-width: 240px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.item-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-primary);
}

.tooltip-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.tooltip-body {
    font-size: 0.8rem;
    line-height: 1.4;
}

.tooltip-type, .tooltip-rarity, .tooltip-value {
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.tooltip-description {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 반응형 */
@media (max-width: 768px) {
    .game-container {
        padding: 16px;
    }
    
    .game-main {
        grid-template-columns: 1fr;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .player-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .battle-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .save-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 스크롤바 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* 추가 애니메이션 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.stat:hover {
    animation: pulse 2s infinite;
}

/* 글로우 효과 */
.btn.primary:hover {
    box-shadow: 
        0 8px 30px rgba(255, 107, 157, 0.6),
        0 0 0 1px rgba(255, 107, 157, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.inventory-slot.occupied:hover {
    box-shadow: 
        0 8px 25px rgba(255, 107, 157, 0.4),
        0 0 0 2px rgba(255, 107, 157, 0.3);
}

/* 상점 모달 스타일 */
.shop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.shop-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-primary);
}

.shop-content h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.shop-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-item:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
}

.shop-item.unaffordable {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-item.unaffordable:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-primary);
}

.shop-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    image-rendering: pixelated;
    background-size: 1968px 2304px !important; /* 원본의 1/4 크기로 축소 */
    flex-shrink: 0;
}

.shop-item-info {
    flex: 1;
}

.shop-item-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.shop-item-price {
    color: var(--text-accent);
    font-weight: 600;
    margin-bottom: 3px;
}

.shop-item-stock {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.shop-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-primary);
}

.player-gold {
    font-weight: 600;
    color: var(--text-accent);
}

/* 플레이어 HP 섹션 */
.player-hp-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.player-hp-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-secondary);
}

.player-hp-section:hover {
    box-shadow: var(--shadow-secondary);
}

.player-avatar {
    font-size: 3.5rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.4));
    flex-shrink: 0;
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.player-name-display {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.player-hp {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-hp .hp-bar {
    width: 100%;
    max-width: 400px;
    height: 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.player-hp .hp-fill {
    height: 100%;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 50%, #2ecc71 100%);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(78, 205, 196, 0.6);
    position: relative;
}

.player-hp .hp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 8px 8px 0 0;
}

.player-hp .hp-text {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
}

/* 반응형 - 플레이어 HP 섹션 */
@media (max-width: 768px) {
    .player-hp-section {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .player-avatar {
        font-size: 3rem;
    }
    
    .player-info {
        width: 100%;
        align-items: center;
    }
    
    .player-hp .hp-bar {
        max-width: 280px;
    }
}

/* 모던 웹 스타일 툴팁 */
.tooltip {
    position: fixed;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 16px;
    border-radius: 12px;
    font-size: 13px;
    max-width: 280px;
    z-index: 10000;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-primary);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.tooltip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 12px 12px 0 0;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tooltip-icon {
    border-radius: 8px;
    image-rendering: pixelated;
    background-repeat: no-repeat;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tooltip-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
}

.tooltip-rarity {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.tooltip-rarity.common { 
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}
.tooltip-rarity.rare { 
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}
.tooltip-rarity.epic { 
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}
.tooltip-rarity.legendary { 
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.tooltip-description {
    margin-bottom: 10px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 12px;
}

.tooltip-value {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
}

.tooltip-count {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 12px;
}

/* 인벤토리 슬롯 호버 효과 개선 */
.inventory-slot:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
    transform: translateY(-2px);
}

.inventory-slot.occupied:hover {
    box-shadow: 0 6px 25px rgba(255, 107, 157, 0.4);
}

/* 모달 오버레이 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 모달 컨테이너 */
.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-primary);
    transform: translateY(30px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.modal-overlay.show .modal-container {
    transform: translateY(0) scale(1);
}

/* 모달 헤더 */
.modal-header {
    background: var(--bg-tertiary);
    padding: 24px 28px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    border-bottom: 1px solid var(--border-primary);
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    animation: modalIconPulse 2s ease-in-out infinite;
}

@keyframes modalIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.modal-title {
    flex: 1;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 107, 157, 0.2);
    color: var(--text-accent);
    transform: rotate(90deg);
}

/* 모달 바디 */
.modal-body {
    padding: 28px;
    text-align: center;
}

.modal-message {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    font-weight: 500;
}

/* 모달 푸터 */
.modal-footer {
    padding: 20px 28px 28px;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

/* 모달 버튼 */
.modal-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    min-width: 100px;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.modal-btn:hover::before {
    left: 100%;
}

.modal-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.6);
}

.modal-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.2);
}

.modal-btn:active {
    transform: translateY(0);
}

/* 반응형 모달 */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px 24px 16px;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .modal-footer {
        padding: 16px 24px 24px;
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-message {
        font-size: 1rem;
    }
}

/* 모달 애니메이션 효과 */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-overlay.show .modal-container {
    animation: modalSlideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
