/* ========================================
   AX-2026: 전사 AI 도입 시뮬레이터
   메인 스타일시트
   ======================================== */

:root {
    /* 컬러 팔레트 */
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #818CF8;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --accent: #F59E0B;
    --danger: #EF4444;
    --warning: #F59E0B;
    --success: #10B981;

    /* 배경색 */
    --bg-dark: #0F172A;
    --bg-medium: #1E293B;
    --bg-light: #334155;
    --bg-lighter: #475569;

    /* 텍스트 */
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;

    /* 픽셀 스타일 */
    --pixel-border: 3px solid;
    --pixel-shadow: 4px 4px 0px rgba(0,0,0,0.3);

    /* 폰트 */
    --font-pixel: 'Press Start 2P', cursive;
    --font-main: 'Noto Sans KR', sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* ========================================
   공통 스크린 스타일
   ======================================== */

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
    z-index: 10;
}

.screen.active {
    display: flex;
}

/* ========================================
   로딩 화면
   ======================================== */

#loading-screen {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-dark) 100%);
}

.loading-content {
    text-align: center;
}

.pixel-logo {
    font-family: var(--font-pixel);
    font-size: 48px;
    color: var(--primary-light);
    text-shadow: 4px 4px 0 var(--primary-dark);
    margin-bottom: 40px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.loading-bar {
    width: 300px;
    height: 20px;
    background: var(--bg-light);
    border: var(--pixel-border) var(--primary);
    margin: 0 auto 20px;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    animation: loading 2s ease-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-text {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--text-secondary);
}

/* ========================================
   타이틀 화면
   ======================================== */

#title-screen {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #1a1a3e 50%, var(--bg-dark) 100%);
    position: relative;
    overflow: hidden;
}

.title-content {
    text-align: center;
    z-index: 2;
}

.game-title {
    font-family: var(--font-pixel);
    margin-bottom: 20px;
}

.title-ax {
    font-size: 80px;
    color: var(--primary-light);
    text-shadow: 6px 6px 0 var(--primary-dark),
                 12px 12px 0 rgba(0,0,0,0.3);
    display: block;
}

.title-year {
    font-size: 48px;
    color: var(--accent);
    text-shadow: 4px 4px 0 #B45309;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 50px;
    letter-spacing: 2px;
}

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

.pixel-btn {
    font-family: var(--font-pixel);
    font-size: 12px;
    padding: 15px 40px;
    background: var(--bg-light);
    color: var(--text-primary);
    border: var(--pixel-border) var(--primary);
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: var(--pixel-shadow);
    text-transform: uppercase;
}

.pixel-btn:hover:not(:disabled) {
    background: var(--primary);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.3);
}

.pixel-btn:active:not(:disabled) {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

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

.pixel-btn.primary {
    background: var(--primary);
    border-color: var(--primary-light);
}

.pixel-btn.primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.pixel-btn.secondary {
    background: var(--bg-lighter);
    border-color: var(--text-muted);
}

.copyright {
    margin-top: 50px;
    font-size: 12px;
    color: var(--text-muted);
}

/* 플로팅 아이콘 */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-icons .icon {
    position: absolute;
    font-size: 30px;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.floating-icons .icon:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.floating-icons .icon:nth-child(2) { top: 20%; right: 15%; animation-delay: 1s; }
.floating-icons .icon:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 2s; }
.floating-icons .icon:nth-child(4) { bottom: 20%; right: 10%; animation-delay: 3s; }
.floating-icons .icon:nth-child(5) { top: 50%; left: 5%; animation-delay: 4s; }

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

/* ========================================
   캐릭터 생성 화면
   ======================================== */

#setup-screen {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
}

.setup-container {
    background: var(--bg-medium);
    padding: 40px;
    border-radius: 10px;
    border: var(--pixel-border) var(--primary);
    box-shadow: var(--pixel-shadow);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.setup-container h2 {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--primary-light);
    text-align: center;
    margin-bottom: 30px;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group select {
    padding: 12px 15px;
    background: var(--bg-light);
    border: 2px solid var(--bg-lighter);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-main);
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

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

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 15px;
    background: var(--bg-light);
    border-radius: 5px;
    transition: background 0.2s;
}

.radio-option:hover {
    background: var(--bg-lighter);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: relative;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

#start-game-btn {
    margin-top: 20px;
    width: 100%;
}

/* ========================================
   메인 게임 화면
   ======================================== */

