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

    @font-face {
        font-family: 'Galmuri14';
        src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2506-1@1.0/Galmuri14.woff2') format('woff2');
        font-weight: normal;
        font-display: swap;
    }

body {font-family: 'Galmuri14';
    background-color: #000000;
    color: var(--main-color);
    overflow: hidden;
    height: 100vh;
    position: relative;}


:root {--main-color: #00ff41;
    --secondary-color: #e74c3c;
    --text-color: #333;}



    .green-text {color: var(--main-color);
        font-size: 1.2rem;
        font-weight: bold;
        text-shadow: 0 0 10px rgba(0, 255, 65, 0.8)}




/* 게임 화면 */
.game-container {width: 100%;
    height: 100vh;
    padding: 2rem;
    display: flex;
    flex-direction: column;}

.game-header-border {width: 100%;
    border-bottom: 2px solid var(--main-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 255, 65, 0.2);}

.game-header {width: 65%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;}

/* 타임어택 바 */
.timer-container {position: absolute;
    top: 10rem;
    right: 24rem;
    width: 150px;
    height: 150px;
    z-index: 100;
    overflow: visible;}

.timer-svg {width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;}

.timer-bg {fill: none;
    stroke: rgba(0, 255, 65, 0.2);
    stroke-width: 18;}

.timer-progress {
    fill: none;
    stroke: var(--main-color);
    stroke-width: 23;
    stroke-linecap: butt;
    stroke-dasharray: 282.74;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.05s linear;
    filter: drop-shadow(0 0 5px rgba(0, 255, 65, 0.8));
}

.timer-text {position: absolute;top: 50%;left: 50%; transform: translate(-50%, -50%);}

.game-header-info {display: flex;
    justify-content: space-around;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    flex: 1;}

.exit-btn {
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 5px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    width: 36px;
    height: 36px;
    position: relative;
}

.exit-btn:hover {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    transform: scale(1.1);
}

.exit-btn:active {
    transform: scale(0.95);
    animation: exitClick 0.3s ease;
}

.exit-icon {
    display: block;
    width: 20px;
    height: 20px;
    position: relative;
}

.exit-icon::before,
.exit-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 20px;
    background: var(--main-color);
    top: 50%;
    left: 50%;
    transform-origin: center;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.8);
}

.exit-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.exit-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.exit-btn:hover .exit-icon::before,
.exit-btn:hover .exit-icon::after {
    box-shadow: 0 0 10px rgba(0, 255, 65, 1);
}

@keyframes exitClick {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9) rotate(5deg);
    }
    100% {
        transform: scale(1);
    }
}

/* 나가기 확인 다이얼로그 */
.exit-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.exit-dialog-overlay.active {
display: flex;
}

.exit-dialog {
    background: #000000;
    border: 3px solid var(--main-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    text-align: center;
    min-width: 300px;
}

.exit-dialog h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.exit-dialog p {
    margin-bottom: 2rem;
    font-size: 1rem;
}

.exit-dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.exit-dialog-btn {
    min-width: 100px;
    width: 100px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--main-color);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, rgba(0, 200, 50, 0.05) 100%);
    color: var(--main-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.exit-dialog-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2) 0%, rgba(0, 200, 50, 0.1) 100%);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.exit-dialog-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}






.game-content {flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 1rem;}

.game-area {width: 100%;
    height: 100%;
    max-width: 1600px;
    max-height: calc(100vh - 120px);
    display: grid;
    grid-template-columns: 550px 1fr;
    gap: 1.5rem;
    padding: 0 1rem;}

/* 왼쪽 컬럼 */
.left-column {display: flex;
    flex-direction: column;}

.visitor-display {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, rgba(0, 200, 50, 0.05) 100%);
    border: 3px solid var(--main-color);
    border-radius: 10px;
    padding: 0.5rem;
    box-shadow: 
        0 0 20px rgba(0, 255, 65, 0.3),
        inset 0 0 30px rgba(0, 255, 65, 0.1);
    position: relative;
    overflow: hidden;
}

