/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a2e;
  background: #f5f5f5;
}

/* --- Container --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
  background: #e63946;
  color: white;
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: white;
  text-decoration: none;
  font-family: "Courier New", Courier, monospace;
}

.site-title:hover {
  text-decoration: none;
  opacity: 0.9;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 2px;
}

nav a:hover,
nav a.active {
  color: white;
  border-bottom: 2px solid white;
}

/* --- Main Content --- */
main {
  padding: 2rem 0;
  min-height: 60vh;
}

main h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

main > p {
  color: #555;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* --- Cards --- */
.fail-card,
.unfail-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.card-header {
  padding: 1rem;
}

.card-header h3 {
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}

.fail-card .card-header {
  background: #e63946;
  color: white;
}

.unfail-card .card-header {
  background: #2a9d8f;
  color: white;
}

.card-url {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  word-break: break-all;
}

.card-screenshot img {
  width: 100%;
  height: auto;
  display: block;
  background: #eee;
}

.no-screenshot {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  color: #999;
  font-style: italic;
}

.card-info {
  padding: 0.75rem 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.days-to-fix {
  color: #2a9d8f;
  font-size: 1.05rem;
  margin-top: auto;
  margin-bottom: 0.25rem;
}

.card-description {
  font-style: italic;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.reported-date {
  color: #888;
  font-size: 0.85rem;
  margin-top: auto;
}

.dates {
  color: #888;
  font-size: 0.85rem;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 3rem 0;
  font-size: 1.1rem;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid #ddd;
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

.site-footer code {
  background: #e8e8e8;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.95em;
}

/* --- About Page --- */
.about-content {
  max-width: 700px;
}

.about-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.about-content p {
  margin-bottom: 1rem;
}

.about-content ol,
.about-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.about-content li {
  margin-bottom: 0.25rem;
}

.about-content code {
  background: #e8e8e8;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: "Courier New", Courier, monospace;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    text-align: center;
  }

  nav {
    gap: 1rem;
  }

  main h1 {
    font-size: 1.5rem;
  }
}