#game-screen {
    display: none;
    flex-direction: column;
    background: var(--bg-dark);
    width: 100%;
    height: 100%;
}

#game-screen.active {
    display: flex;
}

/* HUD */
#game-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-medium);
    border-bottom: 2px solid var(--bg-lighter);
    z-index: 100;
}

.hud-left, .hud-center, .hud-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-display {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#current-date {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--accent);
}

#current-day {
    font-size: 12px;
    color: var(--text-muted);
}

.weather-display {
    font-size: 24px;
}

.company-info {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--text-secondary);
}

.company-info .separator {
    color: var(--bg-lighter);
    margin: 0 5px;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: var(--bg-light);
    border-radius: 5px;
    cursor: help;
}

.stat-icon {
    font-size: 16px;
}

.stat span:last-child {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--text-primary);
}

.icon-btn {
    background: var(--bg-light);
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: var(--bg-lighter);
}

/* 게임 캔버스 */
#game-canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    background: #1A202C;
}

/* 다음 턴 버튼 */
.next-turn-button {
    position: absolute;
    bottom: 100px;
    right: 20px;
    background: linear-gradient(135deg, var(--secondary) 0%, #FF6B6B 100%);
    border: 3px solid var(--secondary);
    border-radius: 15px;
    padding: 15px 25px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    animation: pulse-glow 2s infinite;
    transition: all 0.2s;
}

.next-turn-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.next-turn-icon {
    font-size: 20px;
    color: var(--bg-dark);
}

.next-turn-text {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--bg-dark);
    font-weight: bold;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.7);
    }
}

/* 탐색 안내 메시지 */
.explore-hint {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--secondary);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-primary);
    z-index: 50;
    animation: hint-bounce 3s ease-in-out infinite;
}

@keyframes hint-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* 미니맵 */
#minimap {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 150px;
    height: 100px;
    background: var(--bg-medium);
    border: 2px solid var(--bg-lighter);
    border-radius: 5px;
    opacity: 0.9;
}

.minimap-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.minimap-marker.player {
    background: var(--primary);
    animation: blink 1s infinite;
}

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

/* 액션 바 */
#action-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: var(--bg-medium);
    border-top: 2px solid var(--bg-lighter);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: var(--bg-light);
    border: 2px solid var(--bg-lighter);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.action-btn:hover {
    background: var(--primary);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.action-btn.active {
    background: var(--primary);
    border-color: var(--primary-light);
}

.action-icon {
    font-size: 24px;
}

.action-label {
    font-size: 11px;
    font-family: var(--font-pixel);
}

/* ========================================
   모달 스타일
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

.modal.active {
    display: flex;
}

/* 대화 모달 최우선 표시 */
#dialogue-modal.active {
    z-index: 9999;
}

/* 대화 모달 */
.dialogue-container {
    background: var(--bg-medium);
    border: var(--pixel-border) var(--primary);
    border-radius: 10px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: var(--pixel-shadow);
}

.dialogue-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-lighter);
}

.npc-portrait {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border: 3px solid var(--primary);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
}

.npc-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.npc-name {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--primary-light);
}

.npc-title {
    font-size: 12px;
    color: var(--text-muted);
}

.dialogue-content {
    min-height: 100px;
    margin-bottom: 20px;
}

.dialogue-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.dialogue-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.dialogue-choice {
    padding: 15px;
    background: var(--bg-light);
    border: 2px solid var(--bg-lighter);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    color: var(--text-primary);
    font-size: 14px;
}

.dialogue-choice:hover {
    background: var(--primary);
    border-color: var(--primary-light);
}

.dialogue-continue {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    border: none;
    border-radius: 5px;
    color: var(--text-primary);
    font-family: var(--font-pixel);
    font-size: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.dialogue-continue:hover {
    background: var(--primary-dark);
}

/* 이벤트 모달 */
.event-container {
    background: var(--bg-medium);
    border: var(--pixel-border) var(--accent);
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.event-header {
    margin-bottom: 20px;
}

.event-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

#event-title {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--accent);
}

.event-content {
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 결정 모달 */
.decision-container {
    background: var(--bg-medium);
    border: var(--pixel-border) var(--secondary);
    border-radius: 10px;
    padding: 30px;
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

#decision-title {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--secondary);
    text-align: center;
    margin-bottom: 10px;
}

#decision-desc {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.decision-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.decision-option {
    background: var(--bg-light);
    border: 3px solid var(--bg-lighter);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.decision-option:hover {
    border-color: var(--secondary);
    transform: translateX(5px);
}

.decision-option.recommended {
    border-color: var(--secondary);
    position: relative;
}

.decision-option.recommended::before {
    content: '추천';
    position: absolute;
    top: -10px;
    right: 15px;
    background: var(--secondary);
    color: var(--bg-dark);
    font-family: var(--font-pixel);
    font-size: 8px;
    padding: 3px 8px;
    border-radius: 3px;
}

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

.option-name {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--text-primary);
}

.option-cost {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--accent);
}

