/* ===== 전역 스타일 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FFD700;
    --secondary-color: #FF6B35;
    --dark-bg: #0a0e27;
    --card-bg: #1a1f3a;
    --text-light: #ffffff;
    --text-dim: #a8b2d1;
    --success-color: #4ade80;
    --legendary-color: #ff6b35;
    --mythic-color: #9d4edd;
    --glow-color: #FFD700;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    overflow: hidden;
    line-height: 1.4;
    height: 100vh;
}

/* ===== 음악 컨트롤 ===== */
.music-control {
    position: fixed;
    top: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: rgba(26, 31, 58, 0.95);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.music-control:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.music-control.playing {
    animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8); }
}

/* ===== 배경 효과 ===== */
.game-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
}

#particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* ===== 상태 바 ===== */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.status-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.character-icon {
    font-size: 40px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.player-info {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.player-level {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 500;
}

.status-center {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
}

.progress-container {
    width: 100%;
}

.progress-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    width: 0%;
    transition: width 0.8s ease;
    box-shadow: 0 0 20px var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.progress-text {
    text-align: center;
    font-size: 12px;
    margin-top: 3px;
    color: var(--text-dim);
    font-weight: 600;
}

.status-right {
    display: flex;
    gap: 10px;
}

.skills-acquired {
    display: flex;
    gap: 12px;
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: rgba(10, 14, 39, 0.8);
    border: 3px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0.3;
    transition: all 0.5s ease;
    position: relative;
    padding: 10px;
    filter: grayscale(100%);
}

.skill-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.skill-icon.acquired {
    opacity: 1;
    border-color: var(--primary-color);
    background: rgba(26, 31, 58, 1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    filter: grayscale(0%);
    animation: skillAcquiredPop 0.8s ease, skillGlow 2s ease-in-out infinite 0.8s;
}

/* 스킬 획득 팝업 애니메이션 */
@keyframes skillAcquiredPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 획득 후 지속 글로우 */
@keyframes skillGlow {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
        border-color: var(--primary-color);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.6);
        border-color: var(--secondary-color);
    }
}

/* 스킬 획득 시 빛나는 링 효과 */
.skill-icon.acquired::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    opacity: 0;
    animation: ringExpand 1s ease-out;
}

@keyframes ringExpand {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* 스킬 획득 시 파티클 효과 */
.skill-icon.acquired::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 20px;
    animation: sparkle 1s ease-out;
}

@keyframes sparkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* ===== 레벨업 효과 ===== */
.level-up-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
}

.level-up-effect.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: levelUpAnimation 2s ease;
}

@keyframes levelUpAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(10deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

.level-up-content {
    background: linear-gradient(135deg, var(--card-bg), #2a2f4a);
    border: 4px solid var(--primary-color);
    border-radius: 20px;
    padding: 60px 80px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px var(--primary-color), 0 0 100px var(--secondary-color);
}

.level-up-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--primary-color);
    animation: textGlow 1s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 20px var(--primary-color); }
    50% { text-shadow: 0 0 40px var(--primary-color), 0 0 60px var(--primary-color); }
}

.level-up-content p {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
}

.level-up-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.3;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.1; }
}

/* ===== 게임 컨테이너 ===== */
.game-container {
    margin-top: 80px;
    height: calc(100vh - 80px);
    position: relative;
    overflow: hidden;
}

.slide {
    height: calc(100vh - 80px);
    padding: 15px 30px 10px 30px;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow-y: auto;
}

.slide.active {
    display: block;
    opacity: 1;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Quest Start 화면 ===== */
.quest-start-screen {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.title-animation {
    margin-bottom: 60px;
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 42px;
    color: var(--primary-color);
    text-shadow: 4px 4px 0 var(--secondary-color),
                 0 0 30px var(--primary-color);
    margin-bottom: 15px;
    animation: titleFloat 3s ease-in-out infinite;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 2s infinite;
    color: #ff00ff;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 2s infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
}

.subtitle-box {
    background: rgba(26, 31, 58, 0.9);
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    padding: 30px 40px;
    max-width: 1000px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.4);
    animation: subtitleGlow 3s ease-in-out infinite;
}

@keyframes subtitleGlow {
    0%, 100% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.4);
        border-color: var(--primary-color);
    }
    50% {
        box-shadow: 0 0 60px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.3);
        border-color: var(--secondary-color);
    }
}

