/* frontend/css/collections.css */

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Search & Stats Filter bar */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex-grow: 1;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

/* Card styles */
.col-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.col-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
}

.col-card.create-new-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 2px dashed rgba(99, 102, 241, 0.3);
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  min-height: 350px;
  padding: 30px;
}

.col-card.create-new-card:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
}

.create-icon-wrapper {
  width: 64px;
  height: 64px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 20px;
  transition: transform 0.2s;
}

.col-card.create-new-card:hover .create-icon-wrapper {
  transform: scale(1.1);
  background: rgba(99, 102, 241, 0.2);
}

.col-card .img {
  height: 150px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.col-card .img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
}

.col-card .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.col-card .meta {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.col-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

.col-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-weight: 700;
}

.card-ratings-count {
  color: var(--text-muted);
  font-weight: 500;
}

.progress-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.progress-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #34d399 100%);
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* Finished/Unfinished Toggle tabs style */
.completion-toggle-container {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
  margin-top: 8px;
}

.completion-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.completion-tab.active {
  background: var(--primary);
  color: white;
}

body.version-id-2 .completion-tab.active {
  background: #ec4899;
}

/* ==========================================
   Parliament (Version 2) Layout Overrides
   ========================================== */
body.version-id-2 .col-card.create-new-card {
  border-color: rgba(12, 43, 71, 0.3);
}

body.version-id-2 .col-card.create-new-card:hover {
  border-color: #0c2b47;
}

body.version-id-2 .create-icon-wrapper {
  background: rgba(12, 43, 71, 0.08);
  color: #0c2b47;
}

body.version-id-2 .col-card.create-new-card:hover .create-icon-wrapper {
  background: rgba(12, 43, 71, 0.15);
}

body.version-id-2 .progress-bar-fill {
  background: linear-gradient(90deg, #0c2b47 0%, #bda07a 100%);
}

body.version-id-2 .search-box input {
  background: #ffffff;
  border: 1px solid #e5dfd3;
  color: #1a202c;
}

body.version-id-2 .search-box input:focus {
  border-color: #0c2b47;
}

body.version-id-2 .search-box svg {
  color: #718096;
}

body.version-id-2 .completion-toggle-container {
  background: #ffffff;
  border: 1px solid #e5dfd3;
}

body.version-id-2 .completion-tab {
  color: #718096;
}

body.version-id-2 .completion-tab.active {
  background: #0c2b47;
  color: #ffffff;
}

body.version-id-2 .col-card {
  background: #ffffff;
  border: 1px solid #e5dfd3;
  color: #1a202c;
  box-shadow: 0 8px 20px rgba(12, 43, 71, 0.04);
}

body.version-id-2 .col-card:hover {
  background: #ffffff;
  border-color: #bda07a;
  box-shadow: 0 12px 30px rgba(12, 43, 71, 0.08);
}

body.version-id-2 .col-card h3 {
  color: #0c2b47;
}

body.version-id-2 .col-card p {
  color: #4a5568;
}

body.version-id-2 .progress-bar-track {
  background: #faf9f6;
  border: 1px solid #e5dfd3;
}

body.version-id-2 .card-ratings-count {
  color: #718096;
}

body.version-id-2 .card-stats {
  color: #4a5568;
}

body.version-id-2 .progress-container {
  color: #4a5568;
}
