@charset "utf-8";

:root {
    --game-bg: linear-gradient(
        to bottom, 
        #001529 0%,
        #004e92 45%,
        #0d332a 70%,
        #1a3a1d 100%
    );
}

.game-wrapper {
    width: 100%;
    height: 760px;
    padding-bottom: 20px;
    position: relative;
    overflow: hidden;
    background: var(--game-bg);
    border-radius: 0 0 5px 5px;
    perspective: 1200px;
}

.pitch {
	position: absolute;
	bottom: 0;
	width: 100%;
	height: 200px;
	background: var(--pitch-color);
	z-index: 1;
}

/* 마이 포인트 상단 배치 */
.top-info {
	position: absolute;
	top: 10px;
	width: 100%;
	z-index: 210;
	display: flex; flex-direction: column; align-items: center; gap: 5px;
}

.point-display {
	color: #fff;
	font-weight: bold;
	font-size: 1.4rem;
	text-shadow: 2px 2px 4px #000;
	background: rgba(0,0,0,0.5);
	padding: 8px 25px;
	border-radius: 30px;
	border: 2px solid rgba(255,255,255,0.2);
}

/* 참가비 선택 중앙 정렬 */
.fee-selector {
	display: flex; gap: 10px;
	background: rgba(0,0,0,0.5);
}

.fee-btn {
	border-radius: 5px;
	border: none;
	padding: 6px 10px;
	font-weight: bold;
	background: #444;
	color: #fff;
	transition: 0.3s;
	font-size: 0.9rem;
}

.fee-btn.active {
	background: #ffeb3b;
	color: #000;
	box-shadow: 0 0 15px #ffeb3b;
}

.combo-badge {
	position: absolute;
	bottom: 200px;
	left: 20%;
	transform: translateX(-50%);
	z-index: 205;
	font-size: 1.2rem;
	color: #ffeb3b;
	font-weight: 900;
	text-shadow: 0 0 10px rgba(0,0,0,0.8);
	display: none; font-style: italic;
}

.result-msg {
	position: absolute;
	top: 45%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 300; pointer-events: none;
	display: none;
	font-weight: 900;
	font-size: 2.5rem;
	text-shadow: 0 0 30px rgba(0,0,0,0.8);
	font-style: italic;
	text-align: center;
	line-height: 1.2;
}

.goal-grid {
	position: absolute;
	top: 60px;
	left: 50%;
	transform: translateX(-50%);
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
	z-index: 10;
	width: 95%;
	max-width: 550px;
}

.target-box {
	aspect-ratio: 4 / 3;
	border: 2px solid rgba(0,255,255,0.4);
	background: rgba(255,255,255,0.1);
	border-radius: 12px;
	color: #0ff;
	font-weight: 800;
	font-size: 1.3rem;
	display: flex; align-items: center; justify-content: center;
	transition: 0.2s;
}

.gauge-container {
	width: 240px;
	height: 25px;
	background: #333;
	margin: 10px auto;
	border-radius: 15px;
	position: relative;
	overflow: hidden;
	border: 3px solid #fff;
}

.gauge-bar {
	width: 30px;
	height: 100%;
	background: #ff0;
	position: absolute;
	left: 0;
	box-shadow: 0 0 10px #ff0;
}

.center-line {
	position: absolute;
	left: 50%;
	width: 8px;
	height: 100%;
	background: #0f0;
	transform: translateX(-50%);
	z-index: 2;
}

.ball-container {
	position: absolute;
	bottom: 150px;
	left: 50%;
	transform: translateX(-50%);
	width: 80px;
	height: 80px;
	z-index: 100;
}

.ball {
	width: 100%;
	height: 100%;
	background: url('./Soccerball.svg') no-repeat center/contain;
}

.hit-success {
	border-color: #0f0 !important;
	background: rgba(0,255,0,0.3) !important;
	color: #fff !important;
}

.hit-fail {
	border-color: #f00 !important;
	background: rgba(255,0,0,0.3) !important;
	color: #fff !important;
}

@media (max-width: 768px) {
	.game-wrapper {
		height: 660px;
	}

	.target-box {
		font-size: 1rem;
	}
}

@media (max-width: 480px) {
	.game-wrapper {
		height: 570px;
	}

	.target-box {
		font-size: 1rem;
	}

	.result-msg {
		font-size: 2rem;
	}
}



/* 기본 새 스타일 */
.flying-bird {
    position: absolute;
    width: 60px; /* 새 크기 */
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1000; /* 공보다 위에 */
    display: none; /* 기본적으로 숨김 */
}

/* 새가 날아가는 애니메이션 */
@keyframes bird-fly {
    from { transform: translateX(-100vw) translateY(50px) rotateY(0deg); }
    to { transform: translateX(100vw) translateY(-100px) rotateY(0deg); } /* 대각선 비행 */
}
@keyframes bird-fly-reverse { /* 반대 방향 */
    from { transform: translateX(100vw) translateY(50px) rotateY(180deg); }
    to { transform: translateX(-100vw) translateY(-100px) rotateY(180deg); }
}

/* 충돌 후 새가 떨어지는 애니메이션 */
@keyframes bird-fall {
    from { opacity: 1; transform: translateY(0) rotate(0deg); }
    to { opacity: 0; transform: translateY(calc(100vh - 100px)) rotate(720deg); }
}

/* 꽝! 효과음/메시지 */
.crash-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4em;
    color: #ff0000;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
    opacity: 0;
    animation: show-crash 0.5s forwards;
    z-index: 2000;
}
@keyframes show-crash {
    from { opacity: 0; transform: translate(-50%, -30%) scale(0.5); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 전광판 외부 틀 */
.scoreboard-box {
    width: 100%;
	border-radius: 5px 5px 0 0;
	padding: 0 20px;
	background: rgba(0, 0, 0); /* 반투명 검정 배경 */
}

.scoreboard-led {
    width: 100%;
    height: 35px;
    overflow: hidden; /* 흐르는 글자가 넘치지 않게 */
    display: flex;
    align-items: center;
}

/* 흐르는 자막 컨테이너 */
.marquee {
    white-space: nowrap;
    display: inline-block;
    padding-left: 100%; /* 처음엔 화면 오른쪽 밖에서 시작 */
    animation: marquee-scroll 15s linear infinite;
}

.marquee span {
    font-size: 14px;
    font-weight: bold;
    color: #ffeb3b; /* LED 전광판 느낌의 노란색 */
    text-shadow: 0 0 5px #ffeb3b, 0 0 10px #f44336; /* 글자 자체 발광 효과 */
    letter-spacing: 2px;
}

/* 자막이 왼쪽으로 흐르는 애니메이션 */
@keyframes marquee-scroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}