.visitor-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 255, 65, 0.03) 10px,
        rgba(0, 255, 65, 0.03) 20px
    );
    animation: scan 3s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.visitor-sprite {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: rgba(0, 0, 0, 0.5);
    border: 2px dashed var(--main-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;}

.sprite-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/city_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;
    z-index: 1;
}

.character-standing {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 90%;
    background-size: contain;
    background-position: bottom center;
    background-repeat: no-repeat;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-standing.visible {opacity: 1;}

.sprite-placeholder {
    position: relative;
    z-index: 3;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    animation: pulse 2s ease-in-out infinite;
}

.character-standing.visible ~ .sprite-placeholder {
    display: none;
}

/* 대화 말풍선 */
.dialogue-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    z-index: 10;
    pointer-events: none;
    gap: 8px;
    max-height: 60%;
    overflow-y: auto;
    overflow-x: hidden;
}

.dialogue-bubbles::-webkit-scrollbar {
    width: 4px;
}

.dialogue-bubbles::-webkit-scrollbar-track {
    background: rgba(0, 255, 65, 0.1);
}

.dialogue-bubbles::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 2px;
}

.dialogue-bubble {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--main-color);
    border-radius: 12px;
    padding: 10px 15px;
    color: var(--main-color);
    font-family: 'Galmuri14', monospace;
    font-size: 0.9rem;
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    animation: bubbleAppear 0.3s ease-out;
    position: relative;
}

.dialogue-bubble::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--main-color);
}

.dialogue-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 21px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid rgba(0, 0, 0, 0.85);
}

@keyframes bubbleAppear {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.decision-buttons {position: relative;width: 107%; height: 100px;}

.btn-pass {
    position: absolute;
    background: linear-gradient(135deg, var(--main-color) 0%, #00cc33 100%);
    border: 3px solid #000000;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    cursor: pointer;
    left: 0%;
    top: -100px;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5), inset 0 0 30px rgba(0, 255, 65, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Galmuri14', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.btn-pass::before {
    content: 'ADMIT';
}

.btn-pass:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.8), inset 0 0 40px rgba(0, 255, 65, 0.5);
    border-color: #000000;
}

.btn-pass:active {
    animation: buttonDarken 0.3s ease;
}

.btn-reject {
    position: absolute;
    background: linear-gradient(135deg, #ff3333 0%, #cc0000 100%);
    border: 3px solid #000000;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    cursor: pointer;
    left: 73%;
    top: -100px;
    z-index: 10;
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.5), inset 0 0 30px rgba(255, 51, 51, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Galmuri14', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.btn-reject::before {
    content: 'DENY';
}

.btn-reject:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 51, 51, 0.8), inset 0 0 40px rgba(255, 51, 51, 0.5);
    border-color: #000000;
}

.btn-reject:active {
    animation: buttonDarken 0.3s ease;
}

@keyframes buttonDarken {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(0.4);
    }
    100% {
        filter: brightness(1);
    }
}







/* 오른쪽 컬럼 */
.right-column {display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-columns: 2fr 2fr;
    gap: 1rem;
    height: 100%;
    overflow: hidden;}





/* ID 카드 */

.id-card-section {
    position: relative;
    height: auto;
    grid-column: 1 / 2;}

.id-card-img{max-width: 95%; margin: 0px 10px}

.id-card-character-profile {position: absolute;
    top: 0px;
    left: 290px;
    width: 170px;
    height: 200px;
    object-fit: cover;
    z-index: -1;}

    .id-card-overlay {position: absolute;
        top: 20px;
        left: 10px;
        width: 350px;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        justify-content: center;
        z-index: 3;}
    
    
        .info-row {display: flex;
            gap: 1.2rem;
            align-items: baseline;}
        
        .info-label {
            font-size: 1.2rem;
            color: #000000;
            text-transform: uppercase;
            letter-spacing: 0.05rem;}
        
        .info-value {font-size: 1.2rem;
            color: #000000;
            font-weight: bold;
            flex: 1;}

/* 지도 섹션 */