.subtitle {
    font-family: 'Press Start 2P', cursive;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 
        0 0 10px var(--primary-color),
        0 0 20px var(--primary-color),
        0 0 30px rgba(255, 215, 0, 0.5);
    animation: subtitlePulse 2s ease-in-out infinite;
    letter-spacing: 2px;
}

@keyframes subtitlePulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 
            0 0 10px var(--primary-color),
            0 0 20px var(--primary-color),
            0 0 30px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.02);
        text-shadow: 
            0 0 15px var(--primary-color),
            0 0 30px var(--primary-color),
            0 0 45px rgba(255, 215, 0, 0.7),
            0 0 60px rgba(255, 107, 53, 0.4);
    }
}

.subtitle-kr {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.subtitle-extra {
    font-size: 20px;
    color: var(--secondary-color);
    font-weight: 600;
    font-style: italic;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.character-showcase {
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.character-sprite {
    position: relative;
    margin-bottom: 20px;
    animation: characterBounce 2s ease-in-out infinite;
}

@keyframes characterBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.character-img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(255, 215, 0, 0.5));
}

.character-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.5), transparent);
    animation: shadowPulse 2s ease-in-out infinite;
}

@keyframes shadowPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
    50% { transform: translateX(-50%) scale(1.2); opacity: 0.3; }
}

.character-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.character-stats {
    display: flex;
    gap: 30px;
}

.stat {
    background: rgba(26, 31, 58, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 10px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.skills-preview {
    margin: 30px auto;
    max-width: 800px;
}

.skills-preview h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.skill-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.skill-item {
    background: rgba(26, 31, 58, 0.8);
    border: 2px solid #444;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.skill-item.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.skill-item:not(.locked) {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color);
    animation: skillUnlock 1s ease;
}

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

.skill-emoji {
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.skill-preview-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.skill-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
}

.team-info {
    margin: 40px 0;
    font-size: 18px;
    color: var(--text-dim);
}

/* ===== 버튼 스타일 ===== */
.pixel-button {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 18px;
    font-weight: 700;
    padding: 20px 40px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    color: var(--dark-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.pixel-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.pixel-button:hover::before {
    left: 100%;
}

.pixel-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

.pixel-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.4);
}

.start-button {
    margin-top: 40px;
    font-size: 24px;
    padding: 25px 60px;
}

/* ===== Quest Content ===== */
.quest-content {
    max-width: 1400px;
    margin: 0 auto;
}

.quest-content-horizontal {
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== 좌우 레이아웃 ===== */
.horizontal-layout {
    display: flex;
    gap: 30px;
    flex: 1;
    align-items: stretch;
}

/* ===== 캐릭터 가이드 영역 ===== */
.character-guide {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.character-avatar {
    text-align: center;
}

.guide-img {
    width: 250px;
    height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 10px 40px rgba(255, 215, 0, 0.6));
    animation: guideBounce 3s ease-in-out infinite;
}

@keyframes guideBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ===== 말풍선 ===== */
.speech-bubble {
    background: rgba(26, 31, 58, 0.95);
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    padding: 20px;
    position: relative;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.bubble-arrow {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 15px solid var(--primary-color);
}

.bubble-arrow::after {
    content: '';
    position: absolute;
    top: 3px;
    left: -12px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid rgba(26, 31, 58, 0.95);
}

.typing-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
    min-height: 80px;
}

/* 타이핑 애니메이션 */
.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary-color);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== 전략 맵 컨테이너 ===== */
.strategy-map-container {
    flex: 1;
    background: rgba(26, 31, 58, 0.6);
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    padding: 20px;
    overflow-y: auto;
}

.section-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 22px;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.section-title.glow {
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 20px var(--primary-color);
    }
    50% {
        text-shadow: 0 0 40px var(--primary-color), 0 0 60px var(--primary-color);
    }
}

.section-title.rainbow {
    background: linear-gradient(90deg, #ff6b35, #FFD700, #4ade80, #3b82f6, #9d4edd);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s linear infinite, titleGlow 2s ease-in-out infinite;
}

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

.title-icon {
    font-size: 40px;
    animation: iconSpin 3s ease-in-out infinite;
}

@keyframes iconSpin {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* ===== Battle Screen ===== */
.battle-screen {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.boss-defeated {
    background: rgba(26, 31, 58, 0.8);
    border: 3px solid var(--success-color);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    animation: victoryFlash 2s ease-in-out infinite;
    display: none; /* 초기에는 숨김 */
    opacity: 0;
}

@keyframes victoryFlash {
    0%, 100% {
        box-shadow: 0 0 30px rgba(74, 222, 128, 0.5);
    }
    50% {
        box-shadow: 0 0 50px rgba(74, 222, 128, 0.8), 0 0 70px rgba(74, 222, 128, 0.4);
    }
}

.defeat-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.defeat-icon {
    font-size: 60px;
    animation: defeatBounce 1s ease-in-out infinite;
}

@keyframes defeatBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.2) rotate(10deg); }
}

.defeat-message h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 26px;
    color: var(--success-color);
    text-shadow: 0 0 20px var(--success-color);
}

