:root {
  --redis-red: #D82C20;
  --redis-dark-red: #B31B12;
  --bg-dark: #1B1B1B;
  --bg-darker: #141414;
  --text-primary: #FFFFFF;
  --text-secondary: #A3A3A3;
  --border-color: #2A2A2A;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

header {
  background-color: var(--bg-darker);
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: var(--redis-red);
  letter-spacing: -0.02em;
}

#progress {
  color: var(--redis-red);
  font-weight: 500;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

#layout {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  min-height: calc(100vh - 80px);
}

/* Sidebar Styles */
aside#filters {
  width: 280px;
  padding: 2rem;
  background-color: var(--bg-darker);
  border-right: 1px solid var(--border-color);
}

aside section {
  margin-bottom: 2rem;
}

aside h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

aside label {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
}

aside label:hover {
  background-color: rgba(216, 44, 32, 0.1);
  color: var(--text-primary);
}

/* Checkbox styling */
input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-secondary);
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  cursor: pointer;
}

input[type="checkbox"]:checked {
  background-color: var(--redis-red);
  border-color: var(--redis-red);
}

input[type="checkbox"]:checked::after {
  content: "✓";
  color: white;
  position: absolute;
  left: 3px;
  top: -1px;
}

/* Main Content */
main {
  flex-grow: 1;
  padding: 2rem;
  background-color: var(--bg-dark);
}

.resource {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: var(--bg-darker);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.resource h3 {
  margin: 0 0 1rem 0;
}

.resource h3 a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
}

.resource h3 a:hover {
  color: var(--redis-red);
}

.resource-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.completion-checkbox {
  margin-left: 1rem;
  width: 24px;
  height: 24px;
}

.completion-checkbox:checked {
  background-color: var(--redis-red);
  border-color: var(--redis-red);
}

/* Labels */
.labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}

.label {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.company-label {
  background-color: rgba(216, 44, 32, 0.15);
  color: var(--redis-red);
}

.topic-label {
  background-color: rgba(66, 153, 225, 0.15);
  color: #63B3ED;
}

.type-label {
  background-color: rgba(146, 64, 214, 0.15);
  color: #B794F4;
}

.difficulty-label {
  background-color: rgba(237, 137, 54, 0.15);
  color: #F6AD55;
}

/* Search Bar */
.search-bar {
  margin-bottom: 2rem;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-darker);
  color: var(--text-primary);
  font-size: 1rem;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--redis-red);
  box-shadow: 0 0 0 3px rgba(216, 44, 32, 0.1);
}

/* Pagination */
#pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
}

#pagination button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  background-color: var(--redis-red);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#pagination button:hover {
  background-color: var(--redis-dark-red);
}

#pagination button:disabled {
  background-color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Stats Panel Styles */
#stats-panel {
  background-color: var(--bg-darker);
  border-left: 1px solid var(--border-color);
  padding: 2rem;
}

.stats-box {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.stats-box h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

#topic-progress .progress-item {
  margin-bottom: 1rem;
}

.progress-bar {
  background-color: var(--bg-darker);
  border-radius: 4px;
  height: 8px;
  margin-top: 4px;
}

.progress-bar .fill {
  background-color: var(--redis-red);
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

#recent-completions .completion-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

#recent-completions .completion-item:last-child {
  border-bottom: none;
}

/* Footer Styles */
.site-footer {
  background: var(--bg-darker);
  padding: 1.5rem 0;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  color: var(--text-secondary);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-icon {
  width: 20px;
  height: 20px;
  margin: 0 10px;
  filter: invert(1);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-icon:hover {
  opacity: 1;
}