.option-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.6;
}

.option-cost-detail {
    background: var(--bg-dark);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.option-cost-detail div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.option-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 5px 10px;
    background: var(--bg-medium);
    border-radius: 5px;
}

.option-stat.positive {
    color: var(--success);
}

.option-stat.negative {
    color: var(--danger);
}

.option-stat.neutral {
    color: var(--text-muted);
}

/* 도입 옵션 장단점 */
.option-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 12px;
    line-height: 1.6;
}

.option-pros, .option-cons {
    background: var(--bg-medium);
    padding: 10px;
    border-radius: 5px;
}

.option-pros div, .option-cons div {
    margin-top: 5px;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .option-details {
        grid-template-columns: 1fr;
    }
}

/* 타임라인 모달 */
.timeline-container {
    background: var(--bg-medium);
    border: var(--pixel-border) var(--primary);
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
}

.timeline-container h3 {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--primary-light);
    text-align: center;
    margin-bottom: 20px;
}

.timeline-scroll {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.timeline-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--bg-lighter);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-date {
    font-family: var(--font-pixel);
    font-size: 8px;
    color: var(--accent);
    min-width: 80px;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.timeline-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.timeline-item.current {
    background: var(--bg-light);
    margin: 0 -15px;
    padding: 15px;
    border-radius: 5px;
}

.timeline-item.future {
    opacity: 0.5;
}

#timeline-close {
    margin-top: 20px;
    width: 100%;
}

/* 타임머신 모달 */
.timemachine-container {
    background: linear-gradient(135deg, var(--bg-medium) 0%, #1a1a3e 100%);
    border: var(--pixel-border) var(--accent);
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.timemachine-container h3 {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 15px;
}

.timemachine-warning {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 14px;
}

.timemachine-points {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.timemachine-point {
    padding: 15px;
    background: var(--bg-light);
    border: 2px solid var(--bg-lighter);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.timemachine-point:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.timemachine-point-date {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--accent);
    margin-bottom: 5px;
}

.timemachine-point-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 메뉴 모달 */
.menu-container {
    background: var(--bg-medium);
    border: var(--pixel-border) var(--primary);
    border-radius: 10px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.menu-container h3 {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--primary-light);
    margin-bottom: 25px;
}

.menu-option {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--bg-light);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.2s;
    text-align: left;
}

.menu-option:hover {
    background: var(--bg-lighter);
}

#menu-close {
    margin-top: 15px;
    width: 100%;
}

/* 게임 소개 모달 */
.about-container {
    background: var(--bg-medium);
    border: var(--pixel-border) var(--primary);
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
}

.about-container h2 {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--primary-light);
    text-align: center;
    margin-bottom: 20px;
}

.about-content {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-content ul {
    list-style: none;
    padding-left: 10px;
}

.about-content li {
    margin: 8px 0;
}

.about-note {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

#about-close {
    width: 100%;
}

/* ========================================
   뉴스 오버레이
   ======================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.overlay.active {
    display: flex;
}

.news-container {
    background: #fff;
    color: #222;
    max-width: 600px;
    width: 90%;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #1a1a3e;
    color: white;
}

.news-logo {
    font-family: var(--font-pixel);
    font-size: 12px;
}

.news-date {
    font-size: 12px;
    opacity: 0.8;
}

.news-content {
    padding: 25px;
}

.news-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #111;
    line-height: 1.4;
}

.news-content p {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.news-content .news-company {
    color: var(--primary);
    font-weight: 600;
}

#news-close {
    margin: 0 20px 20px;
    background: #1a1a3e;
    border-color: #1a1a3e;
}

/* ========================================
   토스트 알림
   ======================================== */

#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-medium);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
}

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

.toast.warning {
    border-color: var(--warning);
}