.defeat-message p {
    font-size: 18px;
    color: var(--text-dim);
}

.enemy-section,
.solution-section {
    background: rgba(26, 31, 58, 0.6);
    border: 3px solid var(--secondary-color);
    border-radius: 20px;
    padding: 40px;
}

.solution-section {
    border-color: var(--success-color);
}

.enemy-title,
.solution-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

.enemy-title {
    color: var(--secondary-color);
}

.solution-title {
    color: var(--success-color);
}

.enemy-hp-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.hp-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
}

.hp-bar {
    flex: 1;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--secondary-color);
    border-radius: 15px;
    overflow: hidden;
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, var(--secondary-color));
    transition: width 0.8s ease, background 0.5s ease;
    box-shadow: 0 0 20px var(--secondary-color);
}

/* HP 레벨별 색상 변화 */
.hp-fill.hp-high {
    background: linear-gradient(90deg, #ef4444, var(--secondary-color));
}

.hp-fill.hp-medium {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.hp-fill.hp-low {
    background: linear-gradient(90deg, #22c55e, #f59e0b);
    animation: hpWarning 1s ease-in-out infinite;
}

@keyframes hpWarning {
    0%, 100% { box-shadow: 0 0 20px #f59e0b; }
    50% { box-shadow: 0 0 40px #f59e0b, 0 0 60px #ef4444; }
}

.hp-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-light);
}

.problems-grid,
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.problem-card,
.solution-card {
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid rgba(255, 107, 53, 0.5);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(50px) scale(0.8);
}

/* 문제점 카드 순차 등장 애니메이션 */
.problem-card.appear {
    animation: problemAppear 0.8s ease forwards;
}

.problem-card[data-delay="0"].appear {
    animation-delay: 0.3s;
}

.problem-card[data-delay="1"].appear {
    animation-delay: 0.8s;
}

.problem-card[data-delay="2"].appear {
    animation-delay: 1.3s;
}

@keyframes problemAppear {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8) rotateX(-30deg);
    }
    60% {
        transform: translateY(-10px) scale(1.05) rotateX(5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

/* 문제점 카드 강조 효과 */
.problem-card.appear {
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.6);
}

.problem-card.appear .problem-icon {
    animation: iconPulse 1s ease-in-out;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3) rotate(10deg); }
}

.solution-card {
    border-color: rgba(74, 222, 128, 0.5);
}

.problem-card:hover,
.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.problem-icon,
.solution-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.problem-card h4,
.solution-card h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.problem-card p,
.solution-card p {
    font-size: 15px;
    color: var(--text-dim);
    line-height: 1.6;
}

.damage-badge,
.attack-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    animation: badgePulse 2s ease-in-out infinite;
}