#map {height: 400px;
    width: 470px;
    border: 2px solid var(--main-color);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);}

.map-section {grid-column: 1 / 2;
    grid-row: 2;
    padding: 0.5rem;}

/* 지도 라벨 스타일 */
.custom-minimap-label {
    background-color: transparent !important;
    color: #000000 !important;
    font-family: 'Galmuri14', monospace !important;
    padding: 0 !important;
    border: none !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
    text-align: center !important;
    box-shadow: none !important;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8) !important; /* 가독성을 위한 흰색 그림자 */
}

.dialogue-section {grid-column: 2 / 3;
    grid-row: 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;}

.dialogue-options {display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 1.5rem;
    width: 100%;
    max-width: 400px;}

.dialogue-btn {background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, rgba(0, 200, 50, 0.05) 100%);
    border: 2px solid var(--main-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: var(--main-color);
    font-family: 'Galmuri14', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);}

.dialogue-btn:hover {background: linear-gradient(135deg, rgba(0, 255, 65, 0.2) 0%, rgba(0, 200, 50, 0.1) 100%);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    transform: translateX(5px);}

.dialogue-btn:active {transform: translateX(5px) scale(0.98);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);}







/* 메모 이미지 (오른쪽) */
.memo-image {position: absolute;
    display: block;
    left: 78%;
    top:-5%;
    width: 100%;
    height: auto;}








/* 사이키델릭 효과 */
.game-area::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 65, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 65, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: drift 20s ease-in-out infinite;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, 20px) rotate(5deg); }
}

/* 게임 결과 오버레이 */
.game-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.result-overlay-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    mix-blend-mode: multiply;
    pointer-events: none;
}

.result-gif {
    position: relative;
    z-index: 1000;
    max-width: 80vw;
    max-height: 80vh;
    animation: gifSquash 0.6s ease-out;
}

@keyframes gifSquash {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2, 0.8);
        opacity: 1;
    }
    70% {
        transform: scale(0.9, 1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 정산 화면 */
#result-screen {
    background-color: #000000;
}

.result-container {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    animation: fadeIn 0.5s ease-in;
}

.result-stats {
    margin: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    background-color: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.stat-label {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff41;
}

.unlock-message {
    margin: 2rem 0;
    padding: 1rem;
    background-color: rgba(0, 255, 65, 0.1);
    border: 2px solid #00ff41;
    color: #00ff41;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    display: none;
}

.unlock-message.show {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

/* 배경 효과 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.03) 2px,
            rgba(0, 255, 65, 0.03) 4px
        );
    pointer-events: none;
    z-index: -1;
}

/* 반응형 */
@media (max-width: 1200px) {
    .game-area {
        grid-template-columns: 350px 1fr;
        gap: 1.5rem;
    }
    
    .id-card-content {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
        letter-spacing: 0.3rem;
    }

    .screen-title {
        font-size: 1.8rem;
    }

    .stage-btn {
        font-size: 1.2rem;
        padding: 1.2rem 1.5rem;
    }

    .game-info {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .game-area {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .left-column {
        order: 2;
    }
    
    .right-column {
        order: 1;
    }
    
    .visitor-display {
        padding: 1rem;
    }
    
    .id-card-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .memo-image {
        order: 2;
    }
    
    .id-card-image {
        order: 1;
    }
    
    .info-label {
        font-size: 0.9rem;
        min-width: 80px;
    }
    
    .info-value {
        font-size: 1rem;
    }
}

/* 피드백 텍스트 */
.feedback-text {
    position: fixed;
    z-index: 2000;
    pointer-events: none;
    animation: feedbackFloat 3.5s ease-out forwards;
    text-align: center;
}

.feedback-main {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.feedback-correct {
    color: var(--main-color);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

.feedback-wrong {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.8);
}

.feedback-reason {
    font-size: 1rem;
    color: #ffcc00;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.6);
}

@keyframes feedbackFloat {
    0% {
        transform: translate(-50%, 0) scale(0.5);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -300px) scale(0.8);
        opacity: 0;
    }
}

