


.game-screen {
  grid-template-rows: max-content max-content auto max-content;
}


.game-header {
  padding: 16px 20px 12px;
}


.game-action-top {
  padding: 12px 20px 0;
}

.timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timer-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-icon {
  color: var(--text-color);
  flex-shrink: 0;
}

.timer-text {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-color);
  min-width: 30px;
  text-align: center;
}

.pause-btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.pause-btn-icon:active {
  transform: scale(0.95);
}

.progress-bar {
  flex: 1;
  height: 12px;
  background: #E5E5E5;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
  transition: width 1s linear;
  border-radius: 10px;
}


.game-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}


.word-card {
  position: relative;
  background: white;
  border-radius: 30px;
  width: 80%;
  max-width: 340px;
  height: 50%;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: solid 2px var(--gray);
  box-shadow: 0 4px 0 0 var(--gray);
  padding: 60px 30px;
  user-select: none;
  touch-action: pan-y;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: grab;
}

.word-card:active {
  cursor: grabbing;
}

.word-card.swiping {
  transition: none;
  cursor: grabbing;
}

.word-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.word-main {
  font-size: 40px;
  font-weight: 800;
  color: var(--cord-text);
  letter-spacing: -1.5px;
  word-wrap: break-word;
  max-width: 100%;
  text-align: center;
  line-height: 1.1;
  text-transform: uppercase;
}

.word-translation {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray);
  text-align: center;
  text-transform: uppercase;
}


.pause-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  z-index: 20;
}


.game-screen.paused .word-content {
  opacity: 0.3;
}

.game-screen.paused .card-nav-arrow {
  pointer-events: none;
}


.card-nav-arrow {
  position: absolute;
  background: none;
  border: none;
  color: #CCC;
  cursor: pointer;
  padding: 10px;
  transition: color 0.2s;
  z-index: 10;
}


.card-nav-arrow:hover { color: inherit; }


.card-nav-arrow:disabled {
  opacity: 1;
  cursor: pointer;
}

.card-nav-up {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.card-nav-down {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}


.swipe-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 5;
}

.swipe-indicator-up {
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--green);
}

.swipe-indicator-down {
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--red);
}

.swipe-indicator.show {
  opacity: 0.9;
}


.word-card.swipe-up {
  animation: swipeUpAnim 0.4s ease-out forwards;
}

.word-card.swipe-down {
  animation: swipeDownAnim 0.4s ease-out forwards;
}

@keyframes swipeUpAnim {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(0.8);
    opacity: 0;
  }
}

@keyframes swipeDownAnim {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) scale(0.8);
    opacity: 0;
  }
}


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

.word-card.appear {
  animation: cardAppear 0.3s ease-out;
}


.game-action-bottom {
  padding: 18px 20px 40px;
}


.game-action-top .btn,
.game-action-bottom .btn {
  font-size: 36px;
  font-weight: 800;
  padding: 14px 20px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.game-action-top .btn .btn-number,
.game-action-bottom .btn .btn-number {
  font-size: 36px;
  line-height: 1;
}

.game-action-top .btn .btn-label,
.game-action-bottom .btn .btn-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
  line-height: 1;
}


.game-paused .progress-fill {
  transition: none;
}

.game-paused .timer-text {
  color: var(--red);
}


@media (max-height: 750px) {
  .word-main {
    font-size: 32px;
  }

  .game-action-top .btn,
  .game-action-bottom .btn {
    min-height: 60px;
    font-size: 32px;
    padding: 14px 18px;
  }
}

@media (max-height: 650px) {
  .word-card {
    min-height: 280px;
    padding: 40px 20px;
  }
  
  .word-main {
    font-size: 42px;
  }

  .game-action-top .btn,
  .game-action-bottom .btn {
    min-height: 55px;
    font-size: 28px;
    padding: 12px 16px;
  }
}