.damage-badge {
    background: linear-gradient(135deg, #ef4444, var(--secondary-color));
    color: var(--text-light);
}

.attack-badge {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: var(--dark-bg);
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 데미지 플래시 효과 */
@keyframes damageFlash {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }
    50% { 
        transform: scale(1.3); 
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
    }
}

/* 아이콘 흔들기 효과 */
@keyframes iconShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-10px) rotate(-10deg); }
    75% { transform: translateX(10px) rotate(10deg); }
}

/* 승리 팝업 효과 */
@keyframes victoryPopup {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(50px);
    }
    60% {
        transform: scale(1.1) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.vs-divider {
    text-align: center;
    position: relative;
    margin: 30px 0;
}

.vs-circle {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: var(--dark-bg);
    box-shadow: 0 0 30px var(--primary-color);
    animation: vsRotate 3s linear infinite;
}

@keyframes vsRotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

.lightning-bolt {
    font-size: 60px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: lightningFlash 0.5s ease-in-out infinite;
    z-index: -1;
}

@keyframes lightningFlash {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===== Strategy Map (기존 스타일 유지) ===== */
.strategy-map {
    background: rgba(26, 31, 58, 0.6);
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.map-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.strategy-path {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.strategy-node {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    opacity: 0.5;
    transition: all 0.5s ease;
    position: relative;
}

.strategy-node.active {
    opacity: 1;
    animation: nodeActivate 0.8s ease;
}

@keyframes nodeActivate {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.node-number {
    min-width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: var(--dark-bg);
    box-shadow: 0 0 30px var(--primary-color);
}

.node-content {
    flex: 1;
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 20px;
    position: relative;
}

.strategy-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    animation: strategyBadgePulse 2s ease-in-out infinite;
}

.strategy-badge.attack {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

@keyframes strategyBadgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(74, 222, 128, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(74, 222, 128, 0.8); }
}

.node-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.node-content h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.node-content p {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 12px;
    line-height: 1.5;
}

.node-features {
    list-style: none;
    padding: 0;
}

.node-features li {
    font-size: 13px;
    color: var(--success-color);
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.node-features li::before {
    content: '▶';
    position: absolute;
    left: 0;
}

.node-line {
    position: absolute;
    left: 40px;
    top: 80px;
    width: 4px;
    height: 40px;
    background: linear-gradient(180deg, var(--primary-color), transparent);
}

.character-evolution {
    text-align: center;
    margin: 50px 0;
}

.evolution-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 10px 40px rgba(255, 215, 0, 0.6));
    animation: evolutionPulse 2s ease-in-out infinite;
}

@keyframes evolutionPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.evolution-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 15px;
    animation: textFloat 2s ease-in-out infinite;
}

@keyframes textFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Skill Acquire ===== */
.skill-acquire {
    text-align: center;
}

/* ===== 스킬 획득 페이지 좌우 레이아웃 ===== */
.skill-acquire-layout {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

.skill-character-area {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.skill-info-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.achievement-message {
    background: rgba(26, 31, 58, 0.9);
    border: 3px solid var(--success-color);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    animation: messageGlow 2s ease-in-out infinite;
    width: 100%;
}

.achievement-message.ultimate {
    border-color: var(--mythic-color);
    animation: ultimateMessageGlow 2s ease-in-out infinite;
}

@keyframes messageGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(74, 222, 128, 0.5); }
    50% { box-shadow: 0 0 40px rgba(74, 222, 128, 0.8); }
}

@keyframes ultimateMessageGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(157, 78, 237, 0.5); }
    50% { box-shadow: 0 0 40px rgba(157, 78, 237, 0.8); }
}

