/* ==================== DISCOVER COLLECTIONS BAR ==================== */

.discover-collections-bar {
  padding: 8px 16px;
  display: flex;
  justify-content: flex-end;
}

.discover-coll-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.discover-coll-btn:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.2);
  color: rgba(0, 212, 255, 0.8);
}

/* ==================== COLLECTIONS ==================== */

.coll-browse, .coll-detail, .coll-create {
  padding: 24px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Override card-space constraints when showing collections */
#card-space[data-showing-collections="true"] {
  max-width: none;
  padding: 0;
  display: block;
}

/* ==================== HEADER ==================== */

.coll-header {
  margin-bottom: 28px;
}

.coll-title {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 6px;
}

.coll-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0 16px;
}

.coll-create-btn {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: rgba(0, 212, 255, 0.8);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.coll-create-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  color: rgba(0, 212, 255, 1);
}

/* ==================== SECTION ==================== */

.coll-section {
  margin-bottom: 28px;
}

.coll-section-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 14px;
}

/* ==================== FEATURED GRID ==================== */

.coll-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* ==================== ALL GRID ==================== */

.coll-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ==================== COLLECTION CARD ==================== */

.coll-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.coll-card:hover {
  border-color: rgba(0, 212, 255, 0.25);
  transform: translateY(-2px);
}

.coll-card-cover {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coll-card.is-featured .coll-card-cover {
  height: 100px;
}

.coll-card-icon {
  font-size: 32px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.coll-card.is-featured .coll-card-icon {
  font-size: 40px;
}

.coll-card-info {
  padding: 12px;
}

.coll-card-name {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coll-card-meta {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.coll-card-desc {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.coll-card-tags {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.coll-tag {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  color: rgba(0, 212, 255, 0.6);
  background: rgba(0, 212, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==================== DETAIL VIEW ==================== */

.coll-back-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  padding: 6px 0;
  cursor: pointer;
  transition: color 0.15s;
  margin-bottom: 16px;
}

.coll-back-btn:hover {
  color: rgba(255, 255, 255, 0.6);
}

.coll-detail-hero {
  border-radius: 12px;
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.coll-detail-icon {
  font-size: 56px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.coll-detail-name {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 6px;
}

.coll-detail-desc {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 10px;
  line-height: 1.5;
}

.coll-detail-meta {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.coll-detail-meta strong {
  color: rgba(0, 212, 255, 0.7);
}

.coll-detail-actions {
  display: flex;
  gap: 8px;
}

.coll-follow-btn, .coll-share-btn {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.coll-follow-btn {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: rgba(0, 212, 255, 0.8);
}

.coll-follow-btn:hover, .coll-follow-btn.is-following {
  background: rgba(0, 212, 255, 0.2);
  color: #00d4ff;
}

.coll-share-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

.coll-share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* ==================== PACK LIST ==================== */

.coll-pack-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coll-pack-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.1s;
}

.coll-pack-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.coll-pack-num {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.15);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.coll-pack-info {
  flex: 1;
  min-width: 0;
}

.coll-pack-name {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.coll-pack-creator {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 1px;
}

.coll-pack-plays {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.coll-pack-price {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  min-width: 50px;
  text-align: right;
}

.coll-pack-price.is-free {
  color: #34d399;
}

.coll-pack-preview-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.coll-pack-preview-btn:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.3);
  color: rgba(0, 212, 255, 0.9);
}

.coll-detail-tags {
  display: flex;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ==================== CREATE FORM ==================== */

.coll-create-title {
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 6px;
}

.coll-create-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0 24px;
}

.coll-create-form {
  max-width: 500px;
}

.coll-form-group {
  margin-bottom: 18px;
}

.coll-form-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-bottom: 6px;
}

.coll-form-hint {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.2);
}

.coll-form-input, .coll-form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  padding: 10px 12px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.coll-form-input:focus, .coll-form-textarea:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.4);
}

.coll-form-textarea {
  resize: vertical;
}

/* Gradient Picker */
.coll-gradient-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.coll-gradient-option {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}

.coll-gradient-option:hover {
  transform: scale(1.1);
}

.coll-gradient-option.is-selected {
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255,255,255,0.2);
}

/* Icon Picker */
.coll-icon-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.coll-icon-option {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}

.coll-icon-option:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.06);
}

.coll-icon-option.is-selected {
  border-color: rgba(0, 212, 255, 0.6);
  background: rgba(0, 212, 255, 0.1);
}

.coll-submit-btn {
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  border: none;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.coll-submit-btn:hover {
  opacity: 0.9;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  .coll-featured-grid {
    grid-template-columns: 1fr;
  }
  .coll-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .coll-detail-hero {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .coll-detail-meta, .coll-detail-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .coll-grid {
    grid-template-columns: 1fr;
  }
}
