/* Global reset-ish */
* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #1f2b4a 0, #050812 55%);
  color: #f5f5f5;
}

/* Header & nav */
header {
  background: linear-gradient(90deg, #12172b, #172644, #12172b);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

header h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

nav a {
  color: #8fd5ff;
  margin-left: 12px;
  text-decoration: none;
  font-size: 14px;
}

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

/* Main container */
main {
  padding: 16px;
}

.container {
  max-width: 720px;
  margin: 0 auto;
}

/* Headings */
h2, h3 {
  margin-top: 0;
}

/* Flash messages */
.flashes {
  list-style: none;
  margin: 0;
  padding: 8px 16px 0 16px;
}

.flashes li {
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.success { background: #123c1f; }
.error   { background: #4a1717; }
.info    { background: #12324a; }

/* Forms */
form {
  margin-top: 8px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="file"],
select {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 6px;
  border: 1px solid #333c5a;
  background: #10152a;
  color: #f5f5f5;
  font-size: 14px;
}

input[type="file"] {
  padding: 6px;
}

button,
.button {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: #3ba4ff;
  color: #050812;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.button:hover {
  background: #62b6ff;
}

/* Banner for totals */
.banner {
  margin: 10px 0 16px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #17233d, #23335a);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.banner-title {
  font-size: 14px;
  opacity: 0.85;
}

.banner-highlight {
  font-size: 18px;
  font-weight: 700;
}

.banner-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 164, 255, 0.15);
  font-size: 13px;
}

/* Table wrapper for leaderboard */
.table-wrapper {
  margin-top: 10px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

th, td {
  border-bottom: 1px solid #1f2640;
  padding: 8px 6px;
  text-align: left;
  font-size: 14px;
}

th {
  font-weight: 600;
  font-size: 13px;
  color: #c6d4ff;
}

/* Links inside tables */
table a {
  color: #8fd5ff;
  text-decoration: none;
}

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

/* Delete link */
.delete-link {
  color: #ff8080 !important;
  font-size: 12px;
}

/* Run cards */
.run-cards {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.run-card {
  background: rgba(10, 14, 33, 0.95);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid #20274a;
}

.run-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.run-date {
  font-size: 14px;
  font-weight: 600;
}

.run-miles {
  font-size: 14px;
  font-weight: 700;
}

.run-meta {
  font-size: 13px;
  opacity: 0.9;
}

.run-links {
  margin-top: 6px;
  font-size: 12px;
}

/* Responsive tweaks */
@media (max-width: 480px) {
  header h1 {
    font-size: 16px;
  }

  nav a {
    margin-left: 8px;
    font-size: 13px;
  }

  button,
  .button {
    width: 100%;
    text-align: center;
  }

  table {
    min-width: 320px;
  }
}



.run-feed {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.run-photo {
    width: 100%;
    margin-top: 12px;
    border-radius: 12px;
}