.achievement-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
    animation: iconBounce 1s ease-in-out infinite;
}

.achievement-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.6;
}

.skill-header {
    margin-bottom: 25px;
}

.weapon-showcase {
    background: rgba(26, 31, 58, 0.8);
    border: 4px solid var(--legendary-color);
    border-radius: 20px;
    padding: 30px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 0 50px rgba(255, 107, 53, 0.5);
    animation: weaponGlow 2s ease-in-out infinite;
}

@keyframes weaponGlow {
    0%, 100% { box-shadow: 0 0 50px rgba(255, 107, 53, 0.5); }
    50% { box-shadow: 0 0 80px rgba(255, 107, 53, 0.8), 0 0 120px rgba(255, 107, 53, 0.4); }
}

.weapon-showcase.ultimate {
    border-color: var(--mythic-color);
    box-shadow: 0 0 50px rgba(157, 78, 237, 0.5);
    animation: ultimateGlow 2s ease-in-out infinite;
}

@keyframes ultimateGlow {
    0%, 100% { box-shadow: 0 0 50px rgba(157, 78, 237, 0.5); }
    50% { box-shadow: 0 0 80px rgba(157, 78, 237, 0.8), 0 0 120px rgba(157, 78, 237, 0.4); }
}

.weapon-icon.mega {
    font-size: 120px;
    margin-bottom: 20px;
    animation: weaponFloat 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.weapon-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(255, 215, 0, 0.6));
}

@keyframes weaponFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.weapon-showcase h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.weapon-rarity {
    font-size: 18px;
    font-weight: 700;
    padding: 10px 25px;
    border-radius: 20px;
    display: inline-block;
}

.weapon-rarity.legendary {
    background: linear-gradient(135deg, var(--secondary-color), var(--legendary-color));
    color: var(--text-light);
    box-shadow: 0 0 20px var(--legendary-color);
}

.weapon-rarity.mythic {
    background: linear-gradient(135deg, var(--mythic-color), #c084fc);
    color: var(--text-light);
    box-shadow: 0 0 20px var(--mythic-color);
    animation: rarityPulse 1.5s ease-in-out infinite;
}

@keyframes rarityPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.skill-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
    justify-items: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.detail-box {
    background: rgba(26, 31, 58, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    width: 100%;
    max-width: 400px;
}

.detail-box.full-width {
    grid-column: 1 / -1;
    max-width: 100%;
}

.detail-box h4 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.detail-box ul {
    list-style: none;
    padding: 0;
}

.detail-box li {
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.detail-box li::before {
    content: '⚡';
    position: absolute;
    left: 0;
}

.detail-box p {
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.8;
}

.stat-increases {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-up {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.2), transparent);
    border-left: 4px solid var(--success-color);
    padding: 12px 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--success-color);
    border-radius: 5px;
    animation: statIncrease 0.8s ease;
}

@keyframes statIncrease {
    0% {
        transform: translateX(-20px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.character-with-weapon {
    margin: 0;
    position: relative;
    display: inline-block;
}

.character-powered {
    width: 300px;
    height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 10px 50px rgba(255, 215, 0, 0.7));
    animation: powerPulse 2s ease-in-out infinite;
}

@keyframes powerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.character-powered.ultimate {
    filter: drop-shadow(0 10px 50px rgba(157, 78, 237, 0.9));
}

.power-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
    animation: auraPulse 3s ease-in-out infinite;
    z-index: -1;
}

.power-aura.ultimate {
    background: radial-gradient(circle, rgba(157, 78, 237, 0.4), transparent);
}

@keyframes auraPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.3; }
}

