@charset "UTF-8";

/* =========================================================
   06 리듬게임 「칼퇴의 리듬 : 야근탈출 대작전!」 Modern Arcade Styles
   네온 사이버 오피스 테마 & 4레인 리듬 비주얼
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;600;700;800&family=Pretendard:wght@400;600;700;800&family=JetBrains+Mono:wght@700;800&display=swap');

:root {
  --color-lane1: #ec4899; /* 핑크: 카페인 */
  --color-lane2: #38bdf8; /* 스카이블루: 광속저장 */
  --color-lane3: #34d399; /* 에메랄드: 무결점배포 */
  --color-lane4: #fbbf24; /* 앰버/골드: 칼퇴대시 */
  --color-bg-dark: #090d16;
  --color-panel-dark: #101726;
}

body {
  font-family: 'Pretendard', sans-serif;
  background-color: var(--color-bg-dark);
  color: #f8fafc;
  user-select: none;
  overflow-x: hidden;
  touch-action: manipulation;
}

.font-arcade {
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: -0.02em;
}

.font-mono-score {
  font-family: 'JetBrains Mono', monospace;
}

/* =========================================================
   게임 컨테이너 & 배경 그리드
   ========================================================= */
.rhythm-bg-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(99, 102, 241, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 102, 241, 0.07) 1px, transparent 1px);
  perspective: 600px;
}

/* =========================================================
   4-레인 리듬 트랙 (Rhythm Track)
   ========================================================= */
.rhythm-track-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 520px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 29, 0.98) 100%);
  border-radius: 1.25rem;
  border: 2px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.15), inset 0 0 20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* 레인 구분선 */
.track-lane {
  position: relative;
  flex: 1;
  height: 100%;
  border-right: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background-color 0.08s ease;
}

.track-lane:last-child {
  border-right: none;
}

/* 레인별 활성화(키 누름) 조명 효과 */
.track-lane-1.active-lane {
  background: linear-gradient(0deg, rgba(236, 72, 153, 0.35) 0%, transparent 65%);
}
.track-lane-2.active-lane {
  background: linear-gradient(0deg, rgba(56, 189, 248, 0.35) 0%, transparent 65%);
}
.track-lane-3.active-lane {
  background: linear-gradient(0deg, rgba(52, 211, 153, 0.35) 0%, transparent 65%);
}
.track-lane-4.active-lane {
  background: linear-gradient(0deg, rgba(251, 191, 36, 0.35) 0%, transparent 65%);
}

/* 판정선 (Judgment Line) */
.judgment-line {
  position: absolute;
  bottom: 72px;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #ec4899, #38bdf8, #34d399, #fbbf24);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 30px rgba(99, 102, 241, 0.8);
  border-radius: 9999px;
  z-index: 10;
}

/* =========================================================
   노트 렌더링 스타일 (Notes)
   ========================================================= */
.rhythm-note {
  position: absolute;
  left: 8%;
  width: 84%;
  height: 22px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 0 12px currentColor;
  z-index: 5;
  will-change: transform, top;
}

.note-lane-1 {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #ffe4e6;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.8);
}
.note-lane-2 {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #e0f2fe;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
}
.note-lane-3 {
  background: linear-gradient(135deg, #059669, #34d399);
  color: #d1fae5;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.8);
}
.note-lane-4 {
  background: linear-gradient(135deg, #d97706, #fbbf24);
  color: #fef3c7;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.8);
}

/* =========================================================
   판정 텍스트 팝업 애니메이션
   ========================================================= */
.judgment-popup {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.2rem;
  font-weight: 900;
  text-shadow: 0 0 20px currentColor;
  animation: popJudgment 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  z-index: 20;
}

.judgment-PERFECT {
  color: #38bdf8;
  text-shadow: 0 0 25px #0284c7, 0 0 40px #38bdf8;
}
.judgment-GREAT {
  color: #34d399;
  text-shadow: 0 0 20px #059669;
}
.judgment-GOOD {
  color: #fbbf24;
  text-shadow: 0 0 20px #d97706;
}
.judgment-MISS {
  color: #f43f5e;
  text-shadow: 0 0 20px #e11d48;
}

@keyframes popJudgment {
  0% {
    opacity: 0;
    transform: translate(-50%, -35%) scale(0.6);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -75%) scale(0.95);
  }
}

/* =========================================================
   콤보 카운터 애니메이션
   ========================================================= */
.combo-bump {
  animation: comboBump 0.12s ease-out;
}

@keyframes comboBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.28); color: #fbbf24; }
  100% { transform: scale(1); }
}

/* =========================================================
   피버(FEVER) 모드 이펙트
   ========================================================= */
.fever-active {
  animation: feverGlow 1s infinite alternate;
}

@keyframes feverGlow {
  0% {
    box-shadow: 0 0 25px rgba(236, 72, 153, 0.4), inset 0 0 15px rgba(236, 72, 153, 0.3);
    border-color: #ec4899;
  }
  100% {
    box-shadow: 0 0 45px rgba(251, 191, 36, 0.7), inset 0 0 25px rgba(251, 191, 36, 0.4);
    border-color: #fbbf24;
  }
}

/* =========================================================
   캐릭터 애니메이션 & 말풍선
   ========================================================= */
.character-box {
  transition: transform 0.15s ease;
}

.character-fever {
  animation: characterDance 0.35s infinite alternate ease-in-out;
}

@keyframes characterDance {
  0% { transform: translateY(0) rotate(-3deg) scale(1.05); }
  100% { transform: translateY(-8px) rotate(3deg) scale(1.12); }
}

.bubble-popup {
  animation: bubblePop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* =========================================================
   버튼 및 하단 키보드 패드
   ========================================================= */
.key-pad-btn {
  transition: all 0.08s ease;
  user-select: none;
  touch-action: manipulation;
}

.key-pad-btn:active, .key-pad-btn.pressed {
  transform: translateY(3px) scale(0.96);
  filter: brightness(1.3);
}

/* =========================================================
   모달 & 백드롭 애니메이션
   ========================================================= */
.modal-backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(9, 13, 22, 0.85);
}

.modal-pop {
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
