/* Basic Reset */
* {
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f9f9f9;
  --text: #333333;
  --card-bg: #ffffff;
  --border: #dddddd;
  --primary: #007bff;
  --primary-hover: #0056b3;
  --success: #28a745;
  --success-hover: #218838;
  --danger: #ff3b30;
  --solved-bg: #d4edda;
  --easy: green;
  --medium: orange;
  --hard: red;
}

[data-theme="dark"] {
  --bg: #0f172a; /* slate-900 */
  --text: #e5e7eb; /* gray-200 */
  --card-bg: #111827; /* gray-900 */
  --border: #374151; /* gray-700 */
  --primary: #3b82f6; /* blue-500 */
  --primary-hover: #2563eb; /* blue-600 */
  --success: #22c55e; /* green-500 */
  --success-hover: #16a34a; /* green-600 */
  --danger: #ef4444; /* red-500 */
  --solved-bg: #064e3b; /* emerald-900 */
  --easy: #86efac;
  --medium: #fbbf24;
  --hard: #f87171;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
}

.container {
  width: 90%;
  max-width: 600px;
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Theme toggle button (fixed top-right) */
#theme-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background-color: var(--card-bg);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

#theme-toggle:hover {
  border-color: var(--primary);
}

#theme-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

#brand {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 50;
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  padding: 6px 8px;
  border-radius: 6px;
}

#brand:hover {
  color: var(--primary);
}

header {
  margin-bottom: 20px;
}

.tagline, #tagline {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 600;
  color: var(--text);
  opacity: 0.85;
  background: transparent;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
  pointer-events: none;
  z-index: 40;
}

h1 {
  font-size: 24px;
  color: var(--text);
}

.input-container {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
}

input[type="number"] {
  padding: 8px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-right: 10px;
  width: 80px;
  background-color: var(--card-bg);
  color: var(--text);
}

button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: var(--primary);
  color: #ffffff;
}

button:hover {
  background-color: var(--primary-hover);
}

.timer {
  font-size: 24px;
  margin: 20px 0;
}

.hidden {
  display: none;
}

.question-list {
  margin: 20px 0;
  text-align: left;
}

.question-item {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--card-bg);
}

.question-item a {
  text-decoration: none;
  color: var(--primary);
}

.question-item a:hover {
  text-decoration: underline;
}

.tick-button {
  padding: 5px 10px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: var(--success);
  color: #ffffff;
}

.end-button {
  background-color: var(--danger);
}

.tick-button:hover {
  background-color: var(--success-hover);
}

.solved {
  background-color: var(--solved-bg);
  text-decoration: line-through;
}

.footer {
  margin-top: 20px;
}

/* Difficulty-based colors */
.easy {
  color: var(--easy) !important;
}

.medium {
  color: var(--medium) !important;
}

.hard {
  color: var(--hard) !important;
}