* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans', sans-serif;
  background: #f5f5f5;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#game-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  background: linear-gradient(to bottom, #e8f4f8 0%, #d4e8f0 100%);
}

#teacher-meter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 300px;
  z-index: 100;
}

.meter-label {
  font-size: 12px;
  color: #333;
  margin-bottom: 5px;
  text-align: center;
}

.meter-bar {
  width: 100%;
  height: 20px;
  background: #fff;
  border-radius: 10px;
  border: 2px solid #333;
  overflow: hidden;
}

#suspicion-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #4CAF50, #FFC107, #FF5722);
  transition: width 0.3s ease;
}

#score-display {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: bold;
  color: #333;
  z-index: 100;
}

#alertness-display {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 200px;
  z-index: 100;
}

#alertness-text {
  font-size: 12px;
  color: #333;
  margin-bottom: 5px;
  text-align: center;
  font-weight: bold;
}

.alertness-bar-container {
  width: 100%;
  height: 12px;
  background: #fff;
  border-radius: 6px;
  border: 2px solid #333;
  overflow: hidden;
}

#alertness-bar {
  height: 100%;
  width: 0%;
  background: #4CAF50;
  transition: width 0.2s ease, background 0.3s ease;
}

#warning-display {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 87, 34, 0.9);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#warning-display.show {
  opacity: 1;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  25% { transform: translateX(-50%) translateY(-5px); }
  75% { transform: translateX(-50%) translateY(5px); }
}

#instructions {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 20px;
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
  color: #333;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 80%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#instructions.show {
  opacity: 1;
  animation: fadeInUp 0.5s ease;
}

.instruction-icon {
  font-size: 24px;
  margin-bottom: 5px;
}

.instruction-text {
  line-height: 1.5;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

#classroom {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#teacher {
  display: none;
}

#desk {
  width: 300px;
  height: 200px;
  background: #8b7355;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#desk::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  right: 0;
  height: 5px;
  background: #6d5a44;
  border-radius: 10px 10px 0 0;
}

#hand {
  display: none;
}

#phone {
  position: absolute;
  width: 80px;
  height: 140px;
  background: #000;
  border-radius: 10px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease;
  z-index: 2;
}

#phone.hidden {
  opacity: 0;
  pointer-events: none;
}

.phone-screen {
  width: 90%;
  height: 90%;
  background: #fff;
  margin: 5% auto;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.notification {
  font-size: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

#game-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#game-over.hidden {
  display: none;
}

.game-over-content {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  text-align: center;
}

.game-over-content h2 {
  font-size: 32px;
  color: #FF5722;
  margin-bottom: 20px;
}

.game-over-content p {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
}

#restart {
  padding: 15px 30px;
  font-size: 18px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Noto Sans', sans-serif;
}

#restart:active {
  background: #45a049;
}