/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #3b82f6 50%, #06b6d4 75%, #10b981 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

#game-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* 화면 전환 */
.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 시작 화면 - 현대적 디자인 */
#start-screen {
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: screenFadeIn 1s ease-out;
}

@keyframes screenFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 배경 애니메이션 효과 */
.start-background-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.15) 0%, transparent 60%);
    animation: backgroundPulse 8s ease-in-out infinite;
    z-index: 0;
}

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

/* 떠다니는 카드 애니메이션 */
.floating-cards {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-card {
    position: absolute;
    font-size: 3rem;
    opacity: 0.15;
    animation: floatCard 15s ease-in-out infinite;
}

.floating-card:nth-child(1) { left: 10%; top: 20%; animation-duration: 12s; }
.floating-card:nth-child(2) { right: 15%; top: 30%; animation-duration: 14s; }
.floating-card:nth-child(3) { left: 20%; bottom: 25%; animation-duration: 16s; }
.floating-card:nth-child(4) { right: 10%; bottom: 20%; animation-duration: 13s; }
.floating-card:nth-child(5) { left: 50%; top: 15%; animation-duration: 15s; }

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

/* 타이틀 컨테이너 */
.title-container {
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    padding: 35px 50px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(30px) saturate(150%);
    border-radius: 35px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 0 80px rgba(139, 92, 246, 0.3);
    animation: containerFloat 6s ease-in-out infinite;
}

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

/* 타이틀 발광 효과 */
.title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* 마스코트 이미지 */
.title-mascot {
    margin-bottom: 15px;
    animation: mascotEntrance 1.2s ease-out;
}

@keyframes mascotEntrance {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
    }
    60% {
        transform: translateY(5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mascot-image {
    width: 180px;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4))
            drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
    animation: mascotFloat 3s ease-in-out infinite;
}

@keyframes mascotFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(2deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-8px) rotate(-2deg);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* 게임 타이틀 */
.game-title {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #fbbf24 20%,
        #f59e0b 40%,
        #ec4899 60%,
        #8b5cf6 80%,
        #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6))
            drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    animation: titleGradient 5s ease infinite;
    display: inline-block;
}

@keyframes titleGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.title-char {
    display: inline-block;
    animation: titleBounce 1s ease-out;
}

@keyframes titleBounce {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.3);
    }
    50% {
        transform: translateY(10px) scale(1.1);
    }
    70% {
        transform: translateY(-5px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 서브타이틀 */
.subtitle-wrapper {
    margin-bottom: 15px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-subtitle {
    font-size: 2.2rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(139, 92, 246, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.subtitle-icon {
    display: inline-block;
    animation: iconRotate 3s ease-in-out infinite;
    font-size: 1.8rem;
}

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

/* 설명 텍스트 */
.game-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.description-line {
    display: block;
    margin: 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}


/* 광고 컨테이너 스타일 */
.ad-container {
    margin: 20px 0;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-container ins {
    display: block !important;
    margin: 0 auto;
}

/* 버튼 스타일 */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
    min-width: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-success:active {
    transform: scale(0.95);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

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

/* 저장 버튼 애니메이션 */
@keyframes saveSuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
    }
    100% {
        transform: scale(1);
    }
}

.btn-success.saving {
    animation: saveSuccess 0.5s ease;
}

/* 시작 버튼 컨테이너 */
.start-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out 0.9s both;
}

/* 현대적인 버튼 스타일 */
.btn-primary-modern,
.btn-secondary-modern {
    position: relative;
    padding: 18px 45px;
    border: none;
    border-radius: 60px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 0.05em;
}

.btn-primary-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    color: white;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.5),
        0 0 40px rgba(118, 75, 162, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.btn-primary-modern:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.7),
        0 0 60px rgba(118, 75, 162, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.btn-primary-modern:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-secondary-modern {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px) saturate(150%);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-secondary-modern:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-secondary-modern:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* 버튼 아이콘 */
.btn-icon {
    font-size: 1.5rem;
    animation: iconPulse 2s ease-in-out infinite;
}

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

.btn-text {
    position: relative;
    z-index: 1;
}

/* 버튼 발광 효과 */
.btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%,
        transparent
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s;
}

.btn-primary-modern:hover .btn-shine,
.btn-secondary-modern:not(:disabled):hover .btn-shine {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* 하단 정보 */
.start-footer {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: fadeIn 1.5s ease-out 1.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.version-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 도움말 플로팅 버튼 */
.help-floating-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 0 40px rgba(118, 75, 162, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: helpButtonPulse 3s ease-in-out infinite;
}

@keyframes helpButtonPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 8px 25px rgba(102, 126, 234, 0.4),
            0 0 40px rgba(118, 75, 162, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 12px 35px rgba(102, 126, 234, 0.6),
            0 0 60px rgba(118, 75, 162, 0.5);
    }
}

.help-floating-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.6),
        0 0 60px rgba(118, 75, 162, 0.5);
}

.help-floating-btn:active {
    transform: scale(0.95);
}

/* 캐릭터 생성 화면 */
#character-creation {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

.creation-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2rem;
}

.character-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: 500;
    color: #555;
}

