
:root {
  --brand-color-primary: rgb(185, 255, 54);
  --brand-color-secondary: rgb(160, 220, 40);
  --brand-color-hover: rgb(140, 200, 30);
  --brand-color-link-hover: rgb(200, 255, 100);

  --bg-color: #0b0205;
  --text-color: #e5e7eb; /* gray-200 */
  --text-color-light: #d1d5db; /* gray-300 */
  --text-color-dark: #9ca3af; /* gray-400 */
  --text-color-footer: #6b7280; /* gray-500 */
  
  --surface-1: #1f2937; /* gray-800 */
  --surface-2: #111827; /* gray-900 */
  --surface-hover: rgba(55, 65, 81, 0.5); /* gray-700/50 */
  --surface-highlight: rgba(185, 255, 54, 0.2);

  --border-color-1: #374151; /* gray-700 */
  --border-color-2: #4b5563; /* gray-600 */
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: sans-serif;
}

/* Header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(11, 2, 5, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color-1);
}

.header-content {
  max-width: 80rem; /* 5xl */
  margin: 0 auto;
  padding: 0 1rem;
}

.main-title {
  font-size: 1.5rem; /* 2xl */
  font-weight: 900;
  text-align: center;
  background-image: linear-gradient(to right, var(--brand-color-primary), var(--brand-color-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin: 1.5rem 0;
}

/* Search Form */
.search-form {
  margin: 1rem auto;
  display: flex;
  justify-content: center;
  max-width: 32rem; /* lg */
}

.search-input {
  width: 100%;
  padding: 0.5rem 1rem;
  background-color: var(--surface-1);
  border: 1px solid var(--border-color-2);
  border-radius: 0.375rem 0 0 0.375rem; /* rounded-l-md */
  color: var(--text-color);
  transition: all 0.2s ease-in-out;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--brand-color-primary);
  border-color: var(--brand-color-primary);
}

.search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background-color: var(--brand-color-secondary);
  color: #111827; /* gray-900 */
  font-weight: 700;
  border: none;
  border-radius: 0 0.375rem 0.375rem 0; /* rounded-r-md */
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.search-button:hover {
  background-color: var(--brand-color-hover);
}

.search-icon {
  height: 1.5rem;
  width: 1.5rem;
}

/* Main Content */
.main-content {
  max-width: 80rem; /* 5xl */
  margin: 0 auto;
  padding: 2rem 0.5rem;
}

.intro-text {
  text-align: center;
  color: var(--text-color-light);
  margin-bottom: 2rem;
  padding: 0 1rem;
  font-size: 0.875rem; /* text-sm */
  line-height: 1.625;
}

.intro-text .mt-2 {
  margin-top: 0.5rem;
}

/* Progress Meter */
.progress-meter {
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.progress-text {
  text-align: center;
  color: var(--text-color-light);
  margin-bottom: 1rem;
}

.progress-text span {
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
}

.progress-bar-bg {
  width: 100%;
  background-color: var(--border-color-1);
  border-radius: 9999px;
  height: 0.625rem;
}

.progress-bar {
  background-image: linear-gradient(to right, var(--brand-color-primary), var(--brand-color-secondary));
  height: 0.625rem;
  border-radius: 9999px;
  transition: width 0.5s ease-out;
}

/* Card Table Section */
.card-period-container {
  margin-bottom: 3rem;
}

.card-period-title {
  font-size: 1.25rem; /* xl */
  font-weight: 700;
  color: var(--brand-color-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color-1);
}

.table-wrapper {
  background-color: var(--surface-1);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.card-table {
  width: 100%;
  text-align: left;
  table-layout: fixed;
}

.card-table thead {
  background-color: rgba(17, 24, 39, 0.5);
}

.card-table th {
  padding: 0.75rem;
  white-space: nowrap;
}

.card-table th:nth-child(1) {
  text-align: center;
  width: 70px;
}
.card-table th:nth-child(2) {
  width: 130px;
}
.card-table th:nth-child(3) {
  padding-left: 0.5rem;
}

.card-table tbody {
  border-top: 1px solid var(--border-color-1);
}

.card-table tr {
  transition: background-color 0.3s ease;
}

.card-table tr:not(:last-child) {
    border-bottom: 1px solid var(--border-color-1);
}

.card-table tr:hover {
  background-color: var(--surface-hover);
}

.card-table tr.highlight {
  background-color: var(--surface-highlight);
}

.card-table td {
  padding: 0.75rem;
  vertical-align: middle;
}

.card-table td:nth-child(1) {
  text-align: center;
}

.card-table td:nth-child(2) {
  font-family: monospace;
  color: var(--text-color-dark);
  white-space: nowrap;
}

.card-table td:nth-child(3) {
  padding-left: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
  word-break: break-word;
}

/* Custom Checkbox */
.checkbox-label {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  height: 1.5rem;
  width: 1.5rem;
}

.checkbox-input {
  appearance: none;
  height: 1.5rem;
  width: 1.5rem;
  border: 2px solid var(--border-color-2);
  border-radius: 0.375rem;
  background-color: var(--border-color-1);
  transition: all 0.2s ease;
  cursor: pointer;
}

.checkbox-input:focus {
  outline: none;
}

.checkbox-input:checked {
  background-color: var(--brand-color-primary);
  border-color: transparent;
}

.check-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1rem;
  height: 1rem;
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.checkbox-input:checked + .check-icon {
  opacity: 1;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--text-color-footer);
  margin-top: 3rem;
  padding-bottom: 2rem;
}

.footer p {
  font-size: 0.875rem; /* text-sm */
  margin-bottom: 0.5rem;
}

.creator-link {
  color: var(--brand-color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.creator-link:hover {
  color: var(--brand-color-link-hover);
}

/* Responsive Styles */
@media (min-width: 640px) {
  .main-title {
    font-size: 1.875rem; /* sm:text-3xl */
  }
  .main-content {
    padding: 2rem 1rem;
  }
  .intro-text {
    font-size: 1rem; /* sm:text-base */
  }
  .card-table th,
  .card-table td {
    padding: 1rem;
  }
  .card-table th:nth-child(3),
  .card-table td:nth-child(3) {
    padding-left: 0.5rem;
  }
}