.combo-display,
.ultimate-combo {
    background: rgba(26, 31, 58, 0.9);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 25px;
    margin: 25px auto;
    max-width: 700px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.ultimate-combo {
    border-color: var(--mythic-color);
    box-shadow: 0 0 50px rgba(157, 78, 237, 0.6);
    animation: ultimateGlow 2s ease-in-out infinite;
}

/* 콤보 헤더 */
.combo-header {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 0 0 15px var(--primary-color);
    animation: headerPulse 1.5s ease-in-out infinite;
}

.ultimate-combo-header {
    font-family: 'Press Start 2P', cursive;
    font-size: 18px;
    color: var(--mythic-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: rainbowText 3s linear infinite;
}

.ultimate-icon {
    font-size: 28px;
    animation: iconSpin 2s linear infinite;
}

@keyframes iconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes headerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 콤보 체인 */
.combo-chain {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.combo-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.6));
    animation: iconBounce 2s ease-in-out infinite;
}

.combo-plus,
.combo-equals {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.combo-result {
    font-size: 48px;
    animation: resultPulse 1s ease-in-out infinite;
}

@keyframes resultPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Ultimate 체인 */
.ultimate-chain {
    gap: 15px;
}

.combo-skill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    animation: comboFloat 2s ease-in-out infinite;
}

.combo-skill-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(255, 215, 0, 0.6));
}

.combo-skill.ultimate-skill {
    animation: ultimateSkillGlow 1.5s ease-in-out infinite;
}

@keyframes ultimateSkillGlow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 10px 20px rgba(157, 78, 237, 0.6));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 15px 30px rgba(157, 78, 237, 1));
    }
}

.combo-skill:nth-child(odd) {
    animation-delay: 0.2s;
}

.combo-arrow {
    font-size: 32px;
    color: var(--primary-color);
}

.combo-arrow.glow {
    animation: arrowGlow 1.5s ease-in-out infinite;
}

@keyframes arrowGlow {
    0%, 100% {
        color: var(--primary-color);
        text-shadow: 0 0 10px var(--primary-color);
    }
    50% {
        color: var(--mythic-color);
        text-shadow: 0 0 20px var(--mythic-color);
    }
}

/* 콤보 설명 */
.combo-description {
    font-size: 16px;
    color: var(--text-light);
    margin-top: 15px;
}

.ultimate-description {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

/* 콤보 보너스 */
.combo-bonus {
    margin-top: 15px;
    padding: 12px 20px;
    background: rgba(74, 222, 128, 0.2);
    border: 2px solid var(--success-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--success-color);
    animation: bonusPulse 2s ease-in-out infinite;
}

.ultimate-bonus {
    background: rgba(157, 78, 237, 0.2);
    border-color: var(--mythic-color);
    color: var(--mythic-color);
    font-size: 18px;
}

@keyframes bonusPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(74, 222, 128, 0.8);
    }
}
}

@keyframes comboFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.combo-arrow {
    font-size: 32px;
    color: var(--primary-color);
    animation: arrowPulse 1s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ===== Final Stage ===== */
.system-diagram {
    background: rgba(26, 31, 58, 0.6);
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.system-diagram h3 {
    font-size: 24px;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.workflow-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.workflow-step {
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    min-width: 150px;
    transition: all 0.3s ease;
}

.workflow-step:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
}

.step-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.step-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.step-desc {
    font-size: 14px;
    color: var(--text-dim);
}

.workflow-arrow {
    font-size: 36px;
    color: var(--primary-color);
    animation: arrowFlow 2s ease-in-out infinite;
}

@keyframes arrowFlow {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(10px); opacity: 1; }
}

.achievements-board {
    background: rgba(26, 31, 58, 0.6);
    border: 3px solid var(--success-color);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.achievements-board h3 {
    font-size: 24px;
    text-align: center;
    color: var(--success-color);
    margin-bottom: 25px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.achievement {
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid var(--success-color);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.5);
}

.achievement-icon {
    font-size: 56px;
    margin-bottom: 15px;
    animation: achievementFloat 3s ease-in-out infinite;
}

@keyframes achievementFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.achievement-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.achievement-desc {
    font-size: 15px;
    color: var(--text-dim);
}

.final-character {
    text-align: center;
    margin: 50px 0;
}

.master-character {
    width: 400px;
    height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 15px 60px rgba(255, 215, 0, 0.9));
    animation: masterGlow 3s ease-in-out infinite;
}

@keyframes masterGlow {
    0%, 100% {
        filter: drop-shadow(0 15px 60px rgba(255, 215, 0, 0.9));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 15px 80px rgba(255, 215, 0, 1)) drop-shadow(0 0 100px rgba(157, 78, 237, 0.8));
        transform: scale(1.05);
    }
}