.form-group input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.gender-options, .traits-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gender-btn, .trait-btn, .difficulty-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.gender-btn:hover, .trait-btn:hover, .difficulty-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.gender-btn.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.trait-btn.selected {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: white;
}

/* 라디오 버튼을 숨기고 커스텀 스타일링 */
.trait-radio {
    position: relative;
    cursor: pointer;
}

.trait-radio .trait-input {
    display: none;
}

.trait-radio {
    display: inline-block;
}

.trait-radio .trait-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-block;
}

.trait-radio:hover .trait-btn {
    border-color: #667eea;
    background: #f8f9ff;
}

.trait-radio .trait-input:checked + .trait-btn {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.difficulty-btn.selected {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.difficulty-btn[data-difficulty="rich"] {
    border-color: #ffd700;
}

.difficulty-btn[data-difficulty="rich"]:hover {
    border-color: #ffd700;
    background: #fff8dc;
}

.difficulty-btn[data-difficulty="poor"] {
    border-color: #dc3545;
}

.difficulty-btn[data-difficulty="poor"]:hover {
    border-color: #dc3545;
    background: #ffeaea;
}

/* 메인 게임 화면 */
#game-screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    max-width: 1000px;
    width: 100%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 20px;
    width: 100%;
    box-shadow: 
        0 5px 20px rgba(102, 126, 234, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.character-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.character-avatar {
    position: relative;
}

.avatar-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 
        0 5px 15px rgba(102, 126, 234, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.character-details h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.character-details p {
    color: #555;
    font-size: 0.95rem;
    font-weight: 500;
}

.career-info {
    margin-top: 15px;
    padding-top: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.career-info p {
    font-size: 0.9rem;
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.5;
}

#character-job {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-size: 0.9rem;
}

#character-job::before {
    content: '💼';
    font-size: 1rem;
}

#character-talents {
    color: #1f2937;
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(78, 205, 196, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(78, 205, 196, 0.25);
    min-height: 42px;
}

#character-talents::before {
    content: '🎯';
    font-size: 1rem;
    margin-right: 4px;
}

/* 기술 배지 스타일 */
.talent-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background: #10b981;
    color: #fff;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.talent-badge:hover {
    background: #059669;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 320px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-label {
    width: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.stat-progress {
    flex: 1;
    height: 24px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e5e5e5 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.stat-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: 10px 10px 0 0;
}

/* 동적 색상이 JavaScript에서 설정되므로 고정 색상 제거 */

.stat-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* 수치 증가/감소 애니메이션 */
.stat-value.stat-increase {
    color: #3b82f6 !important;
    animation: statIncrease 0.6s ease;
}

.stat-value.stat-decrease {
    color: #ef4444 !important;
    animation: statDecrease 0.6s ease;
}

@keyframes statIncrease {
    0% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.3);
        color: #3b82f6;
    }
    100% {
        transform: translateY(-50%) scale(1);
    }
}

@keyframes statDecrease {
    0% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.3);
        color: #ef4444;
    }
    100% {
        transform: translateY(-50%) scale(1);
    }
}