.toast.error {
    border-color: var(--danger);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

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

.toast.removing {
    animation: slideOut 0.3s ease-out forwards;
}

/* ========================================
   엔딩 화면
   ======================================== */

#ending-screen {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #1a1a3e 100%);
    overflow-y: auto;
    align-items: flex-start;
    padding: 20px 0;
}

.ending-container {
    text-align: center;
    max-width: 700px;
    width: 90%;
    padding: 40px;
    margin: auto;
}

.ending-company-header {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--primary-light);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.ending-title {
    font-family: var(--font-pixel);
    font-size: 24px;
    margin-bottom: 30px;
}

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

.ending-title.failure {
    color: var(--danger);
}

.ending-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.ending-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.ending-stat {
    background: var(--bg-medium);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--bg-lighter);
}

.ending-stat-value {
    font-family: var(--font-pixel);
    font-size: 24px;
    color: var(--primary-light);
    margin-bottom: 10px;
}

.ending-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.ending-message {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-medium);
    border-radius: 10px;
}

.ending-teaser {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--accent);
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

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

/* 시상식 애니메이션 */
.award-ceremony {
    animation: spotlight 3s ease-out;
}

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

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   스크롤바 스타일
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-lighter);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ========================================
   무드 효과 (NPC 포트레이트)
   ======================================== */