.master-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-color);
    margin: 30px 0;
    animation: titleCelebrate 2s ease-in-out infinite;
}

@keyframes titleCelebrate {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(-2deg); }
    75% { transform: scale(1.05) rotate(2deg); }
}

.master-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.final-stat {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-bg);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

/* ===== Credits ===== */
.credits-screen {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.credits-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 50px;
    animation: creditsFloat 3s ease-in-out infinite;
}

@keyframes creditsFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.victory-message {
    margin-bottom: 60px;
}

.victory-text {
    font-size: 24px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.victory-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: 4px solid var(--primary-color);
    border-radius: 15px;
    padding: 25px 50px;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.7);
}

.banner-star {
    font-size: 48px;
    animation: starSpin 2s linear infinite;
}

@keyframes starSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.banner-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 28px;
    color: var(--dark-bg);
}

.credits-content {
    background: rgba(26, 31, 58, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 40px;
}

.credits-content h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.credits-info {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.credits-info p {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 15px;
    line-height: 1.8;
}

.credits-info strong {
    color: var(--primary-color);
}

.thank-you-box {
    background: rgba(26, 31, 58, 0.8);
    border: 2px solid var(--success-color);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
}

.thank-you-box h3 {
    font-size: 32px;
    color: var(--success-color);
    margin-bottom: 15px;
}

.thank-you-box p {
    font-size: 18px;
    color: var(--text-dim);
}

.replay-section {
    margin-top: 50px;
}

/* ===== Navigation ===== */
.nav-buttons {
    position: fixed;
    bottom: 15px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 999;
}

.prev-button,
.next-button {
    min-width: 150px;
    padding: 12px 20px;
    font-size: 13px;
}

.prev-button {
    background: linear-gradient(135deg, #444, #666);
    border-color: #666;
    color: var(--text-light);
}

.nav-hint {
    display: none;
}



/* ===== 반응형 디자인 ===== */
@media (max-width: 1200px) {
    .status-bar {
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .game-title {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .status-bar {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .status-center {
        margin: 0;
        max-width: 100%;
    }
    
    .slide {
        padding: 15px 15px 10px 15px;
    }
    
    .game-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .subtitle-box {
        padding: 20px 25px;
        max-width: 95%;
    }
    
    .subtitle {
        font-size: 18px;
        letter-spacing: 1px;
        margin-bottom: 15px;
    }
    
    .subtitle-kr {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .subtitle-extra {
        font-size: 15px;
    }
    
    .section-title {
        font-size: 16px;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .problems-grid,
    .solutions-grid,
    .skill-details {
        grid-template-columns: 1fr;
    }
    
    .horizontal-layout {
        flex-direction: column;
        gap: 20px;
    }

    .skill-acquire-layout {
        flex-direction: column;
        gap: 20px;
    }

    .skill-character-area {
        flex: 0 0 auto;
    }

    .skill-info-area {
        flex: 1;
    }
    
    .character-guide {
        flex: 0 0 auto;
    }
    
    .guide-img {
        width: 150px;
        height: 150px;
    }
    
    .speech-bubble {
        padding: 15px;
    }
    
    .typing-text {
        font-size: 13px;
        min-height: 60px;
    }
    
    .strategy-map-container {
        padding: 15px;
    }
    
    .music-control {
        top: 90px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .workflow-visual {
        flex-direction: column;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .nav-buttons {
        bottom: 10px;
        right: 10px;
        gap: 10px;
    }
    
    .character-img,
    .evolution-img,
    .character-powered,
    .master-character {
        width: 200px;
        height: 200px;
    }
    
    .skill-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}