/* 게임 콘텐츠 */
.game-content {
    display: flex;
    flex-direction: column;
    gap: 35px;
    width: 100%;
}

.story-section {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 18px;
    border-left: 5px solid #667eea;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.story-section::before {
    content: '📖';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.1;
}

.story-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.cards-section h3 {
    margin-bottom: 25px;
    color: #333;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
}

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

.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.card-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 15px;
}

.card-effects {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.effect-tag {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.effect-positive {
    background: #d4edda;
    color: #155724;
}

.effect-negative {
    background: #f8d7da;
    color: #721c24;
}

.effect-neutral {
    background: #e2e3e5;
    color: #383d41;
}

/* 게임 푸터 */
.game-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.game-footer .btn {
    min-width: 140px;
    font-size: 1rem;
    padding: 14px 24px;
    font-weight: 600;
}

/* 엔딩 화면 */
#ending-screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    margin: 20px auto;
}

.ending-container h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 2.2rem;
}

.life-summary {
    background: rgba(102, 126, 234, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin: 0 auto 30px;
    text-align: left;
    max-width: 100%;
    width: 100%;
}

.life-summary h3 {
    margin-bottom: 15px;
    color: #333;
}

.life-summary p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

.achievements-list {
    margin: 15px 0;
}

.achievements-list ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.achievements-list li {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.ending-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    body {
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    #game-container {
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    .screen {
        min-height: 100vh;
        padding: 5px;
        overflow-y: auto;
    }
    
    #game-screen {
        padding: 10px;
        margin: 5px;
    }
    
    /* 시작 화면 모바일 최적화 */
    .game-title {
        font-size: 3rem;
        margin-bottom: 10px;
    }
    
    .game-subtitle {
        font-size: 1.4rem;
        margin-bottom: 15px;
        flex-direction: row;
        gap: 10px;
    }
    
    .subtitle-icon {
        font-size: 1.3rem;
    }
    
    .game-description {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .description-line {
        margin: 3px 0;
    }
    
    #start-screen {
        padding: 20px 15px;
        margin: 0;
    }
    
    .title-container {
        margin-bottom: 30px;
        padding: 30px 25px;
        border-radius: 25px;
    }
    
    /* 마스코트 모바일 크기 */
    .mascot-image {
        width: 150px;
        height: 150px;
    }
    
    .title-mascot {
        margin-bottom: 20px;
    }
    
    /* 떠다니는 카드 모바일 조정 - 양옆 배치 */
    .floating-card {
        font-size: 2rem;
        opacity: 0.15;
    }
    
    /* 왼쪽에 배치 */
    .floating-card:nth-child(1) { 
        left: 5%; 
        top: 15%;
    }
    .floating-card:nth-child(3) { 
        left: 8%; 
        top: 50%;
    }
    .floating-card:nth-child(5) { 
        left: 3%; 
        bottom: 20%;
    }
    
    /* 오른쪽에 배치 */
    .floating-card:nth-child(2) { 
        right: 5%; 
        top: 20%;
    }
    .floating-card:nth-child(4) { 
        right: 8%; 
        bottom: 25%;
    }
    
    /* 버튼 모바일 최적화 */
    .btn-primary-modern,
    .btn-secondary-modern {
        padding: 16px 35px;
        font-size: 1.1rem;
        min-width: 240px;
    }
    
    .btn-icon {
        font-size: 1.3rem;
    }
    
    .start-footer {
        bottom: 20px;
    }
    
    .version-info {
        font-size: 0.8rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
        padding: 10px;
    }
    
    .character-info {
        gap: 8px;
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
    }
    
    .character-avatar {
        flex-shrink: 0;
    }
    
    .avatar-circle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .character-details {
        flex: 1;
        min-width: 0;
        width: 100%;
        overflow: visible;
    }
    
    .character-details h3 {
        font-size: 0.95rem;
        margin-bottom: 2px;
    }
    
    .character-details > h3 {
        font-size: 0.95rem;
        margin-bottom: 2px;
    }
    
    .character-details > p {
        font-size: 0.7rem;
        margin-bottom: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .career-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 10px !important;
        padding-top: 0 !important;
    }
    
    .career-info p {
        margin: 0 !important;
    }
    
    #character-job {
        font-size: 0.75rem !important;
        padding: 8px 10px !important;
        gap: 6px !important;
    }
    
    #character-job::before {
        font-size: 0.9rem !important;
    }
    
    #character-talents {
        font-size: 0.7rem !important;
        padding: 8px 10px !important;
        gap: 4px !important;
        min-height: 36px !important;
    }
    
    #character-talents::before {
        font-size: 0.9rem !important;
    }
    
    .talent-badge {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }
    
    .stats-container {
        min-width: 100%;
        gap: 6px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, 1fr);
    }
    
    .stat-bar {
        gap: 4px;
        align-items: center;
    }
    
    .stat-label {
        width: 28px;
        font-size: 0.65rem;
        flex-shrink: 0;
    }
    
    .stat-progress {
        height: 16px;
        flex: 1;
        border-radius: 8px;
    }
    
    .stat-value {
        font-size: 0.65rem;
        right: 3px;
    }
    
    .game-content {
        gap: 5px;
    }
    
    .story-section {
        padding: 6px;
        margin-bottom: 3px;
        border-left-width: 3px;
        border-radius: 8px;
    }
    
    .story-text {
        font-size: 0.78rem;
        line-height: 1.2;
        max-height: 38px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .result-box {
        padding: 6px !important;
        border-radius: 6px !important;
        margin-top: 6px !important;
        border-left-width: 2px !important;
    }
    
    .result-box h4 {
        font-size: 0.8rem !important;
        margin: 0 0 4px 0 !important;
    }
    
    .result-box p {
        font-size: 0.72rem !important;
        margin: 2px 0 !important;
    }
    
    .cards-section h3 {
        margin-bottom: 3px;
        font-size: 0.95rem;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .card {
        padding: 8px;
        margin-bottom: 2px;
    }
    
    .card h3 {
        font-size: 0.85rem;
        margin-bottom: 3px;
    }
    
    .card p {
        font-size: 0.75rem;
        line-height: 1.2;
        margin-bottom: 5px;
    }
    
    .card-effects {
        gap: 2px;
        font-size: 0.7rem;
    }
    
    .card-effects span {
        font-size: 0.68rem;
    }
    
    .effect-tag {
        padding: 1px 4px;
        font-size: 0.6rem;
    }
    
    .game-footer {
        margin-top: 8px;
        padding: 12px;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .game-footer .btn {
        padding: 12px 18px;
        font-size: 0.9rem;
        min-width: 120px;
        flex: 1;
    }
    
    .start-buttons {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        padding: 12px 20px;
        font-size: 1rem;
        margin: 5px 0;
    }
    
    .gender-options, .traits-options {
        justify-content: center;
        gap: 8px;
    }
    
    .gender-btn, .trait-btn, .difficulty-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    #ending-screen {
        padding: 15px;
        margin: 5px;
        max-width: 100%;
    }
    
    .ending-container h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .life-summary {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .ending-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .ending-actions .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* 캐릭터 생성 화면 최적화 */
    #character-creation {
        padding: 20px 15px;
        margin: 5px;
    }
    
    .creation-container h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .character-form {
        gap: 15px;
    }
    
    .form-group {
        gap: 8px;
    }
    
    .form-group input {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .difficulty-selection h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 3px;
    }
    
    .title-container {
        padding: 20px 25px;
        margin-bottom: 15px;
        border-radius: 15px;
    }
    
    #game-screen {
        padding: 5px;
        margin: 3px;
    }
    
    #ending-screen {
        padding: 8px;
        margin: 3px;
    }
    
    .ending-container h2 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .life-summary {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    #start-screen {
        padding: 15px 10px;
        margin: 0;
    }
    
    .title-container {
        padding: 25px 20px;
        margin-bottom: 25px;
    }
    
    /* 마스코트 작은 화면 크기 */
    .mascot-image {
        width: 120px;
        height: 120px;
    }
    
    .title-mascot {
        margin-bottom: 15px;
    }
    
    .game-title {
        font-size: 2.5rem;
    }
    
    .game-subtitle {
        font-size: 1.2rem;
        flex-direction: row;
        gap: 8px;
    }
    
    .subtitle-icon {
        font-size: 1.1rem;
    }
    
    .game-description {
        font-size: 1rem;
    }
    
    /* 버튼 작은 화면 최적화 */
    .btn-primary-modern,
    .btn-secondary-modern {
        padding: 14px 30px;
        font-size: 1rem;
        min-width: 200px;
    }
    
    .btn-icon {
        font-size: 1.2rem;
    }
    
    /* 떠다니는 카드 작은 화면 - 양옆 배치 */
    .floating-card {
        font-size: 1.5rem;
        opacity: 0.2;
    }
    
    /* 왼쪽에 배치 */
    .floating-card:nth-child(1) { 
        left: 3%; 
        top: 12%;
    }
    .floating-card:nth-child(3) { 
        left: 5%; 
        top: 45%;
    }
    .floating-card:nth-child(5) { 
        left: 2%; 
        bottom: 18%;
    }
    
    /* 오른쪽에 배치 */
    .floating-card:nth-child(2) { 
        right: 3%; 
        top: 18%;
    }
    .floating-card:nth-child(4) { 
        right: 5%; 
        bottom: 22%;
    }
    
    .character-form {
        gap: 12px;
    }
    
    .game-header {
        padding: 8px;
        gap: 5px;
        margin-bottom: 5px;
    }
    
    .character-info {
        gap: 6px;
    }
    
    .avatar-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .character-details h3 {
        font-size: 0.85rem;
        margin-bottom: 1px;
    }
    
    .character-details p {
        font-size: 0.65rem;
        margin-bottom: 1px;
    }
    
    .career-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        margin-top: 8px !important;
        padding-top: 0 !important;
    }
    
    .career-info p {
        margin: 0 !important;
    }
    
    #character-job {
        font-size: 0.7rem !important;
        padding: 7px 9px !important;
        gap: 5px !important;
    }
    
    #character-job::before {
        font-size: 0.85rem !important;
    }
    
    #character-talents {
        font-size: 0.65rem !important;
        padding: 7px 9px !important;
        gap: 3px !important;
        min-height: 32px !important;
    }
    
    #character-talents::before {
        font-size: 0.85rem !important;
    }
    
    .talent-badge {
        font-size: 0.65rem !important;
        padding: 3px 7px !important;
    }
    
    .stats-container {
        gap: 5px;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, 1fr);
    }
    
    .stat-bar {
        gap: 3px;
    }
    
    .stat-label {
        width: 26px;
        font-size: 0.6rem;
    }
    
    .stat-progress {
        height: 14px;
        border-radius: 7px;
    }
    
    .stat-value {
        font-size: 0.6rem;
        right: 3px;
    }
    
    .game-content {
        gap: 4px;
    }
    
    .story-section {
        padding: 5px;
        margin-bottom: 2px;
        border-left-width: 2px;
        border-radius: 6px;
    }
    
    .story-text {
        font-size: 0.72rem;
        line-height: 1.15;
        max-height: 32px;
        -webkit-line-clamp: 2;
    }
    
    .result-box {
        padding: 5px !important;
        border-radius: 5px !important;
        margin-top: 5px !important;
        border-left-width: 2px !important;
    }
    
    .result-box h4 {
        font-size: 0.75rem !important;
        margin: 0 0 3px 0 !important;
    }
    
    .result-box p {
        font-size: 0.68rem !important;
        margin: 2px 0 !important;
        line-height: 1.2 !important;
    }
    
    .cards-section h3 {
        margin-bottom: 3px;
        font-size: 0.9rem;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .card {
        padding: 8px;
        margin-bottom: 2px;
    }
    
    .card h3 {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .card p {
        font-size: 0.7rem;
        line-height: 1.1;
        margin-bottom: 4px;
    }
    
    .card-effects {
        gap: 2px;
        font-size: 0.65rem;
    }
    
    .card-effects span {
        font-size: 0.62rem;
    }
    
    .effect-tag {
        padding: 1px 3px;
        font-size: 0.58rem;
    }
    
    .game-footer {
        margin-top: 6px;
        padding: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .game-footer .btn {
        padding: 11px 16px;
        font-size: 0.85rem;
        min-width: 110px;
        flex: 1;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        max-width: 180px;
    }
    
    #character-creation {
        padding: 12px 8px;
    }
    
    .creation-container h2 {
        font-size: 1.2rem;
    }
    
    .form-group input {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .gender-btn, .trait-btn, .difficulty-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    /* 모바일에서 도움말 버튼 크기 조정 */
    .help-floating-btn {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 1.3rem;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    }
    
    /* 480px 이하 모바일에서 도움말 모달 */
    .university-choice-modal .modal-content {
        padding: 15px;
        width: 96%;
        max-height: 88vh;
        border-radius: 12px;
    }
    
    .university-choice-modal h3 {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
        padding-bottom: 8px;
        border-bottom: 2px solid #667eea;
    }
    
    .university-choice-modal h4 {
        font-size: 0.95rem !important;
        margin-top: 10px !important;
        margin-bottom: 6px !important;
        padding-bottom: 4px !important;
    }
    
    .university-choice-modal p {
        font-size: 0.8rem !important;
        line-height: 1.45 !important;
        margin-bottom: 10px !important;
    }
    
    .university-choice-modal strong {
        font-size: 0.8rem !important;
    }
    
    .university-choice-modal br {
        line-height: 1.2 !important;
    }
    
    .university-btn {
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        min-width: 150px !important;
        margin-top: 15px !important;
    }
}

/* 도움말 플로팅 버튼 */
.help-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.8rem;
    border: none;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.help-floating-btn:active {
    transform: scale(0.95);
}

/* 대학 진학 선택 모달 */
.university-choice-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: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.university-choice-modal .modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.university-choice-modal h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.university-choice-modal p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.university-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.university-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.university-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.university-btn h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: white;
}

.university-btn p {
    font-size: 0.9rem;
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.9);
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .university-choice-modal .modal-content {
        padding: 20px;
        margin: 0;
        width: 92%;
        max-height: 86vh;
        overflow-y: auto;
        border-radius: 15px;
    }
    
    .university-options {
        flex-direction: column;
        align-items: center;
    }
    
    .university-btn {
        min-width: 180px;
        padding: 15px 12px;
        font-size: 0.95rem;
    }
    
    .university-choice-modal h3 {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }
    
    .university-choice-modal h4 {
        font-size: 1.05rem !important;
        margin-top: 12px !important;
        margin-bottom: 8px !important;
    }
    
    .university-choice-modal p {
        font-size: 0.88rem !important;
        line-height: 1.55 !important;
        margin-bottom: 12px !important;
    }
    
    .help-floating-btn {
        width: 48px;
        height: 48px;
        bottom: 18px;
        right: 18px;
        font-size: 1.4rem;
    }
}

