:root {
  --bg-color: #000;
  --text-color: #ffffff;
  --primary-color: #0d6efd;
  --vela-color: #0dcaf0;
  --caffe-color: #8b5a2b;
  --success-color: #198754;
  --error-color: #dc3545;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none; /* Prevent text selection */
  -webkit-user-select: none;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-image: url('img/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-color);
  height: 100vh;
  width: 100vw;
  overflow: hidden; /* Prevent scrolling/bouncing */
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none; /* Prevent native touch actions like pull-to-refresh */
}

#app {
  width: 100%;
  height: 100%;
  max-width: 800px;
  position: relative;
  background: transparent;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* padding: 2rem; */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 100;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-align: center;
}

p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.4;
}

.instructions {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  font-size: 1.2rem;
  backdrop-filter: blur(5px);
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 1rem 3rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.1s;
}

button:active {
  transform: scale(0.95);
}

/* Game Screen */
#game-screen {
  justify-content: center;
  padding-top: 0;
  position: relative;
}

#timer-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 10;
}

#timer-progress {
  height: 100%;
  width: 100%;
  background: var(--primary-color);
  transition: width 0.1s linear;
}

.game-info {
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 1rem 2rem;
  z-index: 10;
}

.word-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hint {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
  position: absolute;
}
.hint-top { top: 15vh; }
.hint-bottom { bottom: 15vh; }

.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  padding: 2rem;
  width: 75%;
  max-width: 350px;
  min-height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
  z-index: 10;
  cursor: grab;
}

.card:active {
    cursor: grabbing;
}

.card.over-threshold {
    background-color: #f0f0f0;
    border-color: var(--primary-color);
}

.card h2 {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 1px;
  text-align: center;
  margin: 0;
  color: #1a1a1a;
  text-transform: uppercase;
}

/* Animations for feedback */
.card.correct {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: white;
}
.card.incorrect {
  background-color: var(--error-color);
  border-color: var(--error-color);
  color: white;
}
.card.swipe-up {
  transform: translateY(-100px);
}
.card.swipe-down {
  transform: translateY(100px);
}

.score-display {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(5px);
}

.final-message {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  text-align: center;
  line-height: 1.4;
  font-weight: 500;
}
