:root {
  --bg: #09090b;
  --surface: #18181b;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --error: #ef4444;
  --success: #10b981;
}

* { 
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  height: 100%;
}

.hidden {
  display: none !important;
}

/* --- Authentification --- */
#login-screen {
  justify-content: center;
  align-items: center;
}

.auth-container {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  text-align: center;
}

h1 { 
  color: var(--text); 
  margin: 0 0 2rem 0; 
  font-size: 2.5rem; 
  font-weight: 800;
  letter-spacing: 4px; 
}

form { 
  display: flex; 
  flex-direction: column; 
  gap: 1.25rem; 
}

input {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #27272a;
  background: var(--bg);
  color: var(--text);
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.2s;
}

input:focus { 
  border-color: var(--accent); 
}

button {
  padding: 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}

#btn-submit {
  background: var(--accent);
  color: #fff;
  margin-top: 0.5rem;
}

#btn-submit:active {
  background: var(--accent-hover);
  transform: scale(0.98);
}

.text-btn {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  padding: 0.5rem;
}

.error { 
  color: var(--error); 
  margin-top: 1rem; 
  font-size: 0.9rem;
  min-height: 1.2rem; 
}

/* --- Application Principale --- */
header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

header h2 { 
  margin: 0; 
  font-size: 1.2rem; 
  letter-spacing: 2px;
  font-weight: 700;
}

.badge {
  background: #c026d3;
  color: white;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.icon-btn {
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:active {
  color: var(--error);
}

/* --- Timer --- */
.timer-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4rem;
}

.timer-display {
  font-size: 7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.controls {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  max-width: 340px;
}

.control-btn {
  flex: 1;
  padding: 1.25rem;
  border-radius: 16px;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.control-btn.primary {
  background: var(--success);
  color: #000;
  flex: 2;
}

.control-btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #27272a;
}

.control-btn:active {
  transform: scale(0.96);
}