/* 연봉 지급 애니메이션 */
@keyframes salaryReceived {
    0% { 
        transform: scale(1);
        background-color: #4CAF50;
    }
    50% { 
        transform: scale(1.1);
        background-color: #8BC34A;
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    }
    100% { 
        transform: scale(1);
        background-color: #4CAF50;
    }
}

.salary-received {
    animation: salaryReceived 1.5s ease-in-out;
}

/* 재물 스탯 강조 효과 */
.wealth-highlight {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    border: 2px solid #FFD700;
}

/* 연봉 지급 알림 스타일 */
.salary-notification {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: 2px solid #2E7D32;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    font-weight: bold;
    font-size: 1.1rem;
}

/* 컴팩트 급여 토스트 */
#salary-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    pointer-events: none;
}

.salary-toast {
    background: rgba(17, 24, 39, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.95rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
    transform: translateY(-10px) scale(0.98);
    opacity: 0;
    animation: toastIn 200ms ease-out forwards, toastOut 250ms ease-in 1800ms forwards;
}

.salary-toast .amount {
    font-weight: 700;
    margin-left: 6px;
    color: #34d399;
}

/* 지출 토스트 색상 */
.salary-toast.expense .amount {
    color: #f87171;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(-6px) scale(0.98); }
}

@media (max-width: 768px) {
    #salary-toast-container {
        top: 12px;
        right: 12px;
        gap: 6px;
    }
    .salary-toast {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}