.npc-portrait.mood-positive {
    border-color: var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.npc-portrait.mood-negative {
    border-color: var(--danger);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.npc-portrait.mood-angry {
    border-color: var(--danger);
    animation: shake 0.5s ease-in-out;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
}

.npc-portrait.mood-serious {
    border-color: var(--warning);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   빠른 진행 (데모 모드) 버튼
   ======================================== */

/* 턴제에서는 데모 컨트롤 숨김 */
#demo-controls {
    display: none !important;
}

#demo-controls:hover {
    opacity: 1;
}

.demo-btn {
    background: var(--bg-light);
    border: 2px solid var(--bg-lighter);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.demo-btn:hover {
    background: var(--primary);
    border-color: var(--primary-light);
    color: var(--text-primary);
}

/* ========================================
   특별 이벤트 효과
   ======================================== */

.event-container.success {
    border-color: var(--success);
}

.event-container.failure {
    border-color: var(--danger);
}

.event-container.warning {
    border-color: var(--warning);
}

/* 뉴스 스타일 개선 */
.news-content .news-company {
    color: #4F46E5;
    font-weight: 700;
}

.news-content .highlight-positive {
    color: #10B981;
    font-weight: 600;
}

.news-content .highlight-negative {
    color: #EF4444;
    font-weight: 600;
}

.news-content strong {
    color: #1a1a3e;
}

/* ========================================
   시즌2 티저
   ======================================== */

.season2-teaser {
    background: linear-gradient(135deg, #1a1a3e 0%, #2d1b4e 100%);
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
    border: 2px solid var(--primary);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(79, 70, 229, 0.8);
    }
}

.season2-teaser h3 {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 15px;
}

.season2-teaser p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 5px;
}

/* ========================================
   툴팁
   ======================================== */

[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ========================================
   진행 표시 바
   ======================================== */

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transition: width 0.5s ease-out;
}

.progress-bar-fill.success {
    background: linear-gradient(90deg, var(--success) 0%, #34D399 100%);
}

.progress-bar-fill.warning {
    background: linear-gradient(90deg, var(--warning) 0%, #FBBF24 100%);
}

.progress-bar-fill.danger {
    background: linear-gradient(90deg, var(--danger) 0%, #F87171 100%);
}

/* ========================================
   반응형
   ======================================== */

@media (max-width: 768px) {
    .title-ax {
        font-size: 50px;
    }

    .title-year {
        font-size: 30px;
    }

    .setup-container {
        padding: 25px;
    }

    #game-hud {
        flex-wrap: wrap;
        gap: 10px;
    }

    .hud-center {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .stats {
        gap: 10px;
    }

    .stat {
        padding: 3px 8px;
    }

    #action-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .action-btn {
        padding: 8px 15px;
    }

    .action-label {
        font-size: 9px;
    }

    .decision-option {
        padding: 15px;
    }

    .option-stats {
        flex-direction: column;
    }

    .ending-stats {
        grid-template-columns: 1fr;
    }

    .ending-buttons {
        flex-direction: column;
    }
}

/* ========================================
   턴 기반 시스템 스타일
   ======================================== */

/* 턴 알림 */
.turn-announcement {
    text-align: center;
    padding: 20px;
}

.turn-number {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--primary-light);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.turn-date {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.turn-title {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 15px;
}

.turn-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* NPC 포트레이트 이모지 */
.portrait-emoji {
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* NPC 포트레이트 스타일 변형 */
.npc-portrait.style-0 {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
}

.npc-portrait.style-1 {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.npc-portrait.style-2 {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.npc-portrait.style-3 {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
}

/* 엔딩 추가 스타일 */
.ending-achievement {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 25px;
    padding: 10px 20px;
    background: var(--bg-light);
    border-radius: 20px;
    display: inline-block;
}

.ending-next-step {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    border: 2px dashed var(--primary);
}

.next-step-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.next-step-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.link-btn {
    background: var(--secondary);
    border-color: var(--secondary);
    text-decoration: none;
    display: inline-block;
}

.link-btn:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

/* 엔딩 타입별 스타일 */
.award-ceremony.success .ending-title {
    color: var(--success);
}

.award-ceremony.partial .ending-title {
    color: var(--warning);
}

.award-ceremony.failure .ending-title {
    color: var(--danger);
}

/* 엔딩 스탯 4열 그리드 */
.ending-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .ending-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .next-step-links {
        flex-direction: column;
    }
}

/* 엔딩 티저 개선 */
.ending-teaser {
    background: linear-gradient(135deg, #1a1a3e 0%, #2d1b4e 100%);
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    border: 2px solid var(--primary);
}

.ending-teaser h3 {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 15px;
}

.ending-teaser p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 엔딩 비용 상세 */
.ending-cost-detail {
    background: linear-gradient(135deg, #1a3a1a 0%, #2d4e1b 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #4CAF50;
}

.ending-cost-detail h3 {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: #81C784;
    margin-bottom: 15px;
}

.cost-summary {
    text-align: center;
}

.cost-total {
    font-family: var(--font-pixel);
    font-size: 24px;
    color: #4CAF50;
    margin-bottom: 5px;
}

.cost-breakdown {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 엔딩 서베이 결과 */
.ending-survey {
    background: linear-gradient(135deg, #1a2a3e 0%, #1b3d4e 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #2196F3;
}

.ending-survey h3 {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: #64B5F6;
    margin-bottom: 15px;
}

.survey-overall {
    text-align: center;
    margin-bottom: 20px;
}

.survey-score {
    font-family: var(--font-pixel);
    font-size: 36px;
    color: #2196F3;
}

.survey-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.survey-categories {
    margin-bottom: 20px;
}

.survey-category {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.category-name {
    width: 100px;
    font-size: 11px;
    color: var(--text-secondary);
}

.category-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.category-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #64B5F6);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.category-score {
    width: 40px;
    font-size: 11px;
    color: #64B5F6;
    text-align: right;
}

.survey-voices h4 {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: #64B5F6;
    margin-bottom: 10px;
}

.voice-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.voice-rank {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: #FFC107;
    min-width: 25px;
}

.voice-text {
    flex: 1;
    font-size: 12px;
    color: var(--text);
    font-style: italic;
}

.voice-dept {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .survey-category {
        flex-wrap: wrap;
    }

    .category-name {
        width: 100%;
        margin-bottom: 5px;
    }

    .voice-item {
        flex-direction: column;
    }
}

/* 멀티버스 섹션 스타일 */
.multiverse-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed rgba(255, 255, 255, 0.3);
    text-align: center;
}

.multiverse-title {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 15px;
}

.multiverse-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.multiverse-btn {
    background: linear-gradient(135deg, #6a5acd, #9370db) !important;
    font-size: 12px !important;
    padding: 8px 15px !important;
}

.multiverse-btn:hover {
    background: linear-gradient(135deg, #7b68ee, #ba55d3) !important;
    transform: translateY(-2px);
}

/* 멀티버스 프리뷰 모달 */
.multiverse-content {
    max-width: 450px;
}

.multiverse-preview {
    text-align: center;
    padding: 20px;
}

.multiverse-preview h3 {
    color: #9370db;
    margin-bottom: 20px;
}

.preview-title {
    font-size: 28px;
    margin-bottom: 5px;
}

.preview-subtitle {
    color: #888;
    margin-bottom: 15px;
}

.preview-message {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 13px;
}

.preview-stats {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 13px;
}

.preview-stats div {
    background: rgba(147, 112, 219, 0.2);
    padding: 8px 12px;
    border-radius: 5px;
}
