/* EP07 Player Styles - Tooto's Reset (리셋 & 다시 시작) */
.ep07-mode #screenContainer {
  position: relative;
  overflow: hidden;
}

#ep7InteractiveLayer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  padding-bottom: 16px;
  padding-right: 20px;
  pointer-events: none;
  z-index: 20;
}

.ep7-stage-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  width: auto;
  max-width: 380px;
}

/* Blocks Stage Area */
.ep7-blocks-area {
  width: 100%;
  height: 160px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 6px;
}

/* Fallen State */
.ep7-blocks-area.state-fallen .ep7-block {
  position: absolute;
  bottom: 10px;
  width: 64px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ep7-blocks-area.state-fallen #ep7Block1 {
  background: #ef4444;
  left: 25%;
  transform: rotate(-35deg);
}
.ep7-blocks-area.state-fallen #ep7Block2 {
  background: #eab308;
  left: 45%;
  transform: rotate(25deg);
}
.ep7-blocks-area.state-fallen #ep7Block3 {
  background: #3b82f6;
  left: 65%;
  transform: rotate(-15deg);
}
.ep7-blocks-area.state-fallen .ep7-star {
  display: none;
}
.ep7-blocks-area.state-fallen .ep7-box {
  display: none;
}

/* Box State (처음 상자로 복원된 상태) */
.ep7-blocks-area.state-box .ep7-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.95);
  border: 2px solid #14b8a6;
  border-radius: 14px;
  padding: 10px 20px;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.35);
  animation: ep7BoxPop 0.4s ease-out;
}
@keyframes ep7BoxPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.ep7-blocks-area.state-box .ep7-box-label {
  font-size: 13px;
  font-weight: 800;
  color: #2dd4bf;
  letter-spacing: -0.01em;
}
.ep7-blocks-area.state-box .ep7-box-blocks {
  display: flex;
  gap: 8px;
}
.ep7-blocks-area.state-box .ep7-block {
  width: 52px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  transform: none !important;
  position: static;
}
.ep7-blocks-area.state-box #ep7Block1 { background: #ef4444; }
.ep7-blocks-area.state-box #ep7Block2 { background: #eab308; }
.ep7-blocks-area.state-box #ep7Block3 { background: #3b82f6; }
.ep7-blocks-area.state-box .ep7-star { display: none; }

/* Stacked State (새로 차곡차곡 완성된 탑) */
.ep7-blocks-area.state-stacked .ep7-box {
  display: none;
}
.ep7-blocks-area.state-stacked .ep7-tower-column {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
}
.ep7-blocks-area.state-stacked .ep7-block {
  position: static;
  width: 90px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  transform: none !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
  animation: ep7StackBlock 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ep7StackBlock {
  0% { transform: translateY(-30px) scale(0.8); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.ep7-blocks-area.state-stacked #ep7Block1 { background: #ef4444; width: 110px; }
.ep7-blocks-area.state-stacked #ep7Block2 { background: #eab308; width: 95px; }
.ep7-blocks-area.state-stacked #ep7Block3 { background: #3b82f6; width: 80px; }
.ep7-blocks-area.state-stacked .ep7-star {
  font-size: 26px;
  margin-bottom: 2px;
  animation: ep7StarGlow 1s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 10px #facc15);
}
@keyframes ep7StarGlow {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.25) rotate(15deg); }
}

/* Action Buttons */
.ep7-btn-reset, .ep7-btn-stack {
  min-height: 56px;
  padding: 12px 28px;
  font-size: 17px;
  font-weight: 800;
  font-family: inherit;
  border-radius: 99px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ep7-btn-reset {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.5);
  animation: ep7PulseReset 2s infinite;
}
@keyframes ep7PulseReset {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(20, 184, 166, 0.5); }
  50% { transform: scale(1.04); box-shadow: 0 10px 30px rgba(20, 184, 166, 0.8); }
}
.ep7-btn-reset:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(135deg, #2dd4bf, #14b8a6);
}

.ep7-btn-stack {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.5);
  animation: ep7PulseReset 2s infinite;
}
.ep7-btn-stack:hover {
  transform: translateY(-2px) scale(1.05);
}

.ep7-stage-wrap.hidden {
  display: none !important;
}

/* Complete Wrap */
#ep7CompleteWrap {
  display: none;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(15, 23, 42, 0.95));
  border: 2px solid #14b8a6;
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  text-align: center;
}
#ep7CompleteWrap.active {
  display: block !important;
  animation: ep7FadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ep7FadeUp {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.ep7-complete-title {
  font-size: 19px;
  font-weight: 800;
  color: #2dd4bf;
  margin-bottom: 6px;
}
.ep7-complete-desc {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 14px;
}
.ep7-complete-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ep7-btn-primary {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}
.ep7-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.5);
}
.ep7-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.ep7-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  #ep7InteractiveLayer {
    position: static;
    pointer-events: auto;
    height: auto;
    padding: 0;
    align-items: center;
  }
  .ep7-stage-wrap {
    width: 100%;
    max-width: 100%;
    margin: 10px auto 0;
  }
  .ep7-blocks-area {
    height: 120px;
  }
}
