/* ===========================================
   TASK RELAY SYSTEM – MODERN APP THEME
   =========================================== */

:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --primary: #0078ff;
  --primary-dark: #005fd4;
  --accent: #28a745;
  --danger: #d93025;
  --text: #333;
  --muted: #888;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --transition: 0.25s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 30px 15px;
}

/* ==========================
   CARD CONTAINERS
   ========================== */

.container {
  width: 100%;
  max-width: 700px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
}

/* ==========================
   HEADER
   ========================== */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.header h2 {
  font-size: 1.4em;
  color: var(--primary-dark);
}

.user-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.9em;
}

.user-info span {
  background: #f7f9fc;
  padding: 4px 8px;
  border-radius: 6px;
}

/* ==========================
   BUTTONS
   ========================== */

.btn {
  background: var(--primary);
  color: white;
  text-decoration: none;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: var(--transition);
}

.btn:hover {
  background: var(--primary-dark);
}

.btn.small {
  padding: 5px 10px;
  font-size: 0.8em;
}

.btn.logout {
  background: var(--danger);
}
.btn.logout:hover {
  background: #b3201a;
}

/* ==========================
   TASK LIST
   ========================== */

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 12px 15px;
  transition: var(--transition);
}

.task-item:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transform: scale(1.01);
}

.task-item a.task {
  text-decoration: none;
  color: var(--text);
  flex: 1;
  font-weight: 500;
}

.task-item a.task:hover {
  color: var(--accent);
}

a.delete {
  color: var(--danger);
  text-decoration: none;
  font-size: 1.2em;
  margin-left: 10px;
  transition: var(--transition);
}
a.delete:hover {
  transform: scale(1.1);
}

/* ==========================
   ADD TASK FORM
   ========================== */

.add-task {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.add-task input {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1em;
  transition: var(--transition);
}

.add-task input:focus {
  border-color: var(--primary);
  outline: none;
}

.add-task button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 1em;
  cursor: pointer;
  transition: var(--transition);
}

.add-task button:hover {
  background: #1e7a36;
}

/* ==========================
   EMPTY STATE
   ========================== */

.empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 20px;
}

/* ==========================
   FORMS (LOGIN / REGISTER)
   ========================== */

.auth-card {
  background: var(--card);
  padding: 30px 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.auth-card h2 {
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.auth-card input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1em;
}

.auth-card input:focus {
  border-color: var(--primary);
  outline: none;
}

.auth-card button {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  border: none;
  color: white;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  transition: var(--transition);
}

.auth-card button:hover {
  background: var(--primary-dark);
}

/* ==========================
   LEADERBOARD
   ========================== */

.leaderboard {
  border-collapse: collapse;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow);
}

.leaderboard th,
.leaderboard td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.leaderboard th {
  background: var(--primary);
  color: white;
}

.leaderboard tr:nth-child(even) {
  background: #f8f9fb;
}

/* ==========================
   RESPONSIVE DESIGN
   ========================== */

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .user-info {
    flex-wrap: wrap;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .add-task {
    flex-direction: column;
  }

  .add-task button {
    width: 100%;
  }
}

/* ==========================
   HEADER & FOOTER STYLES
   ========================== */

.site-header {
  background: var(--primary);
  color: white;
  padding: 12px 0;
  box-shadow: var(--shadow);
}

.header-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-header h1 a {
  color: white;
  text-decoration: none;
  font-size: 1.3em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 0;
  margin: 0;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
}

nav a:hover {
  text-decoration: underline;
}

nav .logout {
  background: var(--danger);
  padding: 6px 10px;
  border-radius: 6px;
}

.user-info {
  background: rgba(255,255,255,0.15);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.9em;
}

.site-footer {
  margin-top: 50px;
  background: #f1f3f7;
  color: #555;
  text-align: center;
  padding: 20px 10px;
  font-size: 0.9em;
  border-top: 1px solid #ddd;
}

@media (max-width: 600px) {
  nav ul {
    flex-wrap: wrap;
    gap: 10px;
  }

  .site-header h1 {
    margin-bottom: 8px;
  }
}

