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

/* Body */
body {
  font-family: 'Segoe UI', sans-serif;
  background: #f5f7fa;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Center Layout */
.screen-center {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

/* Headings */
h1, h2 {
  margin-bottom: 20px;
}

/* Inputs */
input {
  padding: 10px 14px;
  margin: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 250px;
  font-size: 14px;
  transition: 0.2s ease;
}

input:focus {
  border-color: #4f46e5;
  outline: none;
}

/* Buttons */
button {
  padding: 10px 18px;
  margin: 8px;
  border: none;
  border-radius: 8px;
  background: #4f46e5;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background: #3730a3;
}

button:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* Topic Cards */
.topic-card {
  width: 300px;
  background: white;
  padding: 16px;
  margin: 12px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: 0.2s ease;
  text-align: left;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* Top Right Button */
.top-bar {
  position: absolute;
  top: 15px;
  right: 15px;
}

/* Timer Display */
#timerDisplay {
  font-size: 60px;
  font-weight: bold;
  margin-top: 30px;
  letter-spacing: 2px;
}

/* Warning Text */
.warning {
  margin-top: 20px;
  font-size: 22px;
  font-weight: bold;
  color: #dc2626;
  animation: pulse 1s infinite;
}

/* Pulse animation */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Rating Buttons */
#ratingContainer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

#ratingContainer button {
  margin: 10px;
  width: 120px;
}

/* Back Button */
.back-btn {
  margin-top: 30px;
  background: #6b7280;
}

.back-btn:hover {
  background: #4b5563;
} .sub-form {
  margin: 15px 0;
}

.hidden {
  display: none;
}