* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  color: #2d3436;
  transition: background 0.3s ease;
}

.PT_CONTROLS {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.control-btn {
  background: #6c5ce7;
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: transform 0.1s;
}

.control-btn:active { transform: scale(0.95); }

.control-select {
  padding: 0 15px;
  border-radius: 25px;
  border: 2px solid #6c5ce7;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  font-family: 'Poppins', sans-serif;
}

body.dark-mode { background: #121212; color: #dfe6e9; }
body.dark-mode .PT_GAME_AREA { background: #1e272e; border-color: #3d3d3d; }
body.dark-mode .PT_QUOTE_DISPLAY { background: #1e272e; color: #636e72; }
body.dark-mode .correct { color: #f5f6fa; }
body.dark-mode .PT_KEYBOARD { background: #1e272e; border-color: #000; }
body.dark-mode .PT_KEY { background: #2f3640; color: #f5f6fa; box-shadow: 0 4px 0 #000; }
body.dark-mode .res-box { background: #2d3436; color: white; }

.PT_HEADER {
  background: linear-gradient(90deg, #6c5ce7 0%, #a29bfe 100%);
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
  border-bottom: 4px solid #fdcb6e;
}
.PT_LOGO { font-size: 36px; font-weight: 800; text-transform: uppercase; }
.PT_LOGO_PRIMA { color: #fff; }
.PT_LOGO_THINK { color: #ffeaa7; }

.PT_MAIN_CONTAINER {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 30px;
}

.PT_GAME_AREA {
  width: 100%;
  max-width: 850px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  overflow: hidden;
  position: relative;
}

.PT_PROGRESS_CONTAINER { width: 100%; height: 6px; background: #eee; }
#progress-bar { width: 0%; height: 100%; background: #00b894; transition: 0.1s; }
#progress-bar.red-zone { background: #ff7675; }

.PT_STATS_BAR {
  display: flex;
  justify-content: space-between;
  padding: 15px 30px;
  background: #f1f2f6;
  align-items: center;
}
.stat-box { font-weight: 700; color: #636e72; }
.stat-box span { color: #6c5ce7; font-size: 20px; }

#restart-btn {
  background: #dfe6e9; color: #2d3436;
  border: none; padding: 5px 15px; border-radius: 4px; cursor: pointer; font-weight: 700;
}
#restart-btn:hover { background: #b2bec3; }

.PT_QUOTE_DISPLAY {
  padding: 40px;
  font-family: 'Roboto Mono', monospace;
  font-size: 24px;
  line-height: 1.6;
  color: #b2bec3;
  min-height: 180px;
  user-select: none;
}

.correct { color: #2d3436; }
.incorrect { color: #ff7675; text-decoration: underline; background: rgba(255, 118, 117, 0.1); }
.active-char { border-left: 3px solid #6c5ce7; animation: blink 1s infinite; }
@keyframes blink { 50% { border-color: transparent; } }

#input-field { position: absolute; opacity: 0; pointer-events: none; }

.PT_KEYBOARD {
  background: #dfe6e9; padding: 20px; border-radius: 20px; border-bottom: 6px solid #b2bec3;
}
.PT_ROW { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.PT_KEY {
  width: 45px; height: 45px; background: #fff; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; box-shadow: 0 4px 0 #b2bec3; font-size: 14px;
}
.PT_KEY.active { transform: translateY(4px); box-shadow: none; background: #6c5ce7; color: white; }
.PT_SPACEBAR { width: 280px; }
.PT_BACKSPACE, .PT_ENTER, .PT_SHIFT { width: 90px; font-size: 12px; }

.result-screen { text-align: center; padding: 20px; animation: fadeIn 0.5s; }
.result-stats { display: flex; gap: 20px; justify-content: center; margin: 20px 0; }
.res-box { background: #f1f2f6; padding: 15px; border-radius: 10px; min-width: 90px; }
.res-box span { display: block; font-size: 24px; font-weight: 800; color: #6c5ce7; }
.retry-btn { background: #00b894; color: white; border: none; padding: 10px 30px; border-radius: 5px; cursor: pointer; font-size: 16px